The Async Job API allows you to access asynchronous jobs from across Wix's APIs. Use this API to check job status (initialized, processing, etc.) and job item successes and failures.
Note that this API is not useful on its own - it's a way to access asynchronous jobs from other Wix APIs. For example, Wix Stores' Bulk Update Products by Filter.
This article shares some typical use cases you can support, as well as an example flow that supports each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your implementation.
You can update Wix Stores products in bulk, collect the resulting job ID, and check the status and updated products with the Async Jobs API.
jobId
from the response.Job ID.
Optional job metadata, used to store any parameters used during job execution, user-defined statuses, etc.
Current job execution status.
Current counters.
Date and time the job was created in ISO-8601 format.
Date and time the job was last updated in ISO-8601 format.
Job owner.
Job creator.
Current execution counts.
{
"job": {
"id": "076e0505-6944-4645-a248-80b197ee9cfd",
"metadata": {
"meta1": "value1"
},
"status": "INITIALIZED",
"counters": {
"items_to_process": null,
"items_succeeded": 0,
"items_failed": 0,
"error_count_by_code": {}
},
"created_date": "2024-04-22T10:23:25.798Z",
"updated_date": "2024-04-22T10:23:25.798Z",
"owner": {
"service_id": "338acb04-5b9b-4cdd-beb3-ea6739546d3a"
}
}
}
Retrieves a job.
You can only call this method when authenticated as a Wix app or Wix user identity.
Job ID.
Returned job.
curl -X GET \
'https://www.wixapis.com/async-jobs/v1/async-jobs/076e0505-6944-4645-a248-80b197ee9cfd' \
-H 'Authorization: <AUTH>'
{
"job": {
"id": "076e0505-6944-4645-a248-80b197ee9cfd",
"metadata": {
"meta1": "value1"
},
"status": "INITIALIZED",
"createdDate": "2024-04-22T10:23:25.798Z",
"updatedDate": "2024-04-22T10:23:25.798Z",
"createdBy": {
"type": "APP_ID",
"appIdOptions": {
"appId": "338acb04-5b9b-4cdd-beb3-ea6739546d3a"
}
},
"counts": {
"total": null,
"successCount": 0,
"failCount": 0,
"errorByCodeCount": {}
}
}
}
Retrieves a list of job items.
You can only call this method when authenticated as a Wix app or Wix user identity.
Job ID.
Maximum number of items to return in the results.
Pointer to the next or previous page in the list of results.
Pass the relevant cursor token from the pagingMetadata
object in the previous call's response.
Not relevant for the first request.
async job item status filter.
Job items.
Paging metadata.
curl -X GET \
'https://www.wixapis.com/async-jobs/v1/async-jobs/076e0505-6944-4645-a248-80b197ee9cfd/items?limit=10' \
-H 'Authorization: <AUTH>'
{
"results": [
{
"id": "365b44a2-61b2-42a0-87cf-272e7c42cc6e",
"data": {},
"entityId": "entity1",
"success": true
},
{
"id": "6fe127a3-9846-480f-8d9c-dc1e00623eaa",
"data": {},
"entityId": "entity2",
"success": true
}
],
"pagingMetadata": {
"count": 2,
"cursors": {},
"hasNext": false
}
}