API reference › Finance › Overview, clients and work items
Finance overview across a recurring work item's occurrences
GET /v1/finance/work-items/{id}/child-finance-overview
- Scope
finance:read- Roles
- admin, client, scheduler
Totals and the active invoices and payables linked to each child occurrence of a parent assignment or shift. A client caller does not see totalProviderPayouts, the payables list or payableNotExist.
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
id required | string | Parent assignment (ASG-) or shift (SFT-) id. Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/work-items/{id}/child-finance-overview" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Overview retrieved
Overview retrieved
{
"success": true,
"message": "Child finance overview retrieved successfully",
"data": {
"childOverallData": {
"totalBilledToClients": 1250,
"totalProviderPayouts": 900,
"netProfitLoss": 350
},
"childInvoiceAndPayables": {
"invoices": [
{
"id": "ASG-YZXCIT-C2",
"type": "assignment",
"title": "string",
"status": {
"id": null,
"label": null,
"slug": null
},
"invoices": [
null
]
}
],
"payables": [
{}
]
},
"invoiceNotExist": false,
"payableNotExist": false
}
}Response fields (17)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object | |
data.childOverallData | object | |
data.childOverallData.totalBilledToClients | number | Example |
data.childOverallData.totalProviderPayouts | number | Example |
data.childOverallData.netProfitLoss | number | Example |
data.childInvoiceAndPayables | object | |
data.childInvoiceAndPayables.invoices | array of object | |
data.childInvoiceAndPayables.invoices[].id | string | Child occurrence id. Example |
data.childInvoiceAndPayables.invoices[].type | string | One of: |
data.childInvoiceAndPayables.invoices[].title | string or null | |
data.childInvoiceAndPayables.invoices[].status | object or null | |
data.childInvoiceAndPayables.invoices[].invoices | array of object | |
data.childInvoiceAndPayables.payables | array of object | Same shape as invoices, with a payables list in place of invoices. |
data.invoiceNotExist | boolean | Example |
data.payableNotExist | boolean | Example |
401 Not signed in
Missing, invalid or expired API key.
{
"success": false,
"message": "Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for.",
"errors": null,
"code": "API_KEY_MISSING"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
403 Not allowed
Scope, tenant, IP allow-list or RBAC check failed.
{
"success": false,
"message": "You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Always empty on this status. Example |
429 Too many requests
Rate limit exceeded. See Retry-After.
{
"success": false,
"message": "You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds.",
"errors": null,
"code": "RATE_LIMITED"
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Null on this status. |
code | string | Machine-readable reason, for branching on in client code. One of: |
500 Server error
Unexpected error
{
"success": false,
"message": "An unexpected error occurred — please try again.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | string or null | Null in production. The exception message only when the application runs with debug on, so nothing is leaked to an integrator. |
code | string | Always empty: the server-error response carries no error code. Example |