Order API - Get Stock

Get stock

GET *base*/stock Authentication : API Key

This will return product data from Centra with stock info. The values of the stock depends on the connected warehouses for the API-plugin.

Parameters

sku
string
optional

Get products with a specific SKU.

modified
date/datetime
optional

Get all products modified after a certain date. Allowed formats YYYY-mm-dd and YYYY-mm-dd HH:MM:SS. Timezone is system-wide and decided by the company using Centra.

stock_modified
date/datetime
optional

Get all products which had stock changes after a certain date. Allowed formats YYYY-mm-dd and YYYY-mm-dd HH:MM:SS. Timezone is system-wide and decided by the company using Centra.

created
date/datetime
optional

Get all products added after a certain date. Allowed formats YYYY-mm-dd and YYYY-mm-dd HH:MM:SS. Timezone is system-wide and decided by the company using Centra.

ean
string
optional

Get a product with specified EAN code.

productId variantId stockItemId
int
optional

Get a product with specified productId, variantId or stockItemId.

limit
int
optional

You will get this amount of products, and a "next" parameter in return if there are multiple pages. This will go a lot faster to fetch, instead of fetching all products at once.

include
string
optional

include=attributes will also make the products include the custom attributes defined for each product and variant.

exclude
string
optional

exclude=physicalStock will exclude fetching physical stock which will speed up the fetching of the stock values.

xml
boolean
optional

Response in xml format instead of json.

Request example

GET <base>/stock?[&limit=2][&sku=DCG001][&modified=2016-01-01+12:10:11][&created=2011-01-01] HTTP/1.1

Response

200 Content-type: application/json

status
string
required

ok if success, else no.

products
array
optional

List of the products.

sku
string
optional

SKU for this product.

product
string
optional

The internal name for this product.

productId
int
optional

The ID for this product.

variantSku
string
optional

SKU for this variant.

variantId
int
optional

ID for this variant.

sizeSku
string
optional

SKU for this size.

stockItemId
int
optional

ID for this specific stock item.

ean
string
optional

The EAN for this product item size.

weight
decimal2 (0.00)
optional

The weight specified for this product.

weightUnit
string
optional

The unit used for the weight.

  • kg
  • lb

Previous article: Order API - Get Products
Next article: Order API - Get Customer