curl --request POST \
--url https://api.sandbox.usenash.com/v1/inventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inventory": [
{
"available": true,
"externalProductId": "ext_001",
"externalStoreLocationId": "store_001",
"quantity": 50,
"valueCents": 299,
"currency": "USD",
"location": {
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
},
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
}
},
"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
}
]
}
]
}
'import requests
url = "https://api.sandbox.usenash.com/v1/inventory"
payload = { "inventory": [
{
"available": True,
"externalProductId": "ext_001",
"externalStoreLocationId": "store_001",
"quantity": 50,
"valueCents": 299,
"currency": "USD",
"location": {
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
},
"details": { "weightedItemInfo": { "valueCentsPerMeasurementUnit": 120 } },
"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
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inventory: [
{
available: true,
externalProductId: 'ext_001',
externalStoreLocationId: 'store_001',
quantity: 50,
valueCents: 299,
currency: 'USD',
location: {aisle: 'Produce', bay: 'Fruits', shelf: 'Bananas'},
details: {weightedItemInfo: {valueCentsPerMeasurementUnit: 120}},
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
}
]
}
]
})
};
fetch('https://api.sandbox.usenash.com/v1/inventory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.usenash.com/v1/inventory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inventory' => [
[
'available' => true,
'externalProductId' => 'ext_001',
'externalStoreLocationId' => 'store_001',
'quantity' => 50,
'valueCents' => 299,
'currency' => 'USD',
'location' => [
'aisle' => 'Produce',
'bay' => 'Fruits',
'shelf' => 'Bananas'
],
'details' => [
'weightedItemInfo' => [
'valueCentsPerMeasurementUnit' => 120
]
],
'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
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/inventory"
payload := strings.NewReader("{\n \"inventory\": [\n {\n \"available\": true,\n \"externalProductId\": \"ext_001\",\n \"externalStoreLocationId\": \"store_001\",\n \"quantity\": 50,\n \"valueCents\": 299,\n \"currency\": \"USD\",\n \"location\": {\n \"aisle\": \"Produce\",\n \"bay\": \"Fruits\",\n \"shelf\": \"Bananas\"\n },\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 120\n }\n },\n \"providerConfigs\": [\n {\n \"currency\": \"USD\",\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 135\n }\n },\n \"discount\": {\n \"endTime\": \"2025-12-17T00:00:00Z\",\n \"startTime\": \"2025-12-10T00:00:00Z\",\n \"valueCents\": 270\n },\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\",\n \"valueCents\": 299\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.usenash.com/v1/inventory")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inventory\": [\n {\n \"available\": true,\n \"externalProductId\": \"ext_001\",\n \"externalStoreLocationId\": \"store_001\",\n \"quantity\": 50,\n \"valueCents\": 299,\n \"currency\": \"USD\",\n \"location\": {\n \"aisle\": \"Produce\",\n \"bay\": \"Fruits\",\n \"shelf\": \"Bananas\"\n },\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 120\n }\n },\n \"providerConfigs\": [\n {\n \"currency\": \"USD\",\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 135\n }\n },\n \"discount\": {\n \"endTime\": \"2025-12-17T00:00:00Z\",\n \"startTime\": \"2025-12-10T00:00:00Z\",\n \"valueCents\": 270\n },\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\",\n \"valueCents\": 299\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inventory\": [\n {\n \"available\": true,\n \"externalProductId\": \"ext_001\",\n \"externalStoreLocationId\": \"store_001\",\n \"quantity\": 50,\n \"valueCents\": 299,\n \"currency\": \"USD\",\n \"location\": {\n \"aisle\": \"Produce\",\n \"bay\": \"Fruits\",\n \"shelf\": \"Bananas\"\n },\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 120\n }\n },\n \"providerConfigs\": [\n {\n \"currency\": \"USD\",\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 135\n }\n },\n \"discount\": {\n \"endTime\": \"2025-12-17T00:00:00Z\",\n \"startTime\": \"2025-12-10T00:00:00Z\",\n \"valueCents\": 270\n },\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\",\n \"valueCents\": 299\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"productId": "prod_123",
"storeLocationId": "store_001",
"quantity": 50,
"available": true,
"externalProductId": "ext_001",
"externalStoreLocationId": "ext_store_002",
"valueCents": 299,
"currency": "USD",
"location": {
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
},
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
}
},
"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
}
]
}
][
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Create or update inventory
Create or update inventory levels for products at specific store locations. Links products to store locations with quantity and availability information.
curl --request POST \
--url https://api.sandbox.usenash.com/v1/inventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inventory": [
{
"available": true,
"externalProductId": "ext_001",
"externalStoreLocationId": "store_001",
"quantity": 50,
"valueCents": 299,
"currency": "USD",
"location": {
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
},
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
}
},
"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
}
]
}
]
}
'import requests
url = "https://api.sandbox.usenash.com/v1/inventory"
payload = { "inventory": [
{
"available": True,
"externalProductId": "ext_001",
"externalStoreLocationId": "store_001",
"quantity": 50,
"valueCents": 299,
"currency": "USD",
"location": {
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
},
"details": { "weightedItemInfo": { "valueCentsPerMeasurementUnit": 120 } },
"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
}
]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inventory: [
{
available: true,
externalProductId: 'ext_001',
externalStoreLocationId: 'store_001',
quantity: 50,
valueCents: 299,
currency: 'USD',
location: {aisle: 'Produce', bay: 'Fruits', shelf: 'Bananas'},
details: {weightedItemInfo: {valueCentsPerMeasurementUnit: 120}},
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
}
]
}
]
})
};
fetch('https://api.sandbox.usenash.com/v1/inventory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.usenash.com/v1/inventory",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inventory' => [
[
'available' => true,
'externalProductId' => 'ext_001',
'externalStoreLocationId' => 'store_001',
'quantity' => 50,
'valueCents' => 299,
'currency' => 'USD',
'location' => [
'aisle' => 'Produce',
'bay' => 'Fruits',
'shelf' => 'Bananas'
],
'details' => [
'weightedItemInfo' => [
'valueCentsPerMeasurementUnit' => 120
]
],
'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
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/inventory"
payload := strings.NewReader("{\n \"inventory\": [\n {\n \"available\": true,\n \"externalProductId\": \"ext_001\",\n \"externalStoreLocationId\": \"store_001\",\n \"quantity\": 50,\n \"valueCents\": 299,\n \"currency\": \"USD\",\n \"location\": {\n \"aisle\": \"Produce\",\n \"bay\": \"Fruits\",\n \"shelf\": \"Bananas\"\n },\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 120\n }\n },\n \"providerConfigs\": [\n {\n \"currency\": \"USD\",\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 135\n }\n },\n \"discount\": {\n \"endTime\": \"2025-12-17T00:00:00Z\",\n \"startTime\": \"2025-12-10T00:00:00Z\",\n \"valueCents\": 270\n },\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\",\n \"valueCents\": 299\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.usenash.com/v1/inventory")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inventory\": [\n {\n \"available\": true,\n \"externalProductId\": \"ext_001\",\n \"externalStoreLocationId\": \"store_001\",\n \"quantity\": 50,\n \"valueCents\": 299,\n \"currency\": \"USD\",\n \"location\": {\n \"aisle\": \"Produce\",\n \"bay\": \"Fruits\",\n \"shelf\": \"Bananas\"\n },\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 120\n }\n },\n \"providerConfigs\": [\n {\n \"currency\": \"USD\",\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 135\n }\n },\n \"discount\": {\n \"endTime\": \"2025-12-17T00:00:00Z\",\n \"startTime\": \"2025-12-10T00:00:00Z\",\n \"valueCents\": 270\n },\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\",\n \"valueCents\": 299\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inventory\": [\n {\n \"available\": true,\n \"externalProductId\": \"ext_001\",\n \"externalStoreLocationId\": \"store_001\",\n \"quantity\": 50,\n \"valueCents\": 299,\n \"currency\": \"USD\",\n \"location\": {\n \"aisle\": \"Produce\",\n \"bay\": \"Fruits\",\n \"shelf\": \"Bananas\"\n },\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 120\n }\n },\n \"providerConfigs\": [\n {\n \"currency\": \"USD\",\n \"details\": {\n \"weightedItemInfo\": {\n \"valueCentsPerMeasurementUnit\": 135\n }\n },\n \"discount\": {\n \"endTime\": \"2025-12-17T00:00:00Z\",\n \"startTime\": \"2025-12-10T00:00:00Z\",\n \"valueCents\": 270\n },\n \"provider\": \"X\",\n \"serviceType\": \"pick_and_deliver\",\n \"valueCents\": 299\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"productId": "prod_123",
"storeLocationId": "store_001",
"quantity": 50,
"available": true,
"externalProductId": "ext_001",
"externalStoreLocationId": "ext_store_002",
"valueCents": 299,
"currency": "USD",
"location": {
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
},
"details": {
"weightedItemInfo": {
"valueCentsPerMeasurementUnit": 120
}
},
"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
}
]
}
][
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
List of store inventory to create or update
Show child attributes
Show child attributes
Response
OK
The product ID associated with this inventory item
"prod_123"
The store location ID where this inventory is located
"store_001"
The quantity of the product in stock
50
Whether the product is available for purchase
true
The external product ID from an external system
"ext_001"
The external store ID from an external system
"ext_store_002"
The price of the product in cents
299
The currency code for the product price
"USD"
The location data for the product in the store
Show child attributes
Show child attributes
{
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
}
Additional inventory details
Show child attributes
Show child attributes
{
"weightedItemInfo": { "valueCentsPerMeasurementUnit": 120 }
}
Provider-specific configurations for this inventory item
Show child attributes
Show child attributes
[
{
"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
}
]
Was this page helpful?