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

# Get Jobs Related to Products

> Get a paginated list of jobs related to products by specifying the query parameters such as job `ids`, `type`. You can refine the results by specifying `offset` and `limit`. **Note**: <br /> 1. Query parameter `ids` can't be combined with the rest of the query parameters and when it's specified, pagination isn't supported. <br /> 2. Query parameter `inputFileIds` supports up to 15 comma-separated file IDs and it can be combined only with the query parameter `lastJobOnly`. Pagination isn't supported when this parameter is used.



## OpenAPI

````yaml files-jobs.openapi get /product-jobs
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:
    get:
      tags:
        - Jobs
      summary: Get Jobs Related to Products
      description: >-
        Get a paginated list of jobs related to products by specifying the query
        parameters such as job `ids`, `type`. You can refine the results by
        specifying `offset` and `limit`. **Note**: <br /> 1. Query parameter
        `ids` can't be combined with the rest of the query parameters and when
        it's specified, pagination isn't supported. <br /> 2. Query parameter
        `inputFileIds` supports up to 15 comma-separated file IDs and it can be
        combined only with the query parameter `lastJobOnly`. Pagination isn't
        supported when this parameter is used.
      operationId: getJobs
      parameters:
        - $ref: '#/components/parameters/x-fabric-tenant-id'
        - $ref: '#/components/parameters/x-fabric-request-id'
        - $ref: '#/components/parameters/ids'
        - $ref: '#/components/parameters/type'
        - $ref: '#/components/parameters/inputFileIds'
        - $ref: '#/components/parameters/lastJobOnly'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/jobs'
          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
    ids:
      in: query
      name: ids
      description: >-
        Supports up to 15 comma-separated job IDs. **Note**: <br />1. This
        parameter can't be combined with any other query parameter. <br />2.
        Pagination isn't supported when this parameter is used.
      schema:
        type: string
      example: 5f328bf0b5f328bf0b5f328b, 1e328bf0b5f328bf0b5f3287
    type:
      in: query
      name: type
      schema:
        $ref: '#/components/schemas/jobTypes'
      description: Job types
    inputFileIds:
      in: query
      name: inputFileIds
      allowReserved: true
      description: >-
        Supports up to 15 comma-separated file IDs. **Note**: <br /> 1. This can
        only be combined with the query parameter `lastJobOnly`. <br /> 2.
        Pagination isn't supported when this parameter is used.
      schema:
        type: string
      example: 87328bf0b5f328bf0b5f328b, 9f328bf0b5f328bf0b5f3258
    lastJobOnly:
      in: query
      name: lastJobOnly
      description: >-
        true: The last job that meets the query parameters <br /> false: Not
        necessarily the last job  **Note**: Only applicable with `type` and
        `inputFileIds`.
      schema:
        type: boolean
      example: true
    offset:
      in: query
      name: offset
      description: >-
        Number of records to skip before returning records. For example,
        `offset=20, limit=10` returns records 21-30.
      schema:
        type: integer
        format: int32
        default: 0
        example: 2
      required: false
    limit:
      in: query
      name: limit
      description: Maximum number of records per page
      schema:
        type: integer
        format: int32
        default: 10
        example: 20
  schemas:
    jobs:
      description: Details of jobs
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/job'
        offset:
          description: >-
            Number of records to skip before returning records. For example,
            `offset=20, limit=10` returns records 21-30.
          type: integer
          format: int32
          default: 0
          example: 5
        limit:
          description: Maximum number of records per page
          type: integer
          format: int32
          default: 10
          example: 10
        count:
          description: Total number of records
          type: integer
          format: int32
          example: 100
    jobTypes:
      oneOf:
        - $ref: '#/components/schemas/pimJobTypes'
        - $ref: '#/components/schemas/catalogConnectorJobTypes'
    job:
      type: object
      description: Job details
      properties:
        id:
          type: string
          description: 24-character system-generated job ID
          example: 877f1f77bcf86cd799439087
        type:
          $ref: '#/components/schemas/jobTypes'
        inputFileId:
          type: string
          example: 327f1f77bcf86cd799439045
          description: File ID that needs to be processed through the job
        outputFiles:
          type: array
          items:
            type: string
            description: >-
              Output file IDs. For import and export jobs, the output files show
              the exported products (items, variant and/or bundle) based on the
              job type.
            example: 507f1f77bcf86cd7994390163, 967f1f77bcf86cd799439058
        errorFiles:
          type: array
          items:
            type: string
            description: >-
              File IDs that show error details of the products that couldn't be
              imported or exported.
            example: 887f1f77bcf86cd799439011, 997f1f77bcf86cd799439074
        progressTracker:
          type: object
          properties:
            updatedAt:
              type: string
              description: Time of last update to tracker (UTC)
              example: '2023-02-14T22:10:30.618Z'
            totalCount:
              type: integer
              format: int32
              description: Total number of records to be processed through the job
              example: 100000
            processedCount:
              type: integer
              format: int32
              description: Total number of records to be processed
              example: 40000
            errorCount:
              type: integer
              format: int32
              description: Total number of errors
              example: 10
        status:
          $ref: '#/components/schemas/jobStatuses'
        statusMessage:
          description: User-friendly message corresponding to the current job status
          type: string
          example: 100% completed
        additionalDetails:
          type: object
          properties:
            itemsCreated:
              type: integer
              format: int32
              description: >-
                Number of items created. Only applicable when the job `type` is
                `ITEM_VARIANT_IMPORT`.
              example: 10
            itemsUpdated:
              type: integer
              format: int32
              description: >-
                Number of items updated. Only applicable when the job `type` is
                `ITEM_VARIANT_IMPORT`.
              example: 10
            variantsCreated:
              type: integer
              format: int32
              description: >-
                Number of variants created. Only applicable when the job `type`
                is `ITEM_VARIANT_IMPORT`.
              example: 10
            variantsUpdated:
              type: integer
              format: int32
              description: >-
                Number of variants updated. Only applicable when the job `type`
                is `ITEM_VARIANT_IMPORT`.
              example: 10
            bundlesCreated:
              type: integer
              format: int32
              description: >-
                Number of bundles created. Only applicable when the job `type`
                is `BUNDLE_IMPORT`.
              example: 10
            bundlesUpdated:
              type: integer
              format: int32
              description: >-
                Number of bundles updated. Only applicable when the job `type`
                is `BUNDLE_IMPORT`.
              example: 10
            attributeCreated:
              type: integer
              format: int32
              description: >-
                Number of attributes created. Only applicable when the job
                `type` is `ATTRIBUTE_IMPORT`.
              example: 10
            attributeUpdated:
              type: integer
              format: int32
              description: >-
                Number of attributes updated. Only applicable when the job
                `type` is `ATTRIBUTE_IMPORT`.
              example: 10
            categoriesCreated:
              type: integer
              format: int32
              description: >-
                Number of categories created. Only applicable when the job
                `type` - `CATEGORY_IMPORT`.
              example: 10
            categoriesUpdated:
              type: integer
              format: int32
              description: >-
                Number of categories updated. Only applicable when the job
                `type` is `CATEGORY_IMPORT`.
              example: 10
            collectionCreated:
              type: integer
              format: int32
              example: 5
              description: >-
                Number of collections created. Only applicable when the job
                `type` is `COLLECTION_IMPORT`.
            collectionUpdated:
              type: integer
              format: int32
              description: >-
                Number of collections updated. Only applicable when the job
                `type` is `COLLECTION_IMPORT`.
              example: 10
        createdAt:
          type: string
          description: Time of job creation (UTC)
          example: '2021-09-14T22:10:30.618Z'
        completedAt:
          type: string
          description: Time of job completion (UTC)
          example: '2021-09-14T22:10:30.618Z'
        updatedBy:
          type: string
          description: Email of the user who last updated the job
          example: test@email.com
        updatedAt:
          type: string
          description: Time of last update to job (UTC)
          example: '2021-09-14T22:10:30.618Z'
    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
    pimJobTypes:
      type: string
      enum:
        - ITEM_VARIANT_EXPORT
        - ITEM_VARIANT_IMPORT
        - BUNDLE_EXPORT
        - BUNDLE_IMPORT
        - ATTRIBUTE_IMPORT
        - ATTRIBUTE_EXPORT
        - CATEGORY_IMPORT
        - CATEGORY_EXPORT
        - COLLECTION_IMPORT
        - COLLECTION_EXPORT
        - ATTRIBUTE_JOB
        - PRODUCT_JOB
        - CATEGORY_JOB
        - COLLECTION_JOB
        - PRODUCT_BULK_CATEGORY_UPDATE
        - PRODUCT_DENORM_JOB
      description: Supported job types
      example: ITEM_VARIANT_EXPORT
    catalogConnectorJobTypes:
      type: string
      enum:
        - CATALOG_CONN_ITEM_VARIANT_IMPORT
        - CATALOG_CONN_BUNDLE_IMPORT
        - CATALOG_CONN_ITEM_VARIANT_EXPORT
        - CATALOG_CONN_BUNDLE_EXPORT
      description: Catalog Connector job types
      example: CATALOG_CONN_ITEM_VARIANT_IMPORT
    jobStatuses:
      type: string
      enum:
        - SCHEDULED
        - COMPLETED_PARTIALLY
        - IN_PROGRESS
        - COMPLETED
        - FAILED
        - UPDATING_SEARCH_INDEX
        - CANCELLATION_IN_PROGRESS
        - CANCELLED
      description: Job status
      example: COMPLETED
  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)

````