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
| Field | Type | Description |
|---|---|---|
affectFinancials | boolean 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 required | string | One of: |
work_item_id required | string | Example |
client_id required | string | Example |
action required | string | One of: |
reimbursable_expense_id | integer | Single expense type id (required if reimbursable_expense_ids not provided) Example |
reimbursable_expense_ids | array of integer | Bulk expense type ids (required if reimbursable_expense_id not provided) |
service_provider_id | string or null | Required when multiple providers are on the work item for template expense lines; auto-inferred when only one provider is assigned Example |
decline_reason | string or null | Required when action=decline max length 2000. Example |
Example
{
"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
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
{
"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)
| Field | Type | Description |
|---|---|---|
success | boolean | Example |
message | string | Example |
data | object or object |
401 Not signed in
Unauthorized
{
"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:edit' 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 |
422 Validation failed
Validation error
{
"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.
{
"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
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 |