> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cadanapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Payslip Links

> Retrieve presigned download links for a payroll's payslips. Each link expires after a short window, so fetch and use them promptly.

Pass `format=zip` to receive a single presigned URL pointing to a bundled archive of all ready payslips instead of per-person links.

Payslips that are still being generated (or failed to generate) are returned under `notReady` with a `status` of `generating` or `error`. Retry the request after generation completes to receive their links.




## OpenAPI

````yaml /openapi/workforce-management.yaml get /v1/payrolls/{payrollId}/payslip-links
openapi: 3.0.0
info:
  description: APIs for interacting with Cadana Payroll Platform
  version: 1.0.0
  title: Business Workforce Management
  termsOfService: https://cadanapay.com/terms-and-conditions
  contact:
    email: api@cadanapay.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.cadanapay.com
    description: Prod Server
  - url: https://dev-api.cadanapay.com
    description: Dev Server
security:
  - Authorization: []
tags:
  - name: Custom Auth
    description: APIs for interacting with Custom Authentication
  - name: Persons
    description: APIs for interacting with the HR module
  - name: Milestones
    description: APIs for milestone-based contractor pay
  - name: Instant Pay
    description: APIs for interacting with Instant Pay functionality
  - name: Users
    description: APIs for interacting with employee/contractor Cadana accounts
  - name: Files
    description: APIs for interacting with file uploads
  - name: Payrolls
    description: APIs for interacting with Payroll
  - name: Platform
    description: Platform APIs for interacting with businesses
  - name: Businesses
    description: APIs for interacting with Business
  - name: Contracts
    description: APIs for interacting with contracts
  - name: Sandbox
    description: APIs for relevant sandbox simulations
  - name: Invoices
    description: APIs for interacting with invoices
  - name: Reimbursements
    description: APIs for interacting with reimbursements
  - name: Entities
    description: >-
      APIs for managing legal sub-entities (subsidiaries, branches) under a
      parent business
paths:
  /v1/payrolls/{payrollId}/payslip-links:
    get:
      tags:
        - Payrolls
      summary: Get Payslip Links
      description: >
        Retrieve presigned download links for a payroll's payslips. Each link
        expires after a short window, so fetch and use them promptly.


        Pass `format=zip` to receive a single presigned URL pointing to a
        bundled archive of all ready payslips instead of per-person links.


        Payslips that are still being generated (or failed to generate) are
        returned under `notReady` with a `status` of `generating` or `error`.
        Retry the request after generation completes to receive their links.
      operationId: getPayrollPayslipLinks
      parameters:
        - $ref: '#/components/parameters/payrollId'
        - $ref: '#/components/parameters/XMultiTenantKey'
        - in: query
          name: format
          required: false
          schema:
            type: string
            enum:
              - zip
          description: >-
            When set to `zip`, ready payslips are bundled into a single archive
            and returned as one presigned URL via `zipUrl`. Omit for per-person
            links under `links`.
      responses:
        '200':
          $ref: '#/components/responses/GetPayslipLinksResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - Authorization: []
