Cancel a Job
POSThttps://useast.api.elasticpath.com/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
{
"data": {
"id": "string",
"type": "promotion_job",
"promotion_id": "string",
"job_type": "string",
"name": "string",
"parameters": {},
"status": "string",
"meta": {
"timestamps": {
"created_at": "2024-09-23T15:48:29.980Z",
"updated_at": "2024-09-23T15:48:29.980Z"
}
}
}
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://useast.api.elasticpath.com/v2/promotions/:promotionID/jobs/:jobID/cancel' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ResponseClear