Create expense claim

Creates a draft expense claim for an employee or a related party (a director or shareholder) in the credential-bound company: money they spent for the company, to be paid back. Approving it (expenseClaim.approve) is a separate action that posts it. Each line names the expense account it posts to by account_id (the chart-of-accounts id from the chart of accounts list: use it when the account has no code) or by account_code, and its purchase or no-VAT tax rule by tax_rule_id (the id from the tax rules list) or by tax_code; when both of a pair are sent they must name the same record. The tax rate always comes from the tax rule. The account must be an active expense account or, when the company limits the accounts claims may use, one of expenseClaim.settings.show allowed_account_ids (of any type); never a heading or a control account. An account_id that is not is refused with 422 expense_claim_line_account_unavailable, and a tax_rule_id that is not a purchase or no-VAT tax rule with 422 expense_claim_line_tax_rule_unavailable, naming the line in error.fields. Idempotency-Key is required and stores the terminal response for 24 hours. Requires the expense-claims:write OAuth scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Fields accepted to create expense claim. The schema identifies required and optional values.

string
enum
required
Allowed:
uuid
required
string
enum
Allowed:
uuid | null
number | null
≤ 99999
number | null
≤ 100
string
required
length ≤ 255
date
required
date | null
string | null
string
enum
required
Allowed:
uuid
required
line_items
array of objects
required
length between 1 and 100
line_items*
Headers
string
required
length ≤ 191

Required unique key whose request hash and terminal response are stored durably for 24 hours.

Responses

Language
Credentials
OAuth2
Missing 1 required scope
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*