API reference › Finance › Invoices
Retrieve invoices by client ID
GET /v1/finance/invoices/by-client/{client_id}
- Scope
finance:read- Roles
- admin, scheduler
Fetches all matching invoices for a specific client with filtering and sorting options (no pagination). Excludes invoices that are the conversion result of a pro forma (not selectable again for pro forma line-up).
Parameters
Path parameters
| Name | Type | Description |
|---|---|---|
client_id required | string | Client ID Example |
Query parameters
| Name | Type | Description |
|---|---|---|
search | string | Search query to filter invoices Example |
columns | string | Comma-separated list of columns to search in (e.g., 'invoice,client,status,total') Example |
statusId | integer | Filter by status ID Example |
startDate | string (date) | Filter from this date (YYYY-MM-DD) Example |
endDate | string (date) | Filter until this date (YYYY-MM-DD) Example |
sortBy | string | Sort by field Example |
sortOrder | string | Sort order One of: |
invoiceType | string | Filter by how the invoice was created: manual or system_generated. One of: |
proformaId | string | Pro forma being viewed or edited. Canceled/void invoices already selected into this pro forma are returned as well; canceled/void invoices selected into any other pro forma are not. Omit it and canceled/void invoices are excluded entirely. Example |
Every call also sends Authorization and X-Tenant-ID; see Getting started.
Example request
curl "https://api.fetchfido.ai/v1/finance/invoices/by-client/{client_id}" \
-H "Authorization: Bearer $FIDO_API_KEY" \
-H "X-Tenant-ID: $FIDO_TENANT_ID"Try it
Responses
200 Invoices retrieved successfully (non-paginated list)
Invoices retrieved successfully (non-paginated list)
{
"success": true,
"message": "Invoices retrieved successfully.",
"data": [
{
"id": "INV-QKPWQ9",
"is_paid": true,
"paid_label": "Paid in invoice",
"isOrganizationInvoice": false,
"billTo": "client",
"client": {
"id": "CLT-N3B72G",
"name": "Example label",
"email": "string",
"logo": "string",
"onlineStatus": "string"
},
"paymentTerms": {
"id": 1,
"label": "Example label"
},
"issueDate": "01/15/2025",
"dueDate": "01/30/2025",
"taxPercentage": 8.25,
"discountAmount": 0,
"subtotal": 1250.5,
"clientPaidAmount": 250,
"orgCoveredAmount": 0,
"creditsApplied": 0,
"balanceDue": 1000.5,
"payableBalanceDue": 0,
"assignmentIds": [
"ASG-SA2IVL"
],
"shiftIds": [
"SFT-9D2KQ1"
],
"clientsBreakdown": {
"clients": [
{
"id": "CLT-N3B72G",
"name": "Example label",
"logo": null,
"totalBilledAmount": 250.5
}
],
"totalBilledToClients": 500.75
}
}
]
}Response fields (36)
3 top-level fields; 1 hold nested fields, listed below.
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | array of object (33 nested) | Every invoice for the client. This endpoint does not paginate, so no meta block is sent. |
Nested fields
data 33 fields
| Field | Type | Description |
|---|---|---|
data[].id | string | Example |
data[].is_paid | boolean | Example |
data[].paid_label | string or null | Example |
data[].isOrganizationInvoice | boolean | Example |
data[].billTo | string or null | Example |
data[].client | object | |
data[].client.id | string | Example |
data[].client.name | string | Example |
data[].client.email | string or null | |
data[].client.logo | string or null | |
data[].client.onlineStatus | string or null | |
data[].paymentTerms | object | |
data[].paymentTerms.id | integer or string | Example |
data[].paymentTerms.label | string or null | Example |
data[].issueDate | string or null | Example |
data[].dueDate | string or null | Example |
data[].taxPercentage | number (float) or null | Example |
data[].discountAmount | number (float) or null | Example |
data[].subtotal | number (float) | Example |
data[].clientPaidAmount | number (float) | Example |
data[].orgCoveredAmount | number (float) | Example |
data[].creditsApplied | number (float) | Example |
data[].balanceDue | number (float) | Example |
data[].payableBalanceDue | number (float) or null | Example |
data[].assignmentIds | array of string | |
data[].shiftIds | array of string | |
data[].clientsBreakdown | object or null | Present for organization invoices with linked work items. |
data[].clientsBreakdown.clients | array of object | |
data[].clientsBreakdown.clients[].id | string | Example |
data[].clientsBreakdown.clients[].name | string | Example |
data[].clientsBreakdown.clients[].logo | string or null | |
data[].clientsBreakdown.clients[].totalBilledAmount | number (float) | Example |
data[].clientsBreakdown.totalBilledToClients | number (float) | 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 |
404 Not found
Client not found or no invoices found
{
"success": false,
"message": "The requested resource could not be found.",
"errors": null,
"code": ""
}Response fields (4)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
errors | any or null | Details when the handler has them — a field-keyed object, a single string, or null. |
code | string | Empty unless the handler sets one. 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
Internal Server 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 |