Approve ticket expenses
POST/expenses/approve
Scope write:expenses_approveChanges data
Requires the write:expenses_approve scope (or management), and the staff member who made the key must be allowed to do this in the portal right now.
Parameters
Idempotency-KeyOptional. Send a unique value per intended change; a retry with the same value within 24 hours replays the first answer instead of changing anything twice. Scoped to your API key.
Request body
itemsRequiredThe expenses to approve, 25 at most.
items[].ticketIdRequiredThe ticket number the expense is on.
items[].expenseIdRequiredThe expense id.
items[].markupPctHonoured only for someone who may override the rate.
reasonRequiredWhy this destructive action is being done (recorded in the audit log with the door it came through).
Response 200
dataRequiredWhat happened to each expense.
data.resultsRequiredOne entry per expense in the call, in order.
data.results[].ticketIdRequiredThe ticket number.
data.results[].expenseIdRequiredThe expense id.
data.results[].resultRequiredWhat happened to this expense. Unchanged: it was already in that state. Duplicate: listed twice in the call.
data.results[].messageThe reason, when refused.
data.approvedRequiredHow many were approved.
data.unchangedRequiredHow many were already approved.
data.refusedRequiredHow many were refused.
Errors (400, 401, 402, 403, 404, 429)
400The body or a parameter is not valid for this operation (apiInvalidInput); the sentence names the field.401Missing or invalid API key (apiKeyRequired / apiKeyInvalid). A key also stops working, with apiKeyInvalid, when the staff member who made it is deactivated, blocked or removed.402This portal is locked for changes (a trial ended or a payment is overdue): writes are refused until it is settled; reads keep working (apiLocked).403The key may not do this (apiKeyScopeInsufficient when it lacks the required scope, apiKeyMakerInsufficient when the staff member who made it does not hold the permission now). Or its organization is inactive (apiKeyOrgInactive). Or the key is limited to one client, which is not supported yet (apiClientKeyUnsupported).404Not found for this key (a record in another organization is also a 404, never a 403).429Rate limit exceeded; wait Retry-After seconds.