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

# Retrieve import and export history

> Use this endpoint to access files previously imported to or exported from the Catalog Connector, sorted in chronological order. You can refine the search results by using the following query parameters:
- `ids`: Provide a comma-separated list of file IDs to retrieve multiple files by their IDs. Note that pagination isn't supported when using this parameter.
- Format type (`formatType`) :  Specify the format of the file to filter files by format. The options are **CSV** or **JSONL**.
- Operation type (`type`): Use this parameter to specify whether you want imported or exported files.
- Pagination (`offset`, `limit`):  Use offset and limit parameters to refine the number of results returned.
- `sort`:  Use this parameter to view results in ascending or descending order.
If no query parameters are specified, the endpoint returns up to 10 records.




## OpenAPI

````yaml cc.openapi get /catalog-connector-files
openapi: 3.0.0
info:
  description: >-
    fabric's **Catalog Connector** API is a lightweight service that you can use
    when you have your own Product Information Management (PIM) and only want to
    integrate with other fabric services, such as Offers and OMS (excluding the
    fabric Products API service). It supports CRUD operations to add and manage
    products in the Catalog Connector based on SKU, product ID, and item ID.
    Using Catalog Connector API, you can retrieve an import template, import
    product data into the Catalog Connector, export data, and check the status
    of previous imports and exports. Additionally, you can search for products
    based on specified filter conditions and perform bulk operations to manage
    products.
  title: Catalog - Connector
  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: Catalog Connector Files
    description: >-
      Retrieve an import template, import a file to the Catalog Connector, view
      import and export status, and download a previously processed file.
  - name: Catalog Connector Jobs
    description: >-
      Export data from the Catalog Connector and retrieve the status of
      previously processed files.
  - name: General Catalog Connector Operations
    description: Search for products based on the specified filter conditions.
  - name: Catalog Connector Operations by SKU
    description: Supports product operations based on SKU.
  - name: Catalog Connector Operations by Product ID
    description: Supports product operations based on Product ID.
  - name: Catalog Connector Operations by Item ID
    description: Supports product operations based on Item ID.
externalDocs:
  description: Find out more about Catalog Connector (previously called PIM Connector)
  url: https://developer.fabric.inc/docs/products-overview
paths:
  /catalog-connector-files:
    get:
      tags:
        - Catalog Connector Files
      summary: Retrieve import and export history
      description: >
        Use this endpoint to access files previously imported to or exported
        from the Catalog Connector, sorted in chronological order. You can
        refine the search results by using the following query parameters:

        - `ids`: Provide a comma-separated list of file IDs to retrieve multiple
        files by their IDs. Note that pagination isn't supported when using this
        parameter.

        - Format type (`formatType`) :  Specify the format of the file to filter
        files by format. The options are **CSV** or **JSONL**.

        - Operation type (`type`): Use this parameter to specify whether you
        want imported or exported files.

        - Pagination (`offset`, `limit`):  Use offset and limit parameters to
        refine the number of results returned.

        - `sort`:  Use this parameter to view results in ascending or descending
        order.

        If no query parameters are specified, the endpoint returns up to 10
        records.
      operationId: getFiles
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/ids'
        - $ref: '#/components/parameters/fileName'
        - $ref: '#/components/parameters/formatTypeQueryParam'
        - $ref: '#/components/parameters/productFileType'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/sortBy'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getFilesResponse'
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/notAuthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    xFabricTenantId:
      in: header
      name: x-fabric-tenant-id
      schema:
        type: string
      required: true
      example: 5f328bf0b5f328bf0b5f328b
      description: >-
        A header retrieved from your [Copilot Account
        Details](/v3/platform/settings/account-details/getting-the-account-id)
        that's used by the API to identify the tenant making the request. Tenant
        ID must be included in the authentication header for API requests to
        access any of fabric’s endpoints.
    xFabricRequestId:
      in: header
      name: x-fabric-request-id
      description: Unique request ID
      schema:
        type: string
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
    ids:
      in: query
      name: ids
      description: >
        The 24-character system-generated file ID created using the [Create a
        File](/v3/api-reference/catalog-connector/files/create-file) endpoint.


        Depending on the type of IDs, the array represents the file IDs or job
        IDs. Specify up to 15 IDs separated by commas. Note the following
        limitations of using this parameter:
          - This parameter can't be combined with any other parameters. 
          - Pagination isn't supported when this parameter is specified.
      schema:
        type: string
      example: 5f328bf0b5f328bf0b5f328b, 1e328bf0b5f328bf0b5f3287
    fileName:
      in: query
      name: fileName
      schema:
        type: string
      description: Use this endpoint to specify the name of the file you want to retrieve.
      example: bulk_import_123345677788999.csv
    formatTypeQueryParam:
      in: query
      name: formatType
      description: >-
        Depending on the context, it represents the format of the file or
        template.
      schema:
        $ref: '#/components/schemas/formatTypes'
      example: csv
    productFileType:
      in: query
      name: type
      schema:
        $ref: '#/components/schemas/productFileJobTypes'
      description: >-
        Specify the type of operation or job performed when the file was
        uploaded.
    offset:
      in: query
      name: offset
      description: >-
        The number of records to skip before returning records. For example,
        with an offset of 20 and limit of 10, the system returns records from 21
        to 30.
      schema:
        type: integer
        format: int32
        default: 0
        example: 2
      required: false
    limit:
      in: query
      name: limit
      description: The maximum number of records per page.
      schema:
        type: integer
        format: int32
        default: 10
        example: 20
    sortBy:
      in: query
      name: sort
      description: >-
        The sorting criteria. Currently, the supported values are `updatedAt`
        and `name`. Use `-` for descending order and `+` for ascending.
      schema:
        type: string
        example: +name,-updatedAt
      required: false
  schemas:
    getFilesResponse:
      type: object
      description: >-
        The response of the `Retrieve import or export history` request, along
        with pagination data.
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/commonFileSchema'
        offset:
          description: >-
            The number of records to skip before returning records.

            For example, when the offset is 20 and limit is 10, the system
            returns the records from 21 to 30.
          type: integer
          format: int32
          default: 0
          example: 5
        limit:
          description: The maximum number of records per page.
          type: integer
          format: int32
          default: 10
          example: 10
        count:
          description: The total number of records.
          type: integer
          format: int32
          example: 100
    formatTypes:
      type: string
      enum:
        - csv
        - jsonl
      description: Specify the file format used to upload to Catalog Connector.
      example: jsonl
    productFileJobTypes:
      type: string
      enum:
        - CATALOG_CONN_ITEM_VARIANT_IMPORT
        - CATALOG_CONN_ITEM_VARIANT_EXPORT
        - CATALOG_CONN_BUNDLE_IMPORT
        - CATALOG_CONN_BUNDLE_EXPORT
      description: Specify the type of operation or job performed by uploading the file.
      example: CATALOG_CONN_ITEM_VARIANT_IMPORT
    commonFileSchema:
      type: object
      description: The details of the file.
      properties:
        id:
          type: string
          description: >-
            The 24-character system-generated file ID created using the [Create
            a File](/v3/api-reference/catalog-connector/files/create-file)
            endpoint.
          example: 857f1f77bcf86cd799439054
        type:
          $ref: '#/components/schemas/productFileJobTypes'
        name:
          type: string
          description: The name of the file to be uploaded to the AWS S3 location.
          example: bulk_import_123345677788999.csv
        locale:
          $ref: '#/components/schemas/locale'
        formatType:
          $ref: '#/components/schemas/formatTypes'
        createdAt:
          type: string
          description: The time of file creation, in UTC format.
          example: '2021-09-14T22:10:30.618Z'
        updatedBy:
          type: string
          description: The email of the user who last updated the file.
          example: test@email.com
        updatedAt:
          type: string
          description: The time of last update to the file, in UTC format.
          example: '2021-09-14T22:10:30.618Z'
    genericError:
      type: object
      description: The details of the error.
      properties:
        message:
          type: string
          description: A placeholder error message for all the 4xx, 5xx errors
          example: Request is invalid
        type:
          type: string
          description: A placeholder error type for all the 4xx, 5xx errors
          example: Bad request
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                description: The error type.
                example: CLIENT_ERROR
              message:
                type: string
                description: The error message corresponding to the `type`.
                example: Invalid request. Unable to find/create product
    locale:
      type: string
      description: >
        The language code, which is a combination of language (ISO 639 format)
        and country (ISO 3166 format).


        The default value is `en-US`.
      example: en-US
  headers:
    xFabricRequestId:
      schema:
        type: string
      required: false
      example: 263e731c-45c8-11ed-b878-0242ac120002
      description: Unique request ID
  responses:
    badRequest:
      description: Request is invalid or malformed
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/xFabricRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
    notAuthorized:
      description: The requester is unauthorized.
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/xFabricRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: UNAUTHORIZED_ERROR
            message: Requester is unauthorized
    forbidden:
      description: The user isn't allowed to perform this action.
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/xFabricRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: REQUEST_DENIED
            message: User does not have the required permission
    internalServerError:
      description: Internal server error
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/xFabricRequestId'
      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: >-
        This is the authorization token used to authenticate the request. You
        must pass the access token generated from the system app. For more
        information, see the [Making your first API
        request](/v3/api-reference/getting-started/getting-started-with-fabric-apis#procedure)
        section.

````