Admin APIs Product management Manage products (asynchronous API) Applying live changes Learn how to apply a live change to a deployed product.
You can apply live changes to key attributes associated with a deployed product or product variation. The following list summarizes the actions that prompt a live change to the product in your store:
Adding, editing, or removing a category assignment for a product.
Adding, editing, or removing pricing .
If there are any errors or warnings when you apply a live change, they will appear in the response.
Applying a live change to a base or individual product
The following POST /v1/products/{productId or ERID}/live-changes
request applies a change to a base product or individual product . To apply a live change to a specific base or individual product, you must provide either a productId
or ERID
.
cURL 202 Accepted response
The following example applies live changes to a product with a productId
. See the live-changes resource for a description of the attributes.
Copy curl --location --request POST 'https://api.digitalriver.com/v1/products/{productId}/live-changes' \
--header 'Authorization: Basic <API_key>' \
--data-raw '{
{
"externalReferenceId": "sku-1234-5678-xyz",
"catalogs": [
{
"catalogId": "123456000",
"categories": [
{
"categoryId": "19000000"
}
],
"prices": [
{
"type": "listPrice",
"prices": [
{
"currency": "USD",
"locale": "en_US",
"configuredPrice": 15.99
}
]
}
]
}
]
}
}
An ERID request requires the x-erid-as-pid=true
header.
Copy curl --location --request POST 'https://api.digitalriver.com/v1/products/{ERID}/live-changes' \
--header 'Authorization: Basic <API_key>' \
--header 'header x-erid-as-pid=true' \
--data-raw '{
{
"externalReferenceId": "sku-1234-5678-xyz",
"catalogs": [
{
"catalogId": "123456000",
"categories": [
{
"categoryId": "19000000"
}
],
"prices": [
{
"type": "listPrice",
"prices": [
{
"currency": "USD",
"locale": "en_US",
"configuredPrice": 15.99
}
]
}
]
}
]
}
}
Applying a live change to a product variation
The following POST /v1/products/product/variations/{variationProductId or variationERID}/live-changes
request applies a change to a product variation . To apply a live change to a specific product variation, you must provide either a productId
or ERID
.
cURL 202 Accepted Response
The following example applies live changes to a product variation with a productId
.
Copy curl --location --request POST 'https://api.digitalriver.com/v1/products/product/variations/{variationProductId}/live-changes' \
--header 'Authorization: Basic <API_key>' \
...
--data-raw '{
"externalReferenceId": "{newVariationProductERID}"
}
An ERID request requires the x-erid-as-pid=true
header.
Copy curl --location --request POST 'https://api.digitalriver.com/v1/products/product/variations/{variationERID}/live-changes' \
--header 'Authorization: Basic Basic <API_key>' \
--header 'header x-erid-as-pid=true' \
...
--data-raw '{
"externalReferenceId": "{newVariationProductERID}"
}
The request returns a task identifier (taskId
) in the asynchronous response.
Copy {
"taskId" : "ea310126-cba4-46be-9cff-82dded915dbf" ,
"requestType" : "UPDATE_VARIATION_LIVE_CHANGE,"
"taskStatus" : "PUBLISHED" ,
"receivedTime" : "2022-08-24T17:10:09.864Z"
}
Use the taskId
in the response to verify the successful completion of the request . You can also verify the successful completion of the task by checking the product history in Global Commerce . Note that there may be a delay before these changes appear in Global Commerce.
Last updated 8 months ago