Skip to main content
POST
This endpoint requires a valid authorisation for the user. If no active authorisation exists, the request will be rejected. You can optionally pass the x-teal-authorisation-id header to specify which authorisation to use; otherwise the system will resolve a valid authorisation automatically. See Authorisations for more details.

End-to-end upload flow

Follow these steps to upload payslips programmatically:
  1. Request upload slots – call POST /payroll/entries/payslips/presign with the list of filenames (and optional external identifiers) you intend to upload. The response returns presigned_url and path fields for each file.
  2. Upload PDFs – for every returned presigned_url, perform an HTTP PUT with Content-Type: application/octet-stream, streaming the PDF bytes. Files must be searchable, machine-readable PDFs (scanned images are not supported).
  3. Submit metadata – call POST /payroll/entries/payslips (this endpoint) with a JSON payload that includes the path for each uploaded file and an optional external_document_id. Teal uses this metadata to process the uploaded documents. Any files that fail validation are listed in payslip_errors in the response.

Authorizations

Authorization
string
header
required

Bearer token for authentication. The token should be the one returned by the /user-tokens endpoint.

Headers

x-teal-authorisation-id
string<uuid>

Optional authorisation ID to associate with this request. If not provided, the system will attempt to resolve a valid authorisation for the user automatically.

Example:

"7f3b8c2a-1d4e-4f6a-8b8c-9a0b1c2d3e4f"

Body

application/json
files
object[]
required
Minimum array length: 1

Response

Created

account_id
string<uuid>
required

The id of the account

Example:

"95a0e70b-fe02-4f47-aef9-2efff279df71"

entry_id
string<uuid>
required

The id of the entry

payroll_submissions
object[]
required
authorisation_id
string<uuid> | null

The id of the authorisation that authorized this data retrieval

Example:

"7f3b8c2a-1d4e-4f6a-8b8c-9a0b1c2d3e4f"

payslip_errors
object[]

List of errors for payslips that passed validation but failed to upload