Perform an action on several expense reports
Performs the action given by the action query parameter on the expense reports listed in the request body. Every action is all or nothing: the whole batch is validated before anything happens, so a 4xx always means nothing was sent, paid, reminded or moved. The reverse does not hold, a 200 does not mean every requested report was processed - setPaid answers 200 with missingBankAccountNumber when nothing was paid, and sendApproverReminders answers 200 after skipping the reports that are not waiting for an approver. In both cases the response body says what actually happened, so compare it against what you requested.
send sends the batch to its recipient. Reports that are not in a status the recipient accepts come back in invalidReports with a 400. On success the batch is handed to a send job and its id is returned in jobIds.
setPaid marks the reports as paid and optionally sends a payment basis mail with a combined payment basis PDF and a payment file. Reports in a status that can not be paid come back in invalidReports with a 400. Report owners without a bank account number are returned in missingBankAccountNumber with a 200, so that the caller can show the affected owners.
sendApproverReminders reminds the approvers that still have these reports on their todo list. Reports that are not in APPROVAL or APPROVAL_CANDIDATE are skipped, and the ids a reminder was actually sent for come back in expenseReportIds.
setStatus changes the status of the reports and/or moves them to another recipient. It is a collection level action rather than repeated single report calls because moving several reports is not the same operation as moving one report several times: it always writes the change log, always moves the send chain step, and can move reports to another recipient without changing their status. Use PUT /organizations/{organizationId}/reports/{reportId}?action=setStatus for a single report.
moveToNextStep moves reports that are in TRANSFER or TRANSFER_TO_RECIPIENT to the next step of their send chain. Reports that can not be moved come back in invalidReports with a 400. Restricted to the developer role.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the organization. String, UUID format (32-character hexadecimal). Required. UUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$"05b8daba9ba14a49846fe77883248cf0"
Query Parameters
Action to perform on the expense reports listed in the request body. String, enum. Required. Accepted values: send, setPaid, sendApproverReminders, setStatus, moveToNextStep. moveToNextStep is restricted to the developer role.
send, setPaid, sendApproverReminders, setStatus, moveToNextStep Body
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Request body for the send action on the reports collection. Sends the listed reports as one batch: every report is validated first, nothing is sent unless all of them can be sent, and the batch becomes a single send job.
The expense reports to send. Array of strings, UUID format (32-character hexadecimal), 1-100 items. Required.
1 - 100 elementsUUID without dashes (32-character hex string)
^[0-9a-fA-F]{32}$Booking date for the batch. String, format yyyy-MM-dd'T'HH:mm:ssZ. Optional, defaults to the time the request is handled.
Recipient the batch is sent to. String, UUID format (32-character hexadecimal). Optional, but the pre-check that every report is in a status the recipient accepts only runs when it is given.
Response
The action was carried out, with two documented exceptions. A setPaid where a report owner has no bank account number answers 200 with missingBankAccountNumber filled in and nothing was paid, mirroring the legacy setpaid endpoint where only invalidReports turns the response into a 400. A sendApproverReminders answers 200 with only the ids a reminder was actually sent for, the reports that were not waiting for an approver are left out.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Result of the batch send action. Nothing is sent when invalidReports is non-empty, and the response status is 400 in that case.
The reports that were handed to the send job. Empty when nothing was sent.
Reports that are not in a status the recipient accepts, which is why nothing was sent.
Identifiers of the send jobs the batch became, for following their progress. Normally one, but a recipient configured to take each report separately turns the batch into one job per report. Array of strings, empty when nothing was sent.

