Cancel a Job
POST/v2/promotions/:promotionID/jobs/:jobID/cancel
Cancels an asynchronous job whose status is pending or processing.
Request
Path Parameters
promotionID stringrequired
The unique identifier of a promotion.
jobID stringrequired
The unique identifier of a job to be canceled.
Header Parameters
Authorization Bearerrequired
The Bearer token required to get access to the API.
Responses
- 200
Job canceled successfully
- application/json
- Schema
- Example (from schema)
Schema
data object
id string
A unique ID generated when a job is created.
type string
Always promotion_job
.
promotion_id string
A unique ID of a promotion.
job_type string
The type of job you want to run. For example, code_generate
to generate codes or code_export
to export codes.
name string
The name of the job. The maximum length allowed is 50 characters.
parameters object
status string
The status of the job. See Overview.
meta object
timestamps object
created_at date-time
The creation date of the job.
updated_at date-time
The last updated date of the job.
{
"data": {
"id": "string",
"type": "promotion_job",
"promotion_id": "string",
"job_type": "string",
"name": "string",
"parameters": {},
"status": "string",
"meta": {
"timestamps": {
"created_at": "2024-08-09T20:10:21.513Z",
"updated_at": "2024-08-09T20:10:21.513Z"
}
}
}
}
Loading...