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

NameTypeDescription
client_id requiredstring

Client ID

Example CLT-12345.

Query parameters

NameTypeDescription
searchstring

Search query to filter invoices

Example INV-001.

columnsstring

Comma-separated list of columns to search in (e.g., 'invoice,client,status,total')

Example invoice,status.

statusIdinteger

Filter by status ID

Example 1.

startDatestring (date)

Filter from this date (YYYY-MM-DD)

Example 2025-01-01.

endDatestring (date)

Filter until this date (YYYY-MM-DD)

Example 2025-12-31.

sortBystring

Sort by field

Example created_at.

sortOrderstring

Sort order

One of: asc, desc. Example desc.

invoiceTypestring

Filter by how the invoice was created: manual or system_generated.

One of: manual, system_generated. Example manual.

proformaIdstring

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 PRF-8LE81N.

Every call also sends Authorization and X-Tenant-ID; see Getting started.

Example request

Shell
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)

JSON
{
  "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.

FieldTypeDescription
successboolean

Example true.

messagestring

Example Invoices retrieved successfully..

dataarray 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
FieldTypeDescription
data[].idstring

Example INV-QKPWQ9.

data[].is_paidboolean

Example true.

data[].paid_labelstring or null

Example Paid in invoice.

data[].isOrganizationInvoiceboolean

Example false.

data[].billTostring or null

Example client.

data[].clientobject
data[].client.idstring

Example CLT-N3B72G.

data[].client.namestring

Example Example label.

data[].client.emailstring or null
data[].client.logostring or null
data[].client.onlineStatusstring or null
data[].paymentTermsobject
data[].paymentTerms.idinteger or string

Example 1.

data[].paymentTerms.labelstring or null

Example Example label.

data[].issueDatestring or null

Example 01/15/2025.

data[].dueDatestring or null

Example 01/30/2025.

data[].taxPercentagenumber (float) or null

Example 8.25.

data[].discountAmountnumber (float) or null

Example 0.

data[].subtotalnumber (float)

Example 1250.5.

data[].clientPaidAmountnumber (float)

Example 250.

data[].orgCoveredAmountnumber (float)

Example 0.

data[].creditsAppliednumber (float)

Example 0.

data[].balanceDuenumber (float)

Example 1000.5.

data[].payableBalanceDuenumber (float) or null

Example 0.

data[].assignmentIdsarray of string
data[].shiftIdsarray of string
data[].clientsBreakdownobject or null

Present for organization invoices with linked work items.

data[].clientsBreakdown.clientsarray of object
data[].clientsBreakdown.clients[].idstring

Example CLT-N3B72G.

data[].clientsBreakdown.clients[].namestring

Example Example label.

data[].clientsBreakdown.clients[].logostring or null
data[].clientsBreakdown.clients[].totalBilledAmountnumber (float)

Example 250.5.

data[].clientsBreakdown.totalBilledToClientsnumber (float)

Example 500.75.

401 Not signed in

Missing, invalid or expired API key.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Invalid API key. Org and user tier keys must send an X-Tenant-ID header naming the organization the key was issued for..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: API_KEY_MISSING, API_KEY_INVALID, API_KEY_EXPIRED. Example API_KEY_MISSING.

403 Not allowed

Scope, tenant, IP allow-list or RBAC check failed.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You don't have permission to access this endpoint. This API key is missing the 'finance:read' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

404 Not found

Client not found or no invoices found

JSON
{
  "success": false,
  "message": "The requested resource could not be found.",
  "errors": null,
  "code": ""
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example The requested resource could not be found..

errorsany or null

Details when the handler has them — a field-keyed object, a single string, or null.

codestring

Empty unless the handler sets one.

Example .

429 Too many requests

Rate limit exceeded. See Retry-After.

JSON
{
  "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)
FieldTypeDescription
successboolean

Example false.

messagestring

Example You've exceeded this API key's rate limit of 120 requests per minute. Try again in 37 seconds..

errorsany or null

Null on this status.

codestring

Machine-readable reason, for branching on in client code.

One of: RATE_LIMITED. Example RATE_LIMITED.

500 Server error

Internal Server Error

JSON
{
  "success": false,
  "message": "An unexpected error occurred — please try again.",
  "errors": null,
  "code": ""
}
Response fields (4)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred — please try again..

errorsstring or null

Null in production. The exception message only when the application runs with debug on, so nothing is leaked to an integrator.

codestring

Always empty: the server-error response carries no error code.

Example .