API reference › Finance › Provider expenses

Approve/decline client expense share per expense line (admin/scheduler)

POST /v1/finance/work-item-expense-share

Scope
finance:edit
Roles
admin, scheduler

Admin/scheduler can approve or decline a specific client's allocated share for one or more client-billable expense lines on an assignment or shift. Provide either reimbursable_expense_id (single) or reimbursable_expense_ids (bulk). decline_reason is required when action=decline. Decline is final per expense line.

Parameters

None of its own.

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

Request body required

FieldTypeDescription
affectFinancialsboolean or null

Required when the change moves money on a work item whose linked finance document is Sent or Approved; without it the call returns 422 FINANCIAL_CONSENT_REQUIRED. true applies the change to those documents; false saves it and marks them out of sync.

work_item_type requiredstring

One of: assignment, shift. Example assignment.

work_item_id requiredstring

Example ASG-ABC123.

client_id requiredstring

Example CLT-ABC123.

action requiredstring

One of: approve, decline, bill_to_organization, exclude. Example approve.

reimbursable_expense_idinteger

Single expense type id (required if reimbursable_expense_ids not provided)

Example 12.

reimbursable_expense_idsarray of integer

Bulk expense type ids (required if reimbursable_expense_id not provided)

service_provider_idstring or null

Required when multiple providers are on the work item for template expense lines; auto-inferred when only one provider is assigned

Example USR-ABC123.

decline_reasonstring or null

Required when action=decline

max length 2000. Example Not approved.

Example

JSON
{
  "affectFinancials": true,
  "work_item_type": "assignment",
  "work_item_id": "ASG-ABC123",
  "client_id": "CLT-ABC123",
  "action": "approve",
  "reimbursable_expense_id": 12,
  "reimbursable_expense_ids": [
    12
  ],
  "service_provider_id": "USR-ABC123",
  "decline_reason": "Not approved"
}

Example request

Shell
curl -X POST "https://api.fetchfido.ai/v1/finance/work-item-expense-share" \
  -H "Authorization: Bearer $FIDO_API_KEY" \
  -H "X-Tenant-ID: $FIDO_TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{"affectFinancials":true,"work_item_type":"assignment","work_item_id":"ASG-ABC123","client_id":"CLT-ABC123","action":"approve","reimbursable_expense_id":12,"reimbursable_expense_ids":[12],"service_provider_id":"USR-ABC123","decline_reason":"Not approved"}'

Try it

Responses

200 Expense share action completed

Expense share action completed

JSON
{
  "success": true,
  "message": "Expense share action completed successfully.",
  "data": {
    "reimbursable_expense_id": 12,
    "status": "approved",
    "approved_at": "2026-03-02T10:00:00+00:00",
    "approved_by": {
      "id": "USR-ABC123",
      "name": "John Doe"
    },
    "approved_share_total": 10.5,
    "declined_at": null,
    "declined_by": {
      "id": "USR-ABC123",
      "name": "John Doe"
    },
    "decline_reason": null
  }
}
Response fields (3)
FieldTypeDescription
successboolean

Example true.

messagestring

Example Expense share action completed successfully..

dataobject or object
401 Not signed in

Unauthorized

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:edit' 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:edit' scope..

errorsany or null

Null on this status.

codestring

Always empty on this status.

Example .

422 Validation failed

Validation error

JSON
{
  "status": "error",
  "message": "Unable to save. Please check the highlighted fields",
  "errors": {
    "name": [
      "Please enter a name."
    ],
    "email": [
      "The email has already been taken."
    ]
  }
}
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

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 .