API Docs / Operations / Invoices / Import Timesheets

Import Timesheets

POST /tenants/{tenant}/purchase-invoices/timesheets

Imports the selected rows of a timesheet CSV (multipart/form-data: the file as 'file' and 'selections', a JSON array of { rowId } from the analysis). The file is analysed again and each selected row creates a purchase invoice (firing invoice.created, as any create) and, when the row has a payment date, a payment for its full payment amount; one bad row never aborts the rest, and a selected row with a skip reason fails with that reason. A file with no rows, not CSV, or no selection is 400.

Parameters

NameTypeDescription
tenant* path string

The tenant code (the organisation's URL stub)

The tenant code (the organisation's URL stub)

Request Body*

multipart/form-data •
{
  "file": "string",
  "selections": "string"
}

Responses

400 Bad Request
application/problem+json
401 Unauthorized – Invalid or missing API key
403 Forbidden
application/problem+json