Managing inventory items
Learn how to manage inventory items
In the distributed model, you must define an inventory item and then create the resource. Once created, you can then update or delete the resource. In this model, you also need to ensure that the shared attributes of SKU-inventory item pairs remain synchronized.
In both the distributed model and the orchestrated model, you use an inventory item's unique identifier to check inventory levels, request shipping quotes, and reserve products during the checkout process.
In the distributed model, you must also use an inventory item's unique identifier when creating a fulfillment order.

Defining an inventory item

The following are some of an inventory item's key definable attributes. For comprehensive specifications, refer to the Inventory Items API reference documentation.

Unique identifier

An inventory item's unique identifier is represented by id.
When creating inventory items, if you don't specify id, Digital River generates a value for you.
However, the product identifier in your system should match the inventory item's id in our system. As a result, we recommend that you specify your own inventory id and that it matches your product's designated universally unique identifier.

Country of origin

An inventory item's countryOfOrigin is a two-letter Alpha-2 country code as described in the ISO 3166 international standard. Invalid country codes return a 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!

ECCN

An inventory item's eccn represents an Export Control Classification Number (ECCN). This value determines whether:
  • A product requires a U.S. export/re-export license
  • A product contains any other license requirements/restrictions
  • A product has an end use which is prohibited by applicable export control laws
Digital River's legal documentation lists ECCNs pre-approved for use in the Digital River APIs. In the table's description field, you may find additional requirements and restrictions that further limit the use of the ECCN.
Digital River can only resell products with these listed ECCNs. If you have a product with an ECCN that you'd like to be considered for addition to the list, please contact [email protected]

Harmonized system code

An inventory item's hsCode represents a Harmonized System code.
The format of the code is ####.##.####, where # represents a numeric digit between 0 and 9. The first six digits are mandatory. Any code longer than six digits but less than ten digits is optional and based on the country's preference. The period is not included in the character count.
Digital River only validates that the format of a Harmonized System code you provide is correct. We don't determine whether the code accurately classifies your product.
For example, the full ten-digit code for Jasmine rice in the United States is 1006.20.40.25. If that's the value you specify, we don't check to make sure your product fits into that category.
Incorrectly formatted hsCode values return a 400 Bad Request:
JSON
1
{
2
"type": "bad_request",
3
"errors": [
4
{
5
"code": "invalid_parameter",
6
"parameter": "hsCode",
7
"message": "'1234.56.YW' is not a valid HS code."
8
}
9
]
10
}
Copied!

Manufacturer identifier and part number

An inventory item contains manufacturerId and partNumber fields.
The manufacturerId signifies the unique identifier of a part/product's manufacturer.
A manufacturer part number (MPN) is a unique code issued by manufacturers to identify a part/product. It is represented by partNumber.
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/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.

Allow oversell

You may decide to build your integration such that customers can reserve out of stock items or pre-order items not yet in stock. To do this, you can use an inventory item's allowOversell flag.
If you set the flag to true, customers can reserve the item even when inventory is not available. When set to false, customers won't be able to place a hold on an item when its inventory levels are not sufficient.
In Digital River coordinated fulfillments, you can override allowOversell during the product reservation process.

Inventory Items API operations

Creating and updating inventory items

The Inventory Items API allows you to create and update inventory items.
In Digital River coordinated fulfillments that use the orchestrated model, do not directly create or update inventory items.
For more information, refer to managed fulfillments on the Managing SKUs page.
The methods to create and update inventory items are similar, with one major difference. In create requests, you're allowed to specify a unique identifier. When updating items you must send that identifier as a path parameter.
Create an inventory item
Update an inventory item
1
curl --location --request POST 'http://dispatch-test.digitalriver.com/inventory-items' \
2
--header 'Authorization: Bearer <API_key>' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"id": "8d7b212f-2a19-4530-84b9-aa76e8dad4eb",
6
"manufacturerId": "20013",
7
"partNumber": "DEMOPARTNUMBER2",
8
"eccn": "EAR99",
9
"hsCode": "6404.20",
10
"countryOfOrigin": "DK",
11
"allowOversell": false
12
}'
Copied!
1
curl --location --request POST 'http://dispatch-test.digitalriver.com/inventory-items/8d7b212f-2a19-4530-84b9-aa76e8dad4eb' \
2
--header 'Authorization: Bearer <API_key>' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"countryOfOrigin": "CA",
6
"allowOversell": true
7
}'
Copied!
For both POST/inventory-items and POST/inventory-items/{id} requests, however, you can specify a part number, Export Control Classification Number, Harmonized System code, and country of origin. You can also tell us whether you want to allow overselling of that item.

Retrieve inventory items

Searching inventory items

Deleting inventory items

The Inventory Items API allows you to permanently delete an inventory item by supplying its unique identifier.
In Digital River coordinated fulfillments that use the orchestrated model, you should not directly delete inventory items.
For more information, refer to managed fulfillments on the Managing SKUs page.