Get Latest Promotion Task
Returns the store’s latest promotion task. A task tracks a long-running operation, such as a coupon code import started with Import Coupon Codes. Poll this endpoint to follow an import’s progress.
Notes
- A store has one task record at a time. Starting a new task, such as a coupon code import, replaces the previous one.
- A task expires 7 days after it was created. After that, this endpoint returns a 204 until a new task starts.
- The default rate limit for this endpoint is 40 concurrent requests.
Authentication
X-Auth-Tokenstring
OAuth scopes
Authentication header
Further reading
For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.
For more about BigCommerce OAuth scopes, see API Accounts and OAuth Scopes.
For a list of API status codes, see API Status Codes.
Path parameters
store_hash
Permanent ID of the BigCommerce store.
Headers
Accept
The MIME type of the response body.
Response
The promotion task.
Coupon code import tasks
completedmeans the import created at least one code. It may not have processed every row. If the import stopped early, for example because the promotion was archived,codes_createdpluscodes_failedis less thancodes_total.failedmeans the import created no codes.failure_reasonexplains why.- An import that is still
queuedorprocessingmore than 24 hours after it was created is treated as abandoned. Itsstatusdoes not change, but a new import can start, including one with the same file.
data
A long-running operation performed on a promotion, such as a coupon code import.
meta
Empty meta object, which may be used at a later time.
Errors
500
Internal Server Error