Using product details
Understand how to use the product details object
A productDetails object contains basic product data. You most commonly send productDetails in create checkout and create checkout session requests. If you decide to use this object, you'll need to retrieve product data from your system at run-time and then define the object with this retrieved data. Since you're not persisting productDetails in Digital River's system, this object reduces your catalog management requirements.
If your integration currently uses SKUs and you're considering a migration, you should be aware of the common attributes in product details and SKUs.

Product details

You'll most commonly use productDetails in create checkout and create checkout session requests to send Digital River the following basic product data:
For complete specifications, refer to the Checkouts API and Drop-in Checkout Sessions API reference documentation.
POST/checkouts
1
curl --location --request POST 'https://api.digitalriver.com/checkouts' \
2
...
3
--data-raw '{
4
...
5
"items": [
6
{
7
"productDetails": {
8
"id": "2837a981-9e41-408b-a1b2-ffa3223bc505",
9
"skuGroupId": "wireless-keyboards",
10
"name": "Basic wireless keyboard",
11
"description": "A simple, basic wireless keyboard",
12
"url": "https://www.company.com/basic-wireless-keyboard",
13
"countryOfOrigin": "US",
14
"image": "https://www.company.com/basic-wireless-keyboard/image",
15
"weight": 1,
16
"weightUnit": "kg",
17
"partNumber": "ce1fd95d-b211-47e8-a9b7-9941a4ce9d7a"
18
},
19
"quantity": 2,
20
"price": 10
21
}
22
]
23
}'
Copied!

Unique identifier

The unique id in productDetails should represent the identifier of the product in your system.

Unique SKU group identifier

In productDetails, a skuGroupId uniquely identifies the SKU group that holds this product's compliance data. You're required to provide skuGroupId because Digital River uses it to access the product's compliance data.
For more information, refer to Grouping SKUs.
In create checkout requests, if you send productDetails, and it doesn't contain a skuGroupId, then the following error is thrown:
400 Bad Request
1
{
2
"type": "bad_request",
3
"errors": [
4
{
5
"code": "missing_parameter",
6
"parameter": "skuGroupId",
7
"message": "An item of type sku is missing a skuGroupId parameter."
8
}
9
]
10
}
Copied!

Country of origin

The countryOfOrigin is a two-letter Alpha-2 country code as described in the ISO 3166 international standard. This attribute represents the country where a product was manufactured.
In create checkout requests, if you send productDetails, and it doesn't contain countryOfOrigin, then the following error is thrown:
400 Bad Request
1
{
2
"type": "bad_request",
3
"errors": [
4
{
5
"code": "missing_parameter",
6
"parameter": "countryOfOrigin",
7
"message": "must not be null"
8
}
9
]
10
}
Copied!
In create checkout requests, if you send productDetails, and it contains an invalid countryOfOrigin, then the following error is thrown:
400 Bad Request
1
{
2
"type": "bad_request",
3
"errors": [
4
{
5
"code": "invalid_parameter",
6
"parameter": "countryOfOrigin",
7
"message": "'KP' is not a valid Country of Origin."
8
}
9
]
10
}
Copied!

Name and description

In productDetails, the name should represent the product's brand name and description should provide more details about the product.
In create checkout requests, if you send productDetails, and it doesn't contain name, then the following error is thrown:
400 Bad Request
1
{
2
"type": "bad_request",
3
"errors": [
4
{
5
"code": "missing_parameter",
6
"parameter": "name",
7
"message": "must not be null"
8
}
9
]
10
}
Copied!

Image and url

A productDetails.image can hold a URL that provides the address of a resource that contains the product's image. This image should be similar to the image(s) you display to customers while they are reviewing and selecting products.
A productDetails.url should hold a URL that provides the address of a resource that contains the product's description.
In the Global logistics solution, depending on your logistics partner's setup, both image and url are often transferred to the customs documentation. This allows customs officials to obtain information about the product during the pre-clearance phase of an importation.
Both image and url are required when customers are using ApplePay or GooglePay as their primary payment source.

Weight and weight unit

For physical products, productDetails can be used to send a weight measured by a weightUnit. The enumerated weightUnit values are oz, lb, g, and kg.
If you provide a weight but not a weightUnit, then the value defaults to oz.
In some countries, such as Switzerland, custom officials use a product's weight when calculating import duties. Without this data we're unable to calculate landed costs.
If you attempt to create or update a checkout that contains a ship to country from one of these nations, and any productDetails in the checkout's items[] array are missing weight, then the following 400 Bad Request is thrown:
400 Bad Request
1
{
2
"type": "bad_request",
3
"errors": [
4
{
5
"code": "missing_parameter",
6
"message": "The weight is missing.",
7
"parameter": "weight"
8
}
9
]
10
}
Copied!
So, if your site intends on selling physical products across international borders, we recommend that you define both weight and weightUnit for all of your catalog's physical products.

Part number

A productDetails can contain a partNumber. It represents a unique manufacturer part number (MPN) issued by manufacturers to identify a part or product.
MPNs are meant to be static identifiers of a part/product, universal to all distributors, wholesalers, and resellers. They allow customers to accurately identify exact parts and protect themselves from counterfeits.
If two parts or products originate from two different manufacturers, then each must have its own MPN. These identifiers are especially relevant for automotive and consumer electronics, due to the numerous parts in these complex products.

Common attributes in product details and SKUs

The attributes in SKUs and productDetails are nearly identical. The key exceptions are taxCode, eccn, and hsCode, which exist in SKUs but not in productDetails.
However, since these attributes hold compliance data, they're contained in the referenced SKU group.
For more information, refer to Grouping SKUs.
SKUs also have a manufacturerId and this attribute is not in productDetails.
In Digital River coordinated fulfillments that use the distributed model or the orchestrated model, manufacturerId is used to set up products in warehouses. That process however is handled prior to deployment. So there's no need to send manufacturerId in checkouts.