Inventory Management API (1.0)

The Inventory Management (Beta) API allows you to search for sku based inventory or update inventory

Common Authorization Parameters

Each request is authorized using username and password fields passed either as query parameters (for GET/POST operations) or part of the application/x-www-form-urlencoded body (for POST operations).

Error Codes

Each response contains a response_status field containing the following error codes.

Code Severity Description
10001 SUCCESS
30001 ERROR Authentication failed
31000 ERROR API not enabled on your site
40004 WARNING Product ID Not Found
50002 ERROR No conditions specified
50003 ERROR Condition N 'field' is missing
50003 ERROR Condition N 'condition' is missing
50003 ERROR date1 is invalid
50003 ERROR date2 is invalid
50004 ERROR Invalid limit or offset
50005 ERROR Invalid request parameters

Inventory Search

Retrieve a list of inventories based upon your search parameters. The maximum number of rows returned is 100. Use the returned "total" value to determine if you need to paginate using the offset parameter.
You can specify multiple conditions in which case the conditions will be joined with a logical 'AND'.
To use multiple conditions you will need to pass the parameters using the multi condition parameter format:

conditions[n][parameter name]

where n starts at 1 and "parameter name" is the name of the parameter as below.

Request Body schema: application/x-www-form-urlencoded
field
required
integer

The Field the condition is tested against.
Multi condition parameter format: conditions[n][field]

Values

  • 1: Product Code
  • 2: Product Name
  • 3: Supplier
  • 4: Product Id
  • 5: Date Modified
  • 6: Inventory Id
  • 7: Inventory On (Only allows == and != conditions. 1=true, 0=false )
condition
required
integer

The logical test to use.
Multi condition parameter name: conditions[n][condition]

Values

  • 1: ==
  • 2: !=
  • 3: <
  • 4: >
  • 5: <=
  • 6: >=
  • 7: Between
date1
string

The date to test against (Required when field is Date Modified).
The date is in ISO-8601 format, UTC timezone (YYYY-MM-DDTHH:MM:SS).
Multi condition parameter name: conditions[n][date1]

date2
string

The end date to test against (Required when field is Date Modified and condition is 7: Between).
The date is in ISO-8601 format, UTC timezone (YYYY-MM-DDTHH:MM:SS).
Multi condition parameter name: conditions[n][date2]

number1
integer

When searching by InventoryId or InventoryOn (1=true, 0=false) .
Multi condition parameter name: conditions[n][number1]

string
string

The string to test against (Required when field is Product Code, Product Name, Supplier, or Product Id). Multi condition parameter name: conditions[n][string]

include_deleted_products
integer
Default: 0

Include deleted products that match the query. Set to 1 to include deleted products.

include_deleted_skus
integer
Default: 0

Include deleted skus belonging to products that match the query. Set to 1 to include deleted skus.

limit
integer [ 0 .. 100 ]
Default: 100

Limit the number of results returned. The maximum limit is 100

offset
integer
Default: 0

Offset of the results to allow pagination

sortby
integer
Default: 1

What field to sort the results by
Values

  • 1: Product Code
  • 2: Product Name
  • 5: Date Modified
  • 6: Inventory Id

Responses

Response Schema: application/json
object (ResponseStatus)
code
required
number

the status code

severity
required
string
Enum: "SUCCESS" "ERROR"

either SUCCESS or ERROR

description
string

A description of the error. Blank when SUCCESS

Array of objects (Inventory)

An array of inventory objects

Array
product_id
required
string

The product Id

product_code
required
string

The product code

product_name
required
string

The product name

supplier
required
string

The product supplier

sku
required
string

The sku code of the product

vendor_sku
required
string

The vendor's sku code

dn_sku_id
required
string

The unique DecoNetwork identifier for the sku

dn_vsku_id
required
string

The unique DecoNetwork identifier for the vendor sku

object (ProductSize)
option_id
required
integer

The id of the product size option.

name
required
string

The option label.

code
required
string

The chosen sub sizes if the size has sub options.

object (ProductSubSize)
sub_option_id
required
integer

The id of the sub size.

name
required
string

The option label.

code
required
string

The option value.

object (ProductColor)
id
required
number

The id of the product color

name
required
string

The name of the product color

Array of objects (ColorSpec)

The definition of the product colors

Array
id
required
number

The id of the color

type
required
string

The type of color rgb/cmyk

