curl --request GET \
--url https://ai.wisepilot.app/api/v1/finance/by-website \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"entity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"xero_tenant_id": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
},
"revenue": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_name": "<string>",
"type": "recurring",
"amount_cents": 123,
"currency": "USD",
"billing_frequency": "monthly",
"next_invoice_date": "2023-12-25",
"last_invoiced_at": "2023-11-07T05:31:56Z",
"status": "active",
"renewal_date": "2023-12-25",
"payment_terms": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"product_line_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"costs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "<string>",
"name": "<string>",
"amount_cents": 123,
"frequency": "monthly",
"is_shared": true,
"product_line_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Get revenue records, cost records, and business entity for a website. Returns the entity linked to this website (directly or via agency), along with all revenue and cost records scoped to the website.
curl --request GET \
--url https://ai.wisepilot.app/api/v1/finance/by-website \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"entity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"xero_tenant_id": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
},
"revenue": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_name": "<string>",
"type": "recurring",
"amount_cents": 123,
"currency": "USD",
"billing_frequency": "monthly",
"next_invoice_date": "2023-12-25",
"last_invoiced_at": "2023-11-07T05:31:56Z",
"status": "active",
"renewal_date": "2023-12-25",
"payment_terms": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"notes": "<string>",
"product_line_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"costs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "<string>",
"name": "<string>",
"amount_cents": 123,
"frequency": "monthly",
"is_shared": true,
"product_line_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}