Travel entry statuses

A travel entry’s status shows its stage in the approval process. Whether the entry is locked or paid out is separate from status, in isLocked and paidOutDate. When the entry’s state does not allow an action below, the call returns HTTP 409 with a stable code (see Errors). An action that changes the entry triggers a webhook event (see Webhooks).

The statuses

Status Means
Draft Being written, not yet submitted.
PendingApproval Submitted and waiting for an approver. approval on the entry names the current step and its approvers.
ChangesRequested An approver sent it back to the submitter, or an approved entry was reopened. It waits to be submitted again.
Approved Fully approved. Ready for payout.
Rejected Refused by an approver. Cannot be edited or resubmitted (can still be cancelled).
Cancelled Cancelled. Final.

Whether an entry passes through PendingApproval depends on the company’s settings. If the company uses an approval workflow for the entry’s type, submitting sends the entry to the first approval step. If it does not, the entry becomes Approved as soon as it is saved or submitted and passes the company’s entry rules.

Actions and where they move an entry

Action From To Event
POST /api/v1/travel-entries (new) Draft, or Approved with no approval workflow travel_entry.created, plus travel_entry.approved when approved at once
POST /api/v1/travel-entries/{id}/submit Draft PendingApproval, or Approved with no approval workflow travel_entry.submitted, plus travel_entry.approved when approved at once
POST /api/v1/travel-entries/{id}/submit ChangesRequested PendingApproval travel_entry.submitted
POST /api/v1/travel-entries/{id}/approve PendingApproval PendingApproval at the next step; after the last step, Approved, or Draft for a trip request travel_entry.updated, or travel_entry.approved when the status becomes Approved
POST /api/v1/travel-entries/{id}/request-changes PendingApproval ChangesRequested travel_entry.returned
POST /api/v1/travel-entries/{id}/reject PendingApproval Rejected travel_entry.rejected
POST /api/v1/travel-entries/{id}/cancel any status except Cancelled Cancelled travel_entry.cancelled
POST /api/v1/travel-entries/{id}/reopen Approved, under an approval workflow ChangesRequested travel_entry.reopened
POST /api/v1/travel-entries/{id}/reassign-approver PendingApproval unchanged, another approver travel_entry.updated
POST /api/v1/travel-entries/{id}/assign-approver PendingApproval unchanged; assigns an approver to a step with no eligible approver travel_entry.updated
DELETE /api/v1/travel-entries/{id} Draft; Approved with no approval workflow (deleted) travel_entry.deleted

approve, request-changes, and reject decide the current step, so the request must use an API key belonging to one of the step’s approvers. Any other key returns HTTP 403 NOT_CURRENT_APPROVER. reassign-approver requires a key belonging to one of the current step’s approvers or a user with ManageCompanySettings; otherwise it returns HTTP 403 NOT_CURRENT_APPROVER. assign-approver requires ManageCompanySettings. A reopened entry keeps its number and restarts approval from the first step.

Editing an entry

PUT /api/v1/travel-entries/{id} and the writes to its expenses, per diems and attachments are allowed in Draft and ChangesRequested, and in Approved while the company runs no approval workflow for the entry’s type. An approved entry under a workflow answers 409 TRAVEL_ENTRY_APPROVED_IN_WORKFLOW: reopen it first. Any other status answers 409 TRAVEL_ENTRY_WRONG_STATUS.

Lock and payout

Locking is separate from status. A locked entry blocks all write operations on the entry and its expenses, per diems, and attachments regardless of status, and returns HTTP 409 TRAVEL_ENTRY_LOCKED.

Action Effect Event
POST /api/v1/travel-entries/{id}/lock isLocked becomes true. Locking a locked entry changes nothing. travel_entry.locked
POST /api/v1/travel-entries/{id}/unlock isLocked becomes false. Unlocking an unlocked entry changes nothing. An entry imported before 2023 cannot be unlocked. travel_entry.unlocked
POST /api/v1/payouts Each entry in the batch gets its paidOutDate, and is locked when the company locks entries on payout. payout.created; per entry travel_entry.paid_out, and travel_entry.locked when locked
DELETE /api/v1/payouts/{id} The batch is reversed: its entries are no longer paid out and are unlocked. payout.deleted; per locked entry travel_entry.unlocked

lock, unlock and reopen need a key whose owner holds ProcessPayouts. An entry in a payout batch cannot be cancelled, reopened or deleted (409 TRAVEL_ENTRY_IN_PAYOUT_BATCH) until it is taken out of the batch.

Trip requests

When the company authorizes trips before they happen, a new entry starts as a trip request: isRequest is true and entryNumber is empty. It goes through the same statuses. Once the trip is authorized, isRequest becomes false, the entry gets its number and becomes an order, raising travel_entry.updated. See Trip requests and deferred numbering.

History

GET /api/v1/travel-entries/{id}/workflow-history lists every step the entry took, who took it and why, oldest first. See Workflow history.