Product Management API (1.0)

The Product Management API allows you to search for products

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

Product Search

Retrieve a list of products 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 join 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
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 a date).
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 a date 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]

string
string

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

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: 6

What field to sort the results by
Values

  • 1: Product Code
  • 2: Product Name
  • 3: Product Supplier
  • 4: Product Id
  • 5: Date Modified
  • 6: Sort Position

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 (Product)

An array of product 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 name of the supplier

brand
required
string

The brand name of the product

is_active
required
boolean

True if the product is active

Array of objects (Category)

List of categories this product has

Array
id
required
number
Default: 0

The id of the category

name
required
string

The name of the category

ancestors
object (Category) Recursive
date_modified
required
string

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

total
integer

The total number of products 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": 0,
    • "severity": "SUCCESS",
    • "description": ""
    },
  • "products": [
    • {
      • "product_id": "19658",
      • "product_code": "2000",
      • "product_name": "Ultra Cotton 100% Cotton T Shirt",
      • "supplier": "Sanmar",
      • "brand": "Gildan",
      • "is_active": true,
      • "categories": [
        • {
          • "id": 234453,
          • "name": "Shirts",
          • "ancestors": {
            • "id": 234234,
            • "name": "Apparel",
            • "ancestors": { }
            }
          }
        ],
      • "date_modified": "2018-12-05T00:00:00"
      },
    • {
      • "product_id": "456456",
      • "product_code": "2000B",
      • "product_name": "Heavy Ultra Cotton 100% Cotton T Shirt",
      • "supplier": "Sanmar",
      • "brand": "Gildan",
      • "is_active": true,
      • "categories": [
        • {
          • "id": 234453,
          • "name": "Shirts",
          • "ancestors": {
            • "id": 234234,
            • "name": "Apparel",
            • "ancestors": { }
            }
          }
        ],
      • "date_modified": "2018-12-05T00:00:00"
      }
    ],
  • "total": 2
}

Get Product

Get a single product or a list of products

query Parameters
id
number
Example: id=234

the id of the product

ids
string
Example: ids=1234567,124234,23434

a comma separated list of product ids (max 100)

Responses

Response Schema: application/json
required
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

object (ProductDetailed)
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 name of the supplier

brand
required
string

The brand name of the product

is_active
required
boolean

True if the product is active

Array of objects (Category)

List of categories this product has

Array
id
required
number
Default: 0

The id of the category

name
required
string

The name of the category

ancestors
object (Category) Recursive
date_modified
required
string

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

Array of objects (Size)

List of sizes the product has

Array
id
required
integer

The id of the size

name
required
string

The name of the size

code
required
string

The code of the size

Array of objects (SubSize)

List of sub sizes the size has

Array
id
integer

The id of the sub size

name
string

The name of the sub size

code
string

The code of the sub size

Array of objects (SimpleProductColor)

List of colors the product has

Array
id
required
integer

The id of the color

name
required
string

The name of the color (multi color products are joined with a /)

Array of objects (Sku)

List of skus the product has

Array
size_id
integer

The id of the size matching the size field

subsize_id
integer

The id of the sub size matching the size fields sub options (0 = no sub size)

color_id
integer

The id of the color matching the color field

sku
string

The sku code of the sku

gtin
string

The gtin of the sku

dn_sku_id
string

The deconetwork id of the sku

price
number <float>

The price of the sku

cost
number <float>

The cost of the sku

Array of objects (ProductDetailed)

An array of product details when the ids parameter is used

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 name of the supplier

brand
required
string

The brand name of the product

is_active
required
boolean

True if the product is active

Array of objects (Category)

List of categories this product has

Array
id
required
number
Default: 0

The id of the category

name
required
string

The name of the category

ancestors
object (Category) Recursive
date_modified
required
string

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

Array of objects (Size)

List of sizes the product has

Array
id
required
integer

The id of the size

name
required
string

The name of the size

code
required
string

The code of the size

Array of objects (SubSize)

List of sub sizes the size has

Array
id
integer

The id of the sub size

name
string

The name of the sub size

code
string

The code of the sub size

Array of objects (SimpleProductColor)

List of colors the product has

Array
id
required
integer

The id of the color

name
required
string

The name of the color (multi color products are joined with a /)

Array of objects (Sku)

List of skus the product has

Array
size_id
integer

The id of the size matching the size field

subsize_id
integer

The id of the sub size matching the size fields sub options (0 = no sub size)

color_id
integer

The id of the color matching the color field

sku
string

The sku code of the sku

gtin
string

The gtin of the sku

dn_sku_id
string

The deconetwork id of the sku

price
number <float>

The price of the sku

cost
number <float>

The cost of the sku

Response samples

Content type
application/json
Example
{
  • "response_status": {
    • "code": 0,
    • "severity": "SUCCESS",
    • "description": "string"
    },
  • "product": {
    • "product_id": "19658",
    • "product_code": "2000",
    • "product_name": "Ultra Cotton 100% Cotton T Shirt",
    • "supplier": "Sanmar",
    • "brand": "Gildan",
    • "is_active": true,
    • "categories": [
      • {
        • "id": 6345,
        • "name": "Apparel",
        • "ancestors": { }
        }
      ],
    • "date_modified": "2018-12-05T00:00:00",
    • "sizes": [
      • {
        • "id": 6345,
        • "name": "Medium",
        • "code": "M",
        • "sub_options": [
          • {
            • "id": 743546,
            • "name": "Long",
            • "code": "L"
            }
          ]
        }
      ],
    • "colors": [
      • {
        • "id": 5675,
        • "name": "Black"
        }
      ],
    • "skus": [
      • {
        • "size_id": 6345,
        • "subsize_id": 743546,
        • "color_id": 5675,
        • "sku": "C44A12",
        • "gtin": "0034534550345",
        • "dn_sku_id": "123423513",
        • "price": 5.5,
        • "cost": 3.5
        }
      ]
    }
}