components:
  parameters:
    payrollId:
      name: payrollId
      in: path
      description: The unique identifier for the payroll
      required: true
      schema:
        type: string
        format: uuid
    XMultiTenantKey:
      name: X-MultiTenantKey
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required when using a Platform API token. The tenant key identifying
        which business to operate on.
  responses:
    GetPayslipLinksResponse:
      description: >
        Presigned download links for the payroll's payslips. Returns per-person
        links under `links` by default, or a single bundled archive under
        `zipUrl` when `format=zip` was requested. Payslips still generating (or
        failed) are listed under `notReady`.
      content:
        application/json:
          schema:
            type: object
            properties:
              payrollId:
                $ref: '#/components/schemas/uuid'
              links:
                type: array
                description: >-
                  Per-person presigned download URLs. Returned when `format` is
                  omitted. All links share the same `expiresAt`.
                items:
                  type: object
                  properties:
                    personId:
                      $ref: '#/components/schemas/uuid'
                    personName:
                      type: string
                      example: Jane Doe
                    paystubId:
                      $ref: '#/components/schemas/uuid'
                    url:
                      type: string
                      format: uri
                      description: Presigned URL to download this person's payslip PDF.
                      example: >-
                        https://example-bucket.s3.amazonaws.com/payslips/8ef9a712.pdf?X-Amz-Signature=...
                    expiresAt:
                      type: string
                      format: date-time
                      description: ISO-8601 timestamp at which the URL stops working.
                      example: '2026-05-11T17:00:00Z'
              zipUrl:
                type: string
                format: uri
                description: >-
                  Presigned URL pointing to a single archive containing all
                  ready payslips. Returned only when `format=zip` was passed.
                example: >-
                  https://example-bucket.s3.amazonaws.com/payslips/zips/7c4f1d36.zip?X-Amz-Signature=...
              expiresAt:
                type: string
                format: date-time
                description: >-
                  ISO-8601 expiry of `zipUrl`. Returned only when `format=zip`
                  was passed.
                example: '2026-05-11T17:00:00Z'
              notReady:
                type: array
                description: >-
                  Payslips that could not be linked. `generating` means the PDF
                  has not finished rendering yet; `error` means generation or
                  link creation failed. Retry the request after generation
                  completes.
                items:
                  type: object
                  properties:
                    personId:
                      $ref: '#/components/schemas/uuid'
                    status:
                      type: string
                      enum:
                        - generating
                        - error
          examples:
            perPersonLinks:
              summary: Default response with per-person links
              value:
                payrollId: 7c4f1d36-2b9a-4bca-91e7-2b1f1e6e7c11
                links:
                  - personId: 04a8977d-5d99-4b28-8de4-8161401ca3fa
                    personName: Jane Doe
                    paystubId: 1b2e3f4a-5c6d-7e8f-9012-345678901234
                    url: >-
                      https://example-bucket.s3.amazonaws.com/payslips/04a8977d.pdf?X-Amz-Signature=...
                    expiresAt: '2026-05-11T17:00:00Z'
                  - personId: 11111111-2222-3333-4444-555555555555
                    personName: John Smith
                    paystubId: 2c3d4e5f-6a7b-8c9d-0e1f-234567890123
                    url: >-
                      https://example-bucket.s3.amazonaws.com/payslips/11111111.pdf?X-Amz-Signature=...
                    expiresAt: '2026-05-11T17:00:00Z'
                notReady:
                  - personId: 22222222-3333-4444-5555-666666666666
                    status: generating
            zipBundle:
              summary: Bundled archive response (`format=zip`)
              value:
                payrollId: 7c4f1d36-2b9a-4bca-91e7-2b1f1e6e7c11
                zipUrl: >-
                  https://example-bucket.s3.amazonaws.com/payslips/zips/7c4f1d36.zip?X-Amz-Signature=...
                expiresAt: '2026-05-11T17:00:00Z'
                notReady: []
    BadRequestError:
      description: Bad input provided by client
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    NotFoundError:
      description: Requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    InternalError:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
  schemas:
    uuid:
      type: string
      format: uuid
      example: 8ef9a712-cdae-4110-b1ea-9ba95abbee6e
    BadRequestError:
      description: Bad input provided by client
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            params:
              description: A map for meta data around the error that occurred
              type: object
      example:
        code: invalid_request_body
        message: The request body provided is not valid
        params:
          field: Value is invalid.
    NotFoundError:
      description: Not Found
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: resource_not_found
        message: Requested resource could not be found.
    InternalError:
      description: Internal server error
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: internal_error
        message: An unexpected error occurred. Please try again later.
    Error:
      type: object
      properties:
        code:
          description: A machine parsable error code
          type: string
          enum:
            - invalid_request_body
            - resource_not_found
            - forbidden
            - internal_error
        message:
          description: A human readable message describing the error
          type: string
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````