Elastic Path Promotion Jobs API
Use Jobs API to initiate a job within a promotion. Jobs operate asynchronously and have a different status based on their progress. The following are the job statuses:- `pending`: Commerce has received the request but is currently busy processing other requests.- `processing`: Commerce has initiated processing the job.- `completed`: The job is successfully completed.- `failed`: The job has failed.- `cancelling`: The job is currently in the process of being canceled. You need to wait for the cancellation process to complete. This occurs prior to the `cancelled` status. For example, if you cancel a big `code_generate` job, it may take some time for the cancellation to complete since part of the cancellation process involves deleting the generated codes.- `cancelled` : The job request is canceled.### Characteristics of Jobs- You can only initiate one job at a time within a promotion. If you want to run another job for the same promotion, you must wait until the previous job is `completed` or `failed`. However, you can create new jobs for different promotions even if there are `pending` jobs in other promotions.- If you intend to manage promotions with more than 10,000 codes per promotion, we recommend [exporting codes](/docs/api/promotions/create-a-promotion-job) for viewing purposes instead of attempting to view them within Commerce Manager. This recommendation is made due to our enforced maximum page offset limit of 10,000. Altering the page_offset_limit value poses potential performance risks to the platform.- A `code_generate` job is initiated even if the maximum allowable number of codes for the promotion has been reached. However, when processed, this job will fail. To view the status of this failed job, you can only do so by passing [GET Jobs](/docs/api/promotions/get-promotion-jobs) request.- A limited number of jobs can be processed at a time. Jobs are queued and processed sequentially, one after the other. You can expect a certain delay before job processing.
Elastic Path Promotion Jobs API is one of 100 APIs that Elastic Path publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Promotion Jobs. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.
This API exposes 4 operations across 3 paths, and defines 1 schema. It is described by OpenAPI 3.1.0, at version 25.1126.6886238.
Requests are made against 2 base URLs: https://useast.api.elasticpath.com, https://euwest.api.elasticpath.com.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 1
Elastic Path Promotion Jobs API declares
1 security scheme
for authenticating requests.
It accepts HTTP bearer tokens (BearerToken).
By default, every request must be authenticated.
Paths & Operations 4
Across 3 paths, the API surfaces 4 operations — 2 GET, 2 POST. Each is listed below with its method, path, parameters, and response codes.
Use Jobs API to initiate a job within a promotion. Jobs operate asynchronously and have a different status based on their progress. The following are the job statuses: - pending:…
Schemas 1
The contract defines 1 schema that model the data the API accepts and returns. The most detailed is PromotionJob (8 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Elastic Path 12
Other APIs Elastic Path publishes across the network.