r
number
g
number
b
number
c
number
m
number
y
number
k
number
name
string

When a spot color

id
required
string

The inventory id or null if inventory is not turned on

inv_on
required
boolean

True if inventory tracking is on for this sku

product_inv_on
required
boolean

True if inventory tracking is on for this product

inv_lvl
required
integer

The inventory on hand amount

inv_warn
required
integer

The inventory low stock warning amount

inv_reorder_to
required
integer

The inventory reorder to level amount

inv_on_order_po
required
integer

The amount of inventory that is currently on order via purchase orders to be allocated to orders

inv_on_order_stk
required
integer

The amount of inventory that is currently on order via purchase orders to be allocated to stock

inv_on_order_total
required
integer

The total amount of inventory that is currently on order via purchase orders for this sku

inv_last_modified
required
string

The date/time (ISO-8601 format, UTC timezone) the inventory was last modified

supplier_inv_lvl
integer

The supplier inventory amount

product_deleted
boolean

True if the product is deleted

sku_deleted
boolean

True if the sku is deleted

total
integer

Total number of inventories found

Request samples

Content type
application/x-www-form-urlencoded
field=5&condition=4&date1=2018-02-01T00%3A00%3A00

Response samples

Content type
application/json
{
  • "response_status": {
    • "code": 10001,
    • "severity": "SUCCESS",
    • "description": "string"
    },
  • "inventories": [
    • {
      • "product_name": "Classic T-Shirt",
      • "product_id": "215445828",
      • "inv_location": "",
      • "product_code": "1301",
      • "inv_to_order": 0,
      • "inv_lvl": 2,
      • "product_size": {
        • "option_id": 2,
        • "name": "Medium",
        • "code": "M",
        • "sub_sizes": [ ]
        },
      • "inv_warn": 0,
      • "vendor_sku": "B00137024",
      • "inv_on": true,
      • "product_inv_on": true,
      • "inv_on_order_total": 0,
      • "dn_vsku_id": "30_886",
      • "inv_reorder_to": 0,
      • "inv_on_order_po": 0,
      • "id": 2350343,
      • "supplier": "S&S Activewear",
      • "inv_on_order_stk": 0,
      • "product_color": {
        • "name": "Ash",
        • "id": 1306
        },
      • "dn_sku_id": "215445828_303990748",
      • "inv_last_modified": "2022-01-19T03:34:18",
      • "sku": "B00137024",
      • "supplier_inv_lvl": 45
      }
    ],
  • "total": 1
}

Update Inventory

Update the inventory amounts for a particular sku. Multiple inventories can be specified in one request using the "multi change format":

changes[n][parameter name] 

where "n" starts at 1, and "parameter name" is the name of the parameter as below.

Turning the inventory on for a sku will turn inventory on for the product.

Request Body schema: application/x-www-form-urlencoded
dn_sku_id
required
string

The unique DecoNetwork identifier for the sku Multi change parameter format: changes[n][dn_sku_id]

inv_on
boolean

True if inventory tracking is on for this sku Multi change parameter format: changes[n][inv_on]

inv_lvl
number

The inventory on hand amount. Multi change parameter format: changes[n][inv_lvl]

inv_warn
number

The inventory low stock waning amount. Multi change parameter format: changes[n][inv_warn]

inv_reorder_to
number

The inventory reorder to level amount. Multi change parameter format: changes[n][inv_reorder_to]

message
string

The reason for the inventory change. Multi change parameter format: changes[n][message]

supplier_inv_lvl
number

The supplier inventory amount. This can only be used for custom defined suppliers. Multi change parameter format: changes[n][supplier_inv_lvl]

operator_id
number

The id of the operator making the change. If not specified, the operator with the username/password sent will be used. Multi change parameter format: changes[n][operator_id]

operator_login
string

The login of the operator making the change. Can be used if the id of the operator is unknown. Multi change parameter format: changes[n][operator_login]

Responses

Response Schema: application/json
object (ResponseStatus)
code
required
number

the status code

severity
required
string
Enum: "SUCCESS" "ERROR"

either SUCCESS or ERROR

description
string

A description of the error. Blank when SUCCESS

Request samples

Content type
application/x-www-form-urlencoded
dn_sku_id=196171378&inv_lvl=2&operator_login=bob123

Response samples

Content type
application/json
{
  • "response_status": {
    • "code": 10001,
    • "severity": "SUCCESS",
    • "description": "string"
    }
}