Payroll
Payslips upload
Uploading payslips is a three-step flow:
- Request upload slots with
POST /payroll/entries/payslips/presign, providing each PDF file name (and optional external identifier). The response includespresigned_urlandpathvalues for every requested file. - Upload the PDF content to every
presigned_urlusing an HTTPPUTrequest withContent-Type: application/octet-stream. Each file must be a searchable, machine-readable PDF (scanned images are not supported). - Call this endpoint with the JSON payload returned in step one,
echoing the
path(and optionalexternal_document_id) for every uploaded file so Teal can process the documents. Thepathvalues you submit must match the ones returned by the presign step. Any files that failed validation or upload are reported in thepayslip_errorsarray.
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:- Request upload slots – call
POST /payroll/entries/payslips/presignwith the list of filenames (and optional external identifiers) you intend to upload. The response returnspresigned_urlandpathfields for each file. - Upload PDFs – for every returned
presigned_url, perform an HTTPPUTwithContent-Type: application/octet-stream, streaming the PDF bytes. Files must be searchable, machine-readable PDFs (scanned images are not supported). - Submit metadata – call
POST /payroll/entries/payslips(this endpoint) with a JSON payload that includes thepathfor each uploaded file and an optionalexternal_document_id. Teal uses this metadata to process the uploaded documents. Any files that fail validation are listed inpayslip_errorsin the response.
Authorizations
Bearer token for authentication. The token should be the one returned by the /user-tokens endpoint.
Headers
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-5f6g-7h8i-9j0k1l2m3n4o"
Body
application/json
Minimum array length:
1Response
Created
The id of the account
Example:
"95a0e70b-fe02-4f47-aef9-2efff279df71"
The id of the entry
The id of the authorisation that authorized this data retrieval
Example:
"7f3b8c2a-1d4e-5f6g-7h8i-9j0k1l2m3n4o"
List of errors for payslips that passed validation but failed to upload