Skip to main content
POST
/
payroll
/
entries
/
payslips
/
presign
curl --request POST \
  --url https://api.sandbox.goteal.co/payroll/entries/payslips/presign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "files": [
      {"file_name": "payslip1.pdf", "external_id": "ext-jan-2024"},
      {"file_name": "payslip2.pdf"}
    ]
  }'
{
  "presigned_urls": [
    {
      "file_name": "payslip1.pdf",
      "external_id": "ext-jan-2024",
      "presigned_url": "https://s3.amazonaws.com/bucket/presigned-uploads/payslip1.pdf?signature=abc123",
      "path": "client/acct123/users/user456/payslip1.pdf"
    },
    {
      "file_name": "payslip2.pdf",
      "presigned_url": "https://s3.amazonaws.com/bucket/presigned-uploads/payslip2.pdf?signature=def456",
      "path": "client/acct123/users/user456/payslip2.pdf"
    }
  ]
}
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.
Request short-lived URLs to upload payslip PDFs directly to Teal managed storage. Use the returned presigned_url values with HTTP PUT, then call POST /payroll/entries/payslips to submit the uploaded documents for processing.
curl --request POST \
  --url https://api.sandbox.goteal.co/payroll/entries/payslips/presign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "files": [
      {"file_name": "payslip1.pdf", "external_id": "ext-jan-2024"},
      {"file_name": "payslip2.pdf"}
    ]
  }'
{
  "presigned_urls": [
    {
      "file_name": "payslip1.pdf",
      "external_id": "ext-jan-2024",
      "presigned_url": "https://s3.amazonaws.com/bucket/presigned-uploads/payslip1.pdf?signature=abc123",
      "path": "client/acct123/users/user456/payslip1.pdf"
    },
    {
      "file_name": "payslip2.pdf",
      "presigned_url": "https://s3.amazonaws.com/bucket/presigned-uploads/payslip2.pdf?signature=def456",
      "path": "client/acct123/users/user456/payslip2.pdf"
    }
  ]
}

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-5f6g-7h8i-9j0k1l2m3n4o"

Body

application/json
files
object[]
required

Payslip files that require presigned upload URLs

Minimum array length: 1

Response

Presigned URLs generated successfully

presigned_urls
object[]
required

Generated URLs and metadata for uploading the requested files.