Store Catalog

Create or update inventory

Create 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.

post/v1/inventory

Request

  • Base URL
    https://api.sandbox.usenash.com
  • Auth
    none declared

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

idstring nullable required

Null when the row was skipped.

productIdstring nullable required

The product ID associated with this inventory item. Null when the row was skipped.

externalProductIdstring nullable required

The external product ID from an external system

storeLocationIdstring nullable required

The store location ID where this inventory is located. Null when the row was skipped.

externalStoreLocationIdstring nullable required

The external store ID from an external system

quantityinteger nullable required

The quantity of the product in stock. Null when the row was skipped.

valueCentsinteger nullable

The price of the product in cents

currencystring nullable

The currency code for the product price

availableboolean nullable required

Whether the product is available for purchase. Null when the row was skipped.

errorCodestring nullable required

Set when this row was skipped (unknown product or store location); null on success.

errorMessagestring nullable required

Why the row was skipped; null on success.

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

No recorded changes to this operation across all 1 revision of this API.