Products

Learn how to retrieve product information.

Getting a product by identifier

You can retrieve products programmatically.

The GET /v1/shoppers/me/products/{productId} request retrieves a specific product by its product identifier (productId). If the product is a product combination, the combined product information appears under the lineItem object, and component information appears under the component object.

curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/products/{productId}' \
--header 'authorization: bearer ***\
...

Getting volume pricing for a specific product

The GET /v1/shoppers/me/products/{productId}/pricing/volume-pricing request retrieves volume pricing for a specific product by its product identifier (productId).

curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/products/{productId}/pricing/volume-pricing' \
--header 'authorization: bearer ***\
...

Getting all products from the product catalog

The GET /v1/shoppers/me/products request retrieves all products from the catalog.

curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/products' \
--header 'authorization: bearer ***\
...

Getting all products for a specified category

The GET /v1/shoppers/me/categories/{categoryId}/products request retrieves all products for a specified category (categoryId).

curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/categories/{categoryId}/products' \
--header 'authorization: bearer ***\
...

Getting a base product, individual product, or product combinations

The following GET /v1/products/{productId, ERID, productCombinationId, productCombinationERID, baseProductId, or baseProductERID} request retrieves data for an individual product, base product, or product combination. All product variations (if any) for a base product for a product combination will appear as a URL in the response. All components for a product combination appear as a lineItem under the components object.

To get a specific product, you must provide either a productId or ERID. If the request finds multiple products associated with the ERID, the response will return all of them.

Duplicate ERIDs are not allowed. To prevent duplicate ERIDs, enable the Enforce Unique Value when configuring company settings in Global Commerce. This ensures that you won't accidentally provide an ERID that would result in duplicate products in the response if you searched for a product by ERID.

The following example gets a specific base or individual product with a productId.

curl --location --request GET 'https://api.digitalriver.com/v1/products/{productId, combinationProductId, or baseProductId}' \
--header 'Authorization: Basic <API_key>' \
...

An ERID request requires the x-erid-as-pid=true header.

curl --location --request GET 'https://api.digitalriver.com/v1/products/{ERID or baseProductERID}' \
--header 'Authorization: Basic <API_key>' \
--header 'header x-erid-as-pid=true' \
...