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

# Get one of the organisation's employee exports

> Needs permission employee:export.

Where it stands, who started it (`requestedBy`) and, once completed, a link to the file that works for 12 hours; ask again for a fresh one. Everybody who can export employees in the organisation sees its exports. The link goes to whoever started the export, or to somebody whose role reads every column the file holds; anyone else gets `downloadUnavailable` instead.



## OpenAPI

````yaml /api-reference/specs/pay-api.yaml get /employees/exports/{exportId}
openapi: 3.0.3
info:
  title: FlowPayroll API
  description: >-
    API for payroll management, including payroll upload, lock, HMRC submission,
    employee management
  version: 0.1.0
servers:
  - url: https://api.sandbox.flowpayroll.ai/v1
security:
  - XAuthToken: []
    XOrgId: []
tags:
  - name: Employees
    description: >-
      Create, retrieve, update, and delete employee records, and look them up by
      NI number or payroll ID.
  - name: Starters & leavers
    description: Set and clear starter and leaver details, individually or in bulk.
  - name: Tax codes
    description: >-
      Manage employee tax codes and query the effective tax code and NI category
      on a given date.
  - name: NI & identifiers
    description: Manage NI categories, National Insurance numbers, and payroll IDs.
  - name: Student loans
    description: Start and end student and postgraduate loans.
  - name: Payroll setup
    description: Assign an employee's payroll config and set opening balances.
  - name: Salary
    description: >-
      The employee's effective-dated annual salary history: read it, add or
      correct a version from a date, and remove one. The Salary API pro-rates
      this history onto each pay run.
  - name: Payroll
  - name: Payroll lines
  - name: PayrollConfig
  - name: Pay Elements
  - name: Calculator
  - name: Payslip
  - name: RTI
  - name: YearEnd
  - name: Organisation
paths:
  /employees/exports/{exportId}:
    get:
      tags:
        - Employees
      summary: Get one of the organisation's employee exports
      description: >-
        Needs permission employee:export.


        Where it stands, who started it (`requestedBy`) and, once completed, a
        link to the file that works for 12 hours; ask again for a fresh one.
        Everybody who can export employees in the organisation sees its exports.
        The link goes to whoever started the export, or to somebody whose role
        reads every column the file holds; anyone else gets
        `downloadUnavailable` instead.
      operationId: GetEmployeeExport
      parameters:
        - name: exportId
          in: path
          required: true
          schema:
            type: string
          description: The export.
        - $ref: '#/components/parameters/Request-Id'
      responses:
        '200':
          description: Export found
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - $ref: '#/components/schemas/ResponseBody'
                  - properties:
                      content:
                        type: object
                        properties:
                          data:
                            $ref: '#/components/schemas/EmployeeExportDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '404':
          description: No such export in this organisation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '500':
          description: An internal server error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseBody'
components:
  parameters:
    Request-Id:
      name: Request-Id
      in: header
      required: false
      description: >-
        Optional. Your id for this request: it is carried into every log line
        about it, so quote it when you contact support.
      schema:
        type: string
  schemas:
    ResponseBody:
      type: object
      required:
        - message
      properties:
        message:
          $ref: '#/components/schemas/MessageWithTokenResponse'
          description: >-
            A readable message about the outcome and a stable token a client can
            branch on.
        content:
          type: object
          required:
            - metadata
          properties:
            data:
              description: >-
                The resource or list the request asked for; left out when there
                is none.
            metadata:
              type: object
              required:
                - dateFormat
                - dateTimeFormat
              properties:
                dateFormat:
                  type: string
                  description: The format of the dates in this response, yyyy-MM-dd.
                dateTimeFormat:
                  type: string
                  description: >-
                    The format of the timestamps in this response,
                    yyyy-MM-ddTHH:mm:ss.fffZ in UTC.
                paginationToken:
                  type: string
                  nullable: true
                  description: >-
                    Send this value back as the paginationToken query parameter
                    to get the next page; absent when there are no more pages.
              description: >-
                The date formats the response uses and, on a paged list, the
                token for the next page.
          description: >-
            The data the request returns with its metadata; left out on a
            response that carries no data, such as most errors.
        validationIssues:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
          nullable: true
          description: >-
            Each field the request was refused for and why; left out when the
            request was not refused for its fields.
    EmployeeExportDto:
      type: object
      description: >-
        An employee export of the organisation. Everybody who can export
        employees there sees it; the file goes to whoever started it, or to
        somebody whose role reads every column it holds.
      required:
        - exportId
        - status
        - requestedAt
      properties:
        exportId:
          type: string
          description: The export.
          example: 01JD8Y7Q3N4M5P6R7S8T9V0W1X
        status:
          type: string
          enum:
            - Queued
            - Running
            - Completed
            - Failed
          description: Where it stands.
          example: Completed
        rowCount:
          type: integer
          format: int64
          nullable: true
          description: How many employees the file holds, once completed.
          example: 6000
        downloadUrl:
          type: string
          nullable: true
          description: >-
            A link to the file, once completed. It works for 12 hours; ask again
            for a fresh one.
          example: https://files.flowpayroll.ai/files/report/exports/...
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: When the link stops working.
          example: '2026-11-06T22:00:00Z'
        error:
          type: string
          nullable: true
          description: Why it failed.
          example: niDetails.nationalInsuranceNumber is not a field this caller reads.
        requestedAt:
          type: string
          format: date-time
          description: When it was asked for.
          example: '2026-11-06T10:00:00Z'
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: When it finished.
          example: '2026-11-06T10:00:12Z'
        requestedBy:
          type: string
          nullable: true
          description: >-
            Who started it: a person's or an API token's principal id, the id
            the users and API tokens routes take.
          example: USER#01JD8Y7Q3N4M5P6R7S8T9V0W1Y
        downloadUnavailable:
          type: string
          nullable: true
          description: >-
            Why there is no `downloadUrl` for you although the file is ready: it
            holds columns your role cannot read.
          example: >-
            This file has columns your role can't see. Ask whoever exported it,
            or export the columns you can see.
    MessageWithTokenResponse:
      type: object
      required:
        - text
        - token
      properties:
        text:
          type: string
          description: The message in English, ready to show to a user.
        token:
          type: string
          description: >-
            A stable snake_case key for the message, so a client can show its
            own wording or a translation instead of text.
        tokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
          description: >-
            Values to fill into the client's own wording for token, such as the
            request id; absent when the message has none.
    ValidationIssue:
      type: object
      description: >-
        Field validation item. `reasonToken` is a stable snake_case key for i18n
        or custom client messages; `reason` is the default English text from the
        API.
      required:
        - field
        - reason
        - reasonToken
      properties:
        field:
          type: string
          description: Dot-path of the field (e.g. name.firstName, address.line1).
        reason:
          type: string
          description: Default human-readable message.
        reasonToken:
          type: string
          description: Machine-readable error identifier (snake_case).
        reasonTokenArguments:
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssueArgument'
          nullable: true
          description: >-
            Values to fill into the client's own wording for reasonToken; absent
            when the reason has none.
    ValidationIssueArgument:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: The name of the value, as a client's wording refers to it.
        value:
          description: The value itself, as a string, number or other JSON value.
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Access token obtained from OAuth2 client credentials flow
    XOrgId:
      type: apiKey
      in: header
      name: X-Org-Id
      description: >-
        Organisation to scope the request to. Required when the principal can
        access more than one organisation; optional for single-organisation
        principals (the authorizer resolves it automatically).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.