> ## 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 an import template

> Use this endpoint to retrieve the product import template for Catalog Connector in either CSV or JSONL format, based on your preferred data handling method. You can open CSV template in applications, such as Excel or Google Sheets and JSONL template in text editors compatible with JSONL, such as Visual Studio Code. After filling in product data, save the template file with a unique name on your local system.



## OpenAPI

````yaml cc.openapi post /catalog-connector-templates/actions/generate
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-templates/actions/generate:
    post:
      tags:
        - Catalog Connector Files
      summary: Retrieve an import template
      description: >-
        Use this endpoint to retrieve the product import template for Catalog
        Connector in either CSV or JSONL format, based on your preferred data
        handling method. You can open CSV template in applications, such as
        Excel or Google Sheets and JSONL template in text editors compatible
        with JSONL, such as Visual Studio Code. After filling in product data,
        save the template file with a unique name on your local system.
      operationId: generateTemplate
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        $ref: '#/components/requestBodies/generateTemplateRequest'
      responses:
        '200':
          description: OK
          content:
            text/csv: {}
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestId'
        '400':
          $ref: '#/components/responses/badRequest'
        '401':
          $ref: '#/components/responses/notAuthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/notFoundError'
        '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
  requestBodies:
    generateTemplateRequest:
      content:
        application/json:
          schema:
            additionalProperties: false
            description: Template request
            required:
              - type
              - formatType
            properties:
              type:
                $ref: '#/components/schemas/productsType'
              formatType:
                $ref: '#/components/schemas/formatTypes'
  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
    notFoundError:
      description: The requested entity isn't found
      headers:
        x-fabric-request-id:
          $ref: '#/components/headers/xFabricRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/genericError'
          example:
            type: NOT_FOUND
            message: Resource not found
    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
  schemas:
    productsType:
      type: string
      enum:
        - ITEM
        - BUNDLE
      description: >-
        Specify the product type you want to import using the product import
        template you will receive from a successful response.
      example: ITEM
    formatTypes:
      type: string
      enum:
        - csv
        - jsonl
      description: Specify the file format used to upload to Catalog Connector.
      example: jsonl
    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
  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.

````