Inventory

Inventory API
GET /exchanges/inventory/{item_id}

Authentication

BasicAuth

Inventory API for Exchanges

Path variables

item_id
string required

Request parameters

item_id
string optional

Product resource to represent one version of a product with several options

Example:
5188667
location
string optional

If value present, inventory would be fetched based on the location

Example:
6719910
retailer
string optional

Reperesent the brand identifier. if the OMS instance support multiple brands and needs filter based on the brand

Example:
peninsula

Responses

200 OK
Body
application/json;charset=UTF-8
Object
id
string

Item id or product id retrieved with unique to an item

Example:
9999
inventory
Array

Array of item inventory retrieved based on location

Object
variant_id
string

Id of the variant that represent one version of a product with several options.

Example:
1111
title
string nullable

Product or Item name

Example:
White Jacket
location_id
string nullable

Location id specific

Example:
134567
exchange_eligibility
boolean nullable

Eligibility of item, if available , Default is true

Default:
true
available_quantity
integer required

Quantity of items available for exchange. This would be used as default eligibility criteria for exchange e.g if value = 0 , item would be in-eligible for exchange

Example:
5
stock_quantity
integer nullable

Threshold quantity that could be used to represent the

Example:
10
item_image
string nullable

Image of the item variant

Example:
https://www.peninsulatrading.com/media/catalog/product/cache/14/image/400x/9df78eab33525d08d6e5fb8d27136e95/image.jpg
attributes
Object

Array of custom attributes (name-value pair) . Name would be used for <option> >> “attribute_code” mapping

price
string

Item price

Example:
20.00
currency
string nullable

Curreny denomination

Example:
USD
weight
string nullable

Weight

Example:
2.12
uom
string nullable

Unit of measurement

Example:
lbs
size
string required

Size attribute

Example:
20
color
string required

Color id/code

Example:
White
material
string nullable
Example:
Cotton
sku
string

item sku

price
string

price of the item

string
options
Array

Array of options for display

Object
title
string required

Displayable title of attribute

Example:
Size
code
string required

Attribute code mapped to key value of “attributes”

Example:
size
values
Array required

Unique values of the attributes

Example:
["10","20","30"]
string
Example:
10
Example 1
GET /exchanges/inventory/{item_id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
  "id": "9999",
  "inventory": [
    {
        "variant_id" : "1111",
        "title" : "White Jacket",
        "location_id" : "134567",
        "exchange_eligibility" : "true",
        "available_quantity" : 5,
        "stock_quantity" : 10,
        "item_image" : "https://peninsula.com/media/catalog/product/cache/14/image/400x/9df78eab33525d08d6e5fb8d27136e95/image.jpg",
        "attributes" : {
            "price" : "20.00",
            "currency" : "USD",
            "weight" : "2.12",
            "uom" : "lbs",
            "size" : "10",
            "color" : "White",
            "material" : "Cotton"
        }
    },
    {
        "variant_id" : "2222",
        "title" : "White Jacket",
        "location_id" : "134567",
        "exchange_eligibility" : "true",
        "item_image" : "https://peninsula.com/media/catalog/product/cache/14/image/400x/9df78eab33525d08d6e5fb8d27136e95/image.jpg",
        "available_quantity" : 2,
        "stock_quantity" : 10,
        "attributes" : {
            "price" : "20.00",
            "currency" : "USD",
            "weight" : "2.12",
            "uom" : "lbs",
            "size" : "20",
            "color" : "White",
            "material" : "Cotton"
        }
    },
    {
        "variant_id" : "3333",
        "title" : "Blue Jacket",
        "location_id" : "134567",
        "exchange_eligibility" : "true",
        "item_image" : "https://peninsula.com/media/catalog/product/cache/14/image/400x/9df78eab33525d08d6e5fb8d27136e95/image.jpg",
        "available_quantity" : 6,
        "stock_quantity" : 10,
        "attributes" : {
            "price" : "20.00",
            "currency" : "USD",
            "available_quantity" : "1",
            "weight" : "2.12",
            "uom" : "lbs",
            "size" : "10",
            "color" : "Blue",
            "material" : "Polyester"
        }
    }
  ],
  "options" : [
    {
        "title" : "Size",
        "code" : "size",
        "values" : [
            "10",
            "20",
            "30"
        ]
    },
    {
        "title" : "Color",
        "code" : "color",
        "values" : [
            "White",
            "Blue"
        ]
    },
    {
        "title" : "Material",
        "code" : "material",
        "values" : [
            "Cotton",
            "Polyester"
        ]
    }
  ]
}