Skip to main content
POST
/
v1
/
inventory
Create or update inventory
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
            }
          },
          "provider": "X",
          "serviceType": "pick_and_deliver",
          "valueCents": 299
        }
      ]
    }
  ]
}
'
[
  {
    "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
          }
        },
        "provider": "X",
        "serviceType": "pick_and_deliver",
        "valueCents": 299
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
inventory
StoreInventoryInputSerializer · object[]
required

List of store inventory to create or update

Response

OK

id
string
required
productId
string
required

The product ID associated with this inventory item

Example:

"prod_123"

storeLocationId
string
required

The store location ID where this inventory is located

Example:

"store_001"

quantity
integer
required

The quantity of the product in stock

Example:

50

available
boolean
required

Whether the product is available for purchase

Example:

true

externalProductId
string | null

The external product ID from an external system

Example:

"ext_001"

externalStoreLocationId
string | null

The external store ID from an external system

Example:

"ext_store_002"

valueCents
integer | null

The price of the product in cents

Example:

299

currency
string | null

The currency code for the product price

Example:

"USD"

location
LocationDataOutputSerializer · object

The location data for the product in the store

Example:
{
"aisle": "Produce",
"bay": "Fruits",
"shelf": "Bananas"
}
details
StoreInventoryDetailsOutputSerializer · object

Additional inventory details

Example:
{
"weightedItemInfo": { "valueCentsPerMeasurementUnit": 120 }
}
providerConfigs
InventoryProviderConfigOutputSerializer · object[] | null

Provider-specific configurations for this inventory item

Example:
[
{
"currency": "USD",
"details": {
"weightedItemInfo": { "valueCentsPerMeasurementUnit": 135 }
},
"provider": "X",
"serviceType": "pick_and_deliver",
"valueCents": 299
}
]