OCAPI System Jobs

System jobs are predefined jobs called via the following OCAPI request:

1POST dw/data/v24_5/jobs/{job_id}/executions

Calling this resource triggers a background job and retrieves a response document containing information about the job’s status. Different System Jobs can use different request payloads.

The job ID always starts with sfcc-. This prefix is a namespace specific to B2C Commerce System Jobs. You can’t use it in custom job IDs.

Currently available system jobs can be found in Global Jobs.

A System Job request looks like a basic OCAPI Data API request, but can have its own request document. An example is shown here for the site archive import job:

1REQUEST:
2      POST /dw/data/v24_5/jobs/sfcc-site-archive-import/executions HTTP/1.1
3      Host: example.com
4      Accept: application/json
5      Authorization: Bearer <access_token>
6      {
7          "file_name": "siteGenesis.zip",
8          "mode": "merge"
9      }
10
11      RESPONSE:
12      HTTP/1.1 202 ACCEPTED
13      Content-Type: application/json;charset=UTF-8
14      Content-Length: 741
15      {
16          "_v" : "24.5",
17          _type": "job_execution",
18          "client_id": "[your_own_client_id]",
19          "execution_status": "pending",
20          "id": "42",
21          "is_log_file_existing": false,
22          "is_restart": false,
23          "job_id": "sfcc-site-archive-import",
24          "log_file_name": "Job-sfcc-site-archive-import-20170512142357242.log",
25          "modification_time": "2017-05-12T14:23:57.316Z",
26          "parameters": [ {
27            "_type": "job_execution_parameter",
28            "name": "ImportMode",
29            "value": "merge"
30          }, {
31            "_type": "job_execution_parameter",
32            "name": "ImportFile",
33            "value": "siteGenesis.zip"
34          } ],
35          "status": "PENDING"
36      }

Attention!

The Open Commerce API (OCAPI) is now deprecated. The provisions described in our versioning and deprecation policy fully apply. For all new projects and major refactoring work, use B2C Commerce API (SCAPI) as the default REST API. For additional details, refer to Why Use SCAPI Instead of OCAPI.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!