API reference › Finance › Overview, clients and work items

Get assignments and shifts for a client

GET /v1/finance/clients/{clientId}/assignments-shifts

Scope
finance:read
Roles
admin, scheduler

Retrieves published (non-deleted) assignments and shifts linked to a client for manual invoice/payable creation. Includes all statuses; drafts and soft-deleted work items are excluded. Soft eligibility hints (invoice_eligible, client_is_no_show, stored_no_show_fee) are advisory — charge engine / 422 validation remain authoritative.

Parameters

Path parameters

NameTypeDescription
clientId requiredstring

Client ID to get assignments and shifts for

Example CLT-XZQLQ1.

Query parameters

NameTypeDescription
document_idstring

Optional invoice id (INV-…) already being edited/duplicated. Linked work items are returned even if soft-deleted or unpublished, with the same shape as create (including name). Must belong to this client.

Example INV-ABC123.

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

Example request

Shell
curl "https://api.fetchfido.ai/v1/finance/clients/{clientId}/assignments-shifts" \
  -H "Authorization: Bearer $FIDO_API_KEY" \
  -H "X-Tenant-ID: $FIDO_TENANT_ID"

Try it

Responses

200 Assignments and shifts retrieved successfully

Assignments and shifts retrieved successfully

JSON
{
  "success": true,
  "message": "Assignments and shifts retrieved successfully",
  "data": [
    {
      "type": "assignment",
      "id": "ASG-12345",
      "name": "Assignment Title",
      "status": "Completed",
      "status_slug": "completed",
      "finance_bucket": "standard",
      "client_is_no_show": false,
      "stored_no_show_fee": 25,
      "invoice_eligible": true
    }
  ]
}
Response fields (12)
FieldTypeDescription
successboolean

Example true.

messagestring

Example Assignments and shifts retrieved successfully.

dataarray of object
data[].typestring

Type of work

One of: assignment, shift. Example assignment.

data[].idstring

Unique identifier

Example ASG-12345.

data[].namestring

Display name

Example Assignment Title.

data[].statusstring

Current status

Example Completed.

data[].status_slugstring

Status slug

Example completed.

data[].finance_bucketstring

Finance money bucket for document mixing rules

One of: standard, canceled, no-show. Example standard.

data[].client_is_no_showboolean

Client picker: whether this client is marked no-show on the work item

Example false.

data[].stored_no_show_feenumber (float) or null

Client picker: stored no-show fee for this client when marked

Example 25.

data[].invoice_eligibleboolean

Soft hint only: false for provider-only no-show work items; not a substitute for save-time 422 / charge engine

Example true.

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

JSON
{
  "success": false,
  "message": "Client not found"
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example Client not found.

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"
}
Response fields (2)
FieldTypeDescription
successboolean

Example false.

messagestring

Example An unexpected error occurred.