Skip to main content
POST
/
inventories
/
{productVariantId}
/
{locationId}
Create Inventory
curl --request POST \
  --url https://api.loopreturns.com/api/v1/inventories/{productVariantId}/{locationId} \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '
{
  "available_count": 123
}
'
{
  "available_count": 123,
  "product_variant": [
    {
      "id": 123,
      "external_id": "<string>",
      "sku": "<string>",
      "name": "<string>",
      "weight_grams": 123,
      "barcode": "<string>"
    }
  ],
  "location": [
    {
      "id": 123,
      "external_id": "<string>",
      "name": "<string>",
      "status": "active",
      "address": [
        {
          "name": "<string>",
          "company": "<string>",
          "address1": "<string>",
          "address2": "<string>",
          "city": "<string>",
          "region": "<string>",
          "postal_code": "<string>",
          "country_code": "<string>"
        }
      ]
    }
  ]
}

Authorizations

X-Authorization
string
header
required

API Scope: "Inventory (write)"

Path Parameters

productVariantId
integer
required

The unique identifier for the product variant, created by Loop.

Example:

653985747439023600

locationId
integer
required

The unique identifier for the location, created by Loop.

Example:

631923350119788400

Body

application/json
available_count
integer<int64>
required

The number of product_variants available at location.

Example:

42

Response

Success

available_count
integer<int64>

The number of product_variants available at location.

Example:

42

product_variant
object[]

The details associated with the inventory's product_variant.

location
object[]

The details associated with the inventory's location.