Get All Jobs
GET/pcm/jobs
The jobs endpoints displays the status of a number of endpoints that function as jobs, for example, product import and export, price book import, building child products, and duplicating hierarchies.
Responses
- 200
- 400
- 404
- 422
- 500
Returns all the jobs.
- application/json
- Schema
- Example (from schema)
- completed
Schema
- Array [
- pending- Commerce has received the request but is currently busy processing other requests.
- started- Commerce has started processing the job.
- success- The job has successfully completed.
- failed- The job has failed.
- ]
data object[]
An array of jobs.
A unique identifier generated when a job is created.
Possible values: [pim-job]
This represents the type of resource object being returned. Always pim-job.
attributes object
The date and time a job is started.
The date and time a job is completed.
The date and time a job is created.
The date and time a job is updated.
Possible values: [child-products, product-import, product-export, hierarchy-duplicate, price-import]
The status of a job.
Possible values: [pending, cancelled, started, success, failed]
meta object
Applies to all job types. A unique request ID is generated when a job is created.
Applies to hierarchy-duplicate job types. The ID of the original hierarchy that you duplicated.
Applies to hierarchy-duplicate job types. The duplicated hierarchy ID.
If the job type is product_export, a link to the file is created when running a job.
The entities included in the job. For example, if the job type is product-export, the PXM products included in the export.
meta object
results object
Contains the results for the entire collection.
Total number of results for the entire collection.
{
  "data": [
    {
      "id": "string",
      "type": "pim-job",
      "attributes": {
        "started_at": "2020-09-22T09:00:00",
        "completed_at": "2020-09-22T09:00:00",
        "created_at": "2020-09-22T09:00:00",
        "updated_at": "2020-09-22T09:00:00",
        "type": "child-products",
        "status": "pending"
      },
      "meta": {
        "x_request_id": "string",
        "copied_from": "string",
        "hierarchy_id": "string",
        "file_locations": [
          "string"
        ],
        "filter": "string"
      }
    }
  ],
  "meta": {
    "results": {
      "total": 2
    }
  }
}
Get all jobs
{
  "data": [
    {
      "type": "pim-job",
      "id": "1ea62172-57f6-45e5-a708-ab5bd634e3f9",
      "attributes": {
        "completed_at": "2024-01-05T13:46:42.142Z",
        "created_at": "2024-01-05T13:46:41.695Z",
        "started_at": "2024-01-05T13:46:42.07Z",
        "status": "success",
        "type": "product-import",
        "updated_at": "2024-01-05T13:46:42.07Z"
      },
      "meta": {
        "x_request_id": "7e832a26-d615-4305-b26a-e33c9c2fc06a"
      }
    },
    {
      "type": "pim-job",
      "id": "3ab3deca-1f11-47b7-a409-24ea3234d72c",
      "attributes": {
        "created_at": "2024-01-05T13:42:41.695Z",
        "status": "started",
        "type": "product-import",
        "updated_at": "2024-01-05T13:42:42.07Z"
      },
      "meta": {
        "x_request_id": "9ac00140-0037-4c6a-913c-b812196a2de6"
      }
    },
    {
      "type": "pim-job",
      "id": "7e1b9ba1-c844-4556-9b16-4ae3f0988b0f",
      "attributes": {
        "completed_at": "2024-01-05T15:27:23.663Z",
        "created_at": "2024-01-05T15:27:23.161Z",
        "started_at": "2024-01-05T15:27:23.65Z",
        "status": "success",
        "type": "product-export",
        "updated_at": "2024-01-05T15:27:23.65Z"
      },
      "meta": {
        "file_locations": [],
        "filter": "eq(sku,product-1)",
        "x_request_id": "fad8c5c0-9546-4e0c-b68e-8a2d809891e5"
      }
    }
  ],
  "meta": {
    "results": {
      "total": 1
    }
  }
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- bad-request
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": "500",
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "request_id": "00000000-0000-0000-0000-000000000000",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Bad Request",
      "detail": "Could not parse the supplied filter",
      "status": "400"
    }
  ]
}
Bad Request. Not Found.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": "500",
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "request_id": "00000000-0000-0000-0000-000000000000",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Not Found",
      "status": "404"
    }
  ]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- failed-validation
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": "500",
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "request_id": "00000000-0000-0000-0000-000000000000",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "title": "Failed Validation",
      "status": "422",
      "detail": "<XYZ> can not be empty"
    }
  ]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
  "errors": [
    {
      "status": "500",
      "title": "Internal server error",
      "detail": "An internal error has occurred.",
      "request_id": "00000000-0000-0000-0000-000000000000",
      "meta": {
        "missing_ids": [
          "e7d50bd5-1833-43c0-9848-f9d325b08be8"
        ]
      }
    }
  ]
}
{
  "errors": [
    {
      "status": "500",
      "title": "Internal Server Error",
      "detail": "There was an internal server error, you can report with your request id.",
      "request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
    }
  ]
}