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

# Download exported CSV file

> This endpoint lets you generate a URL, using fileId, from which you can download the exported CSV file. The generated URL expires in five mins.



## OpenAPI

````yaml exports-offers.openapi post /offers-exports/actions/download-export-file
openapi: 3.0.0
info:
  title: Offers - Exports
  description: >-
    fabric Export endpoints let you export data to CSV files based on the
    provided filters.
  version: 3.0.0
  x-audience: external-public
  termsOfService: https://fabric.inc/terms-of-use
  contact:
    name: Offers support
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
servers:
  - url: https://api.fabric.inc/v3
    description: Production environment
security: []
externalDocs:
  description: Find out more about Offers
  url: https://developer.fabric.inc/docs/offers-overview
paths:
  /offers-exports/actions/download-export-file:
    post:
      tags:
        - Exports
      summary: Download exported CSV file
      description: >-
        This endpoint lets you generate a URL, using fileId, from which you can
        download the exported CSV file. The generated URL expires in five mins.
      operationId: downloadExport
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xClientId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/downloadExportUrl'
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/downloadExportUrlResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/fileExpiredError'
                  - $ref: '#/components/schemas/invalidFileIdError'
                  - $ref: '#/components/schemas/missingTenantHeader'
                  - $ref: '#/components/schemas/error400'
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error401'
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error500'
      security:
        - AuthorizationToken: []
components:
  parameters:
    xFabricTenantId:
      in: header
      name: x-fabric-tenant-id
      schema:
        type: string
        minLength: 24
        maxLength: 24
      required: true
      example: 5f328bf0b5f328bf0b5f328b
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
    xFabricChannelId:
      in: header
      name: x-fabric-channel-id
      schema:
        type: string
        example: '12'
      description: The sales channel ID.
    xClientId:
      in: header
      name: x-client-id
      schema:
        type: string
      required: false
      example: copilot
      description: >-
        A unique identifier obtained from
        [Copilot](/v3/platform/settings/api-apps/getting-system-app-credentials)
        for the System app in the fabric ecosystem, essential for OpenID Connect
        authentication flows.
    xFabricRequestId:
      in: header
      name: x-fabric-request-id
      description: A unique request ID.
      required: false
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  schemas:
    downloadExportUrl:
      type: object
      description: The downloadable URL of the file.
      required:
        - fileId
      properties:
        fileId:
          type: string
          description: >-
            The `fileId` value retrieved from the [get export request by
            ID](/v3/api-reference/offers/exports/get-export-request-by-id)
            endpoint. This is used to download the exported CSV.
          example: redemption/tenantId/1687472972-redemption-export.csv
    downloadExportUrlResponse:
      type: object
      description: The URL of the downloadable CSV.
      required:
        - url
        - fileId
      properties:
        url:
          type: string
          description: The AWS S3 URL to download the exported CSV.
          example: >-
            https://bucket-name.s3.amazonaws.com/redemption/tenantId/1687472972-redemption-export.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA26KLJWUAPER5A
        fileId:
          type: string
          description: The S3 `fileId` value to generate a downloadable CSV.
          example: redemption/tenantId/1687472972-redemption-export.csv
    fileExpiredError:
      type: object
      description: File expired error
      properties:
        type:
          description: The error code.
          type: string
          example: FILE_EXPIRED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Exported file has expired
    invalidFileIdError:
      type: object
      description: Invalid fileId error
      properties:
        type:
          description: The error code.
          type: string
          example: INVALID_FILE_ID
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: fileId isn't valid
    missingTenantHeader:
      type: object
      description: Tenant header is missing
      properties:
        type:
          description: The error code.
          type: string
          example: TENANT_HEADER_REQUIRED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: x-fabric-tenant-id header is required
    error400:
      type: object
      description: Bad request error
      properties:
        type:
          description: The error code.
          type: string
          example: BAD_REQUEST
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Bad request
    error401:
      type: object
      description: Unauthorized error
      properties:
        type:
          description: The error code.
          type: string
          example: UNAUTHORIZED
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Invalid credentials
    error500:
      type: object
      description: Internal server error
      properties:
        type:
          description: The error code.
          type: string
          example: INTERNAL_SERVER_ERROR
        message:
          description: An error message corresponding to the `type`.
          type: string
          example: Internal server error
  headers:
    xFabricRequestIdResponse:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  securitySchemes:
    AuthorizationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````