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.

The following example applies live changes to a product with a productId. See the live-changes resource for a description of the attributes.

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.

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.

The following example applies live changes to a product variation with a productId.

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.

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}"
}

Last updated