Create or update inventory
Changed onCreate or update inventory levels for products at specific store locations. Rows referencing an unknown product or store location are skipped and returned in the same array with errorCode/errorMessage set; the rest of the batch still commits.
Request
- Base URLhttps://api.sandbox.usenash.com
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"inventory": [
{
"externalProductId": "ext_001",
"externalStoreLocationId": "store_001",
"quantity": 50,
"valueCents": 299,
"currency": "USD",
"available": true,
"location": {
"aisle": "Aisle 5",
"bay": "Bay 3",
"shelf": "Shelf 2"
},
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
},
"taxPercentage": 0.1
},
"providerConfigs": [
{
"currency": "USD",
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 135
}
},
"discount": {
"endTime": "2025-12-17T00:00:00Z",
"startTime": "2025-12-10T00:00:00Z",
"valueCents": 270
},
"provider": "X",
"serviceType": "pick_and_deliver",
"valueCents": 299
}
]
}
]
}Response
OK
Example response
[
{
"id": "inv_123",
"productId": "prod_123",
"externalProductId": "ext_001",
"storeLocationId": "store_001",
"externalStoreLocationId": "ext_store_002",
"quantity": 50,
"valueCents": 299,
"currency": "USD",
"available": true,
"location": {
"aisle": "Aisle 5",
"bay": "Bay 3",
"shelf": "Shelf 2"
},
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
},
"taxPercentage": 0.1
},
"providerConfigs": [
{
"provider": "X",
"serviceType": "pick_and_deliver",
"valueCents": 299,
"currency": "USD",
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
},
"taxPercentage": 0.1
},
"available": true,
"discount": {
"valueCents": 270,
"startTime": "2025-12-10T00:00:00Z",
"endTime": "2025-12-17T00:00:00Z"
},
"taxPercentage": 0.1
}
],
"errorCode": "MISSING_RESOURCE",
"errorMessage": "Product 'ext_001' not found."
}
]Changes
- breaking
response property
items/availablelist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - breaking
response property
items/idlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - breaking
response property
items/productIdlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - breaking
response property
items/quantitylist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - breaking
response property
items/storeLocationIdlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - info
the response property
/became required for the status - info
the response property
/became required for the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status
- breaking