Product identifier

Understand the product identifier.

A product identifier is the client's unique stock keeping unit (SKU) for a product. A product's unique identifier is represented by an id. The product identifier value (productID or PID) is the identifier associated with a product.

Admin APIs and the product identifier

When you create a product programmatically or through Global Commerce, Digital River automatically assigns a product identifieDigital River assigns a product identifier when.

The productId or PID variable can be one of the following values: an individual, base, or product variation identifier. If you want to use your company's internal product identifiers, see External reference identifier (ERID) for instructions.

Shopper APIs and the product identifier

You can use a product identifier to search for a product or add a product to a cart. The following examples demonstrate how you can use the product identifier (id) with the product-related resource. If you want to use your company's internal product identifiers, see External reference identifier (ERID) for instructions.

Retrieve specific products from the default catalog

The following request gets a product by its product identifier of 64578500.

curl --location --request GET 
'https://api.digitalriver.com/v1/shoppers/me/products?id=64578500' \
--header 'Authorization: Bearer <API_key>' \
...

Add a product to a shopping cart using the external reference identifier

Using the externalReferenceId query parameter, the following request example adds a product to a cart.

curl --location --request GET 
'https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items?id=64578500' \
--header 'Authorization: Bearer <API_key>' \
...

If you do not provide a company identifier, The API uses the company identifier associated with the API key.

Add a product by external reference identifier to the shopping cart and redirect to the storefront page

In a typical anonymous customer workflow, you can add products to a cart by external reference identifier, making a single POST call with a payload to the Web Checkout resource. The following payload (request entity) adds a product with the idof 64578500, with a quantity of 2, to a cart.

 {
   "webCheckout": {
     "cart": {
       "lineItems": {
         "lineItem": {
           "quantity": "2",
           "product": {
             "idd": "64578500"
            }
              ... more closing curly braces ...

A successful request with this particular API results in a 302 redirect to a Digital River-hosted guest checkout page.

Last updated