LogoLogo
System status
Commerce API references
Commerce API references
  • Commerce API references
  • Warnings and error codes
    • Errors
    • Error codes
      • HTTP response status codes
      • Error format for Shopper APIs
      • Error codes for Shopper APIs
        • 400 Bad Request
        • 401 Unauthorized
        • 403 Forbidden
        • 404 Not Found
        • 405 Method Not Allowed
        • 409 Conflict
        • 412 Precondition Failed
        • 413 Payload Too Large
        • 500 Internal Server Error
      • Error format for Admin APIs
        • Async error objects
        • Sync error objects
        • Deployment objects
        • Warning objects
      • Error codes for Admin APIs
        • Error patterns
        • Supported image types
        • Asynchronous response error codes
        • Deployment error codes
        • Synchronous response error codes
  • Commerce API reference guide
    • API structure
      • API keys
      • Supported OAuth and Commerce API formats
      • Mini cart widget
      • Custom attributes
      • Fields used as keys
      • Fields and expand query parameters
      • Caching responses
      • CORS support
      • JSONP support
      • Transport
      • Service profiles
      • Supported protocols and formats
      • Elements
      • Rate limiting
      • Locale and currency
      • Exchange rate
      • Product identifier
      • Product external reference identifier (ERID)
      • Customer external reference identifier ERID
      • Cancel request process
      • Failover and redundancy
      • Troubleshooting API calls
    • Shopper APIs reference
      • Carts
        • Offers
          • Offer types
          • POP offers
          • Applied offers
          • Eligible offers
      • Orders
      • Returns
      • Links
    • Admin APIs reference
      • Subscriptions
      • Sites
      • Products
      • Live changes
      • Authorized shipping and billing countries
      • Merchandising
      • Disclosures
    • Glossary
Powered by GitBook
On this page
  • Admin APIs and the product identifier
  • Shopper APIs and the product identifier
  • Retrieve specific products from the default catalog
  • Add a product to a shopping cart using the external reference identifier
  • Add a product by external reference identifier to the shopping cart and redirect to the storefront page
  1. Commerce API reference guide
  2. API structure

Product identifier

Understand the product identifier.

PreviousExchange rateNextProduct external reference identifier (ERID)

Last updated 4 months ago

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 , 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 , , or product identifier. If you want to use your company's internal product identifiers, see 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 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

 {
   "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.

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 resource. The following payload (request entity) adds a product with the idof 64578500, with a quantity of 2, to a cart.

Global Commerce
External reference identifier (ERID)
External reference identifier (ERID)
individual
base
variation
Web Checkout