> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/commerce-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api/retrieving-the-tasks-for-a-specific-product.md).

# Retrieving the tasks for a specific product

The response to the following [`GET /v1/products/tasks?productId={productId or ERID}`](https://docs.digitalriver.com/commerce-api-references/admin-apis/product-management/retrieve-the-product-task-status-synchronous-api#v1-products-tasks) request retrieves the tasks for a specific `productId` or `ERID`.&#x20;

{% tabs %}
{% tab title="cURL" %}
The following example verifies the completion of  a product for a specific [`productId`](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/glossary#product-identifier).&#x20;

```http
curl --location --request GET 'https://api.digitalriver.com/v1/products/tasks?productId={productId}'
--header 'Authorization: Basic <API_key>' \
...
```

An [ERID ](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/api-structure/product-external-reference-identifier-erid)request requires the `x-erid-as-pid=true` header.

```http
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.
{% endtab %}

{% tab title="200 OK Response" %}
The request returns the [product data](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/glossary#products), the [task identifier](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/glossary#task-identifier) (`taskId`), the [request type](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/glossary#request-type) (`requestType`), and [task status](https://docs.digitalriver.com/commerce-api-references/commerce-api-reference-guide/glossary#task-status-1) (`taskStatus`) in the [synchronous ](/commerce-api/admin-apis/product-management/getting-started.md#asynchronous-and-synchronous-calls)response.&#x20;

```json
{
    "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
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/admin-apis/product-management/get-the-task-status-for-a-product-synchronous-api/retrieving-the-tasks-for-a-specific-product.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
