Describing line items
Understand how to describe a checkout's products or services
Last updated
Understand how to describe a checkout's products or services
Last updated
You use a items[]
array to pass data on in a customer's cart. The elements of items[]
allow you to:
After you , we return an that uniquely identifies each of a checkout's line items. This identifier is needed to in an .
Since update checkout requests only allow you to modify subscription, ship from and meta data, your create checkout request must include a line item's product data, price, and quantity.
For more information, refer to the section on the page.
In a , you must provide Digital River with on the products in a customer's cart. You have three options for passing this data. You can:
Whichever option you select, .
Once you submit this request, Digital River retrieves all the product data we need from the referenced SKU.
This option requires you to keep the product catalog in your system synchronized with your SKUs in our system.
For more information, refer to:
Once you submit this request, Digital River retrieves basic product data from the referenced SKU and compliance product data from the SKU's SKU group.
This option requires that you keep the product catalog in your system synchronized with your SKUs in our system.
Harmonized system code
Export control classification number
Tax code
Digital River then accesses basic product data from productDetails
and compliance data from the referenced SKU group.
productDetails
and SKUsIf you pass productDetails
, we give you back that same data.
You must also set the line item's price
or aggregatePrice
.
If you attempt to update any other line item data, you receive a 400 Bad Request
:
In this option, before , you must define and create a for each of the product's in your catalog. Each SKU needs to contain both on that product.
For more information, refer to the and pages.
In this option, each items[]
in a must contain a skuId
.
In this option, before , you must define and create a for each product in your catalog. The SKUs only need to contain .
Before , you must also by setting the skuGroupId
. The holds the .
In this option, each items[]
in a must contain a skuId
.
If you decide to use this option, you should be aware that the following attributes are common to both and :
In , a SKU group's data precedes a SKU's data. If a common attribute is defined in a SKU but not the SKU group it belongs to, then we use the SKU's data in the checkout.
For more details, refer to on the page.
In this option, you don't store in Digital River's system.
Instead, you retrieve this data from your system and, for each items[]
in a , use it to define .
The in productDetails
should be the same as the identifier of the product in your system.
The object must also contain a skuGroupId
that references the that holds the .
Since you're not persisting any basic product data in Digital River's system, you're not required to keep the product catalog in your system synchronized with in our system.
However, prior to deployment, you need to work with Digital River to . Once defined, Digital River is responsible for managing the data in this resource.
For more information, refer to the page.
If your integration currently uses , and you're considering a migration to this option, you should be aware that the attributes in SKUs and are nearly identical.
The key exceptions are taxCode
, eccn
, and hsCode
. These attributes exist in SKUs but not in productDetails
. This is because all of these attributes contain saved in the associated .
SKUs also have a and this attribute is not in productDetails
.
In , manufacturerId
is used to set up products in warehouses. That process however is handled prior to deployment. So there's no need to set manufacturerId
in checkouts.
Whether you send productDetails
or skuId
in , the 201 Created
response always contains productDetails
.
But if your integration sends skuId
, Digital River retrieves from the referenced (along with that object's identifier) and uses it to populate the productDetails
. If you , productDetails
is also passed through to that object.
As a result, in both and , as well as their associated , such as checkout.updated
, , and , you can easily access product data without making another .
This feature is especially useful if you employ a third-party service that sends emails and other notifications to customers. These services can to listen for such as , , and , and then handle these events by retrieving data from productDetails
and passing it in the notification.
For each element in a items[]
array, you must specify quantity
. This represents the number of items selected by the customer. If you don't specify quantity
, then its value defaults to 1
.
For more information on how to do this, refer to the page.
In , you set subscriptionInfo
at the line-item level. For more information, refer to:
For each element in a items[]
array, you can set a product-level discount
.
For more information, refer to the section on the page.
If a products are shipping from multiple locations, you can specify each location using items[].shipFrom
.
For more information, refer to the section on the page.
When updating products or services in a request, you must provide the returned in the .
For each line item in the update checkout request, you're restricted to updating , a product's , and metadata
.