> ## 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.

# Initiate Job to Export Items and Variants

> Use this endpoint to trigger a job to export items and variants, by ids.



## OpenAPI

````yaml files-jobs.openapi post /product-jobs/actions/export
openapi: 3.0.0
info:
  description: >-
    fabric's **Files** and **Jobs** APIs support bulk import and export of
    items, attributes, and bundles. To begin with importing, download the
    appropriate template for the specific `type` of import. A standardized
    template ensures consistency in data structure and formatting. It also helps
    enforce data validation rules to ensure imported data meets the specified
    criteria and reduces the chance of incorrect and inaccurate information.
    Once you have completed filling out the import details in the template, add
    the file name and `type` in the request body of the `POST /files/product`
    endpoint. The response will provide you with the URL where you can upload
    the file for importing. After successfully importing the file, you can use
    the job exports endpoints to export the imported products and attributes
    based on specified criteria.
  title: Products - Files and Jobs
  version: 3.0.0
  x-audience: external-public
  contact:
    email: support@fabric.inc
    name: Product team
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
servers:
  - url: https://api.fabric.inc/v3
    description: Production URL
security:
  - authorization: []
tags:
  - name: Files
    description: >-
      Files endpoints interact with the file object, which is associated with
      (and points to) a job.
  - name: Jobs
    description: >-
      Bulk import of attributes must be in a standardized format. This endpoint
      gets the template required to bulk import attributes.
externalDocs:
  description: Find out more about Products (previously called PIM)
  url: https://developer.fabric.inc/docs/products-overview
paths:
  /product-jobs/actions/export:
    post:
      tags:
        - Jobs
      summary: Initiate Job to Export Items and Variants
      description: Use this endpoint to trigger a job to export items and variants, by ids.
      operationId: exportProductsJob
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
      requestBody:
        $ref: '#/components/requestBodies/exportBasedOnIDJobRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/jobIdResponse'
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/x-fabric-request-id-header'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/notAuthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    x-fabric-tenant-id:
      name: x-fabric-tenant-id
      in: header
      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.
      schema:
        type: string
        example: 517fa9dfd42d8b00g1o3k312
    x-fabric-request-id:
      name: x-fabric-request-id
      in: header
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
  requestBodies:
    exportBasedOnIDJobRequest:
      content:
        application/json:
          schema:
            type: object
            description: Export based on ID
            anyOf:
              - $ref: '#/components/schemas/exportIDJobRequest'
              - $ref: '#/components/schemas/productExportJobRequest'
          examples:
            AttributeExport:
              value:
                type: ATTRIBUTE
                ids:
                  - 5f328bf0b5f328bf0b5f328b
                locale: en-US
            ProductExport:
              value:
                type: ITEM_VARIANT
                ids:
                  - 22328bf0b5f328bf0b5f3287
                statuses: LIVE,DRAFT
                locale: en-US
  schemas:
    jobIdResponse:
      type: object
      description: Job ID for the exported job
      properties:
        jobId:
          type: string
          description: 24-character system-generated job ID
          example: 877f1f77bcf86cd799439087
    exportIDJobRequest:
      type: object
      additionalProperties: false
      description: Export job based on ID
      required:
        - ids
        - type
      properties:
        type:
          type: string
          description: >-
            Type of entity to be exported, such as attributes, categories, or
            collections
          enum:
            - ATTRIBUTE
            - CATEGORY
            - COLLECTION
          example: ATTRIBUTE
        ids:
          type: array
          minItems: 1
          items:
            type: string
            description: >-
              IDs of categories, collections or attributes that needs to be
              exported
          example:
            - 5f328bf0b5f328bf0b5f328b
            - 22328bf0b5f328bf0b5f3287
        locale:
          $ref: '#/components/schemas/locale'
    productExportJobRequest:
      type: object
      additionalProperties: false
      description: Export based on IDs and type
      required:
        - ids
        - type
      properties:
        type:
          type: string
          description: >-
            Type of entity to be exported, such as item, item variants, or
            bundle
          enum:
            - ITEM_VARIANT
            - BUNDLE
          example: ITEM_VARIANT
        ids:
          type: array
          minItems: 1
          items:
            type: string
            description: IDs for items, variants, or bundles that needs to be exported
          example:
            - 5f328bf0b5f328bf0b5f328b 22328bf0b5f328bf0b5f3287
        statuses:
          type: string
          description: >-
            Specify the product status either individually or as comma-separated
            values. Comma-separated values are used to indicate the preferred
            order of operation <br />1. When the status is DRAFT, the operation
            applies to Draft version, if it's available. <br />2. When the
            status is LIVE, the operation applies to Live version, if it's
            available. <br />3. For LIVE, DRAFT status, the priority is given to
            Live version, if it's available; otherwise, Draft version is
            considered. <br />4. When the status is DRAFT, LIVE, the priority is
            given to Draft version if it's available; otherwise, Live version is
            considered.
          example: LIVE, DRAFT
          default: LIVE, DRAFT
        locale:
          $ref: '#/components/schemas/locale'
    genericError:
      type: object
      description: Error details
      properties:
        message:
          type: string
          description: Placeholder error message for all the 4xx, 5xx errors
          example: Request is invalid
        type:
          type: string
          description: Placeholder error type for all the 4xx, 5xx errors
          example: Bad request
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: Error type
                example: CLIENT_ERROR
              message:
                type: string
                description: Error message
                example: Invalid request. Unable to find/create product
    locale:
      type: string
      description: >-
        If `isLocalizable` is true, the search is based on the localized name in
        specified locales. If `isLocalizable` is false, the search is only based
        on the non-localized names.
      example: en-US
  headers:
    x-fabric-request-id-header:
      description: Unique request ID
      schema:
        type: string
        example: 263e731c-45c8-11ed-b878-0242ac120002
  responses:
    badRequest:
      description: Request is invalid or malformed
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
    notAuthorized:
      description: Requester is unauthorized
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: UNAUTHORIZED_ERROR
            message: Requester is unauthorized
    forbidden:
      description: User isn't allowed to perform the action
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: REQUEST_DENIED
            message: User doesn't have the required permission
    internalServerError:
      description: Internal server error
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/x-fabric-request-id-header'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: SERVER_ERROR
            message: Internal Server Error
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: S2S access token (JWT) from fabric Identity service (during login)

````