Retrieving the tasks for a specific product
Lear how retrieve the tasks for a specific product.
The response to the following GET /v1/products/tasks?productId={productId or ERID}
request retrieves the tasks for a specific productId
or ERID
.
The following example verifies the completion of a product for a specific productId
.
curl --location --request GET 'https://api.digitalriver.com/v1/products/tasks?productId={productId}'
--header 'Authorization: Basic <API_key>' \
...
An ERID request requires the x-erid-as-pid=true
header.
curl --location --request
POST 'https://api.digitalriver.com/v1/products/tasks?productId={ERID}'
--header 'Authorization: Basic <API_key>' \
--header 'header x-erid-as-pid=true' \
...
To filter the results in the response, use query parameters.
The request returns the product data, the task identifier (taskId
), the request type (requestType
), and task status (taskStatus
) in the synchronous response.
{
"tasks": [
{
"taskId": "49751317-ff82-4638-8bf1-de5d7eb4ebdb",
"products": [
{
"id": "50432680080",
"externalReferenceId": "d02e9e41-4d54-4e68-a696-3048adb485e7",
"productType": "BASE"
},
{
"id": "50432690080",
"externalReferenceId": "b0dfc13e-284b-4d98-a835-73ee15c37448",
"productType": "VARIATION"
},
{
"id": "50432700080",
"externalReferenceId": "31c644e5-0b40-45a6-bd95-955acf6cbc5f",
"productType": "VARIATION"
}
],
"requestType": "CREATE_PRODUCT",
"taskStatus": "COMPLETED",
"receivedTime": "2022-08-23T20:15:47.449Z",
"finishedTime": "2022-08-23T20:15:53.037Z",
"uri": "https://dispatch-test.digitalriver.com/products/tasks/49751317-ff82-4638-8bf1-de5d7eb4ebdb"
},
{
"taskId": "b3c006fd-b7b8-4d91-932c-ca6da7f71f1f",
"products": [
{
"id": "50432680080",
"externalReferenceId": "d02e9e41-4d54-4e68-a696-3048adb485e7",
"productType": "BASE"
}
],
"requestType": "UPDATE_PRODUCT",
"taskStatus": "COMPLETED",
"receivedTime": "2022-08-23T20:17:19.827Z",
"finishedTime": "2022-08-23T20:17:20.584Z",
"uri": "https://dispatch-test.digitalriver.com/products/tasks/b3c006fd-b7b8-4d91-932c-ca6da7f71f1f"
},
{
"taskId": "754a4d49-6e07-4d44-87da-8288d7075718",
"products": [
{
"id": "50432680080",
"externalReferenceId": "d02e9e41-4d54-4e68-a696-3048adb485e7",
"productType": "BASE"
}
],
"requestType": "UPDATE_PRODUCT_LIVE_CHANGE",
"taskStatus": "COMPLETED",
"receivedTime": "2022-08-23T20:58:57.726Z",
"finishedTime": "2022-08-23T20:58:58.125Z",
"uri": "https://dispatch-test.digitalriver.com/products/tasks/754a4d49-6e07-4d44-87da-8288d7075718"
},
{
"taskId": "80f1e1eb-4144-4030-82cd-f3817d8cc0f9",
"products": [
{
"id": "50505980080",
"externalReferenceId": "3f29d287-f6c9-4c82-ac4c-452af405333a",
"productType": "VARIATION"
}
],
"requestType": "CREATE_VARIATION",
"taskStatus": "COMPLETED",
"receivedTime": "2022-08-24T16:13:12.575Z",
"finishedTime": "2022-08-24T16:13:14.763Z",
"uri": "https://dispatch-test.digitalriver.com/products/tasks/80f1e1eb-4144-4030-82cd-f3817d8cc0f9"
}
],
"totalSize": 4,
"searchCriteria": {
"beginReceivedTime": "2022-07-25T17:29:22.050Z",
"endReceivedTime": "2022-08-24T17:29:22.050Z",
"productId": "50432680080",
"taskStatus": [
"COMPLETED",
"FAILED",
"PROCESSING",
"PUBLISHED"
]
},
"pagination": {
"limit": 50
}
}
Last updated