The Products resource allows users to add their products to the BoxC system. A product can have one or more Stock Keeping Units (SKUs). This gives users the ability to link their different shops' SKUs to the same product. There can only be one active SKU per shop per product. Orders won't be fulfilled until the warehouse accepts and processes your products. This includes measuring the weight and dimensions, and updating the quantity.

Note: Products and SKUs linked to orders can't be deleted. Existing SKUs can't be assigned to a different shop.

Actions

GET /products Retrieves a paginated list of products
GET /products/{id} Retrieves a product
POST /products Creates a product
POST /products/barcodes Create a PDF with up to 100 barcodes
PUT /products/{id} Updates a product
DELETE /products/{id} Deletes a product
POST /products/{id}/skus Adds a SKU to a product
PUT /products/{id}/shop/{id}/sku/{id} Updates a SKU
DELETE /products/{id}/shop/{id}/sku/{id} Deletes a SKU

Properties

backordered

{"backordered": 43}

Integer - The quantity that's backordered for this product. Set by the system.
barcode

{"barcode": "4011200296908"}

String - The barcode for this product such as UPC, EAN, ISBN, etc. Max length: 32. Default: product ID.
coo

{"coo": "CN"}

String - The country of origin or where the product was manufactured in ISO 3166-1 alpha-2 format for Customs. Required.
description

{"description": "100% Cotton Shirt"}

String - The product description for reference. Required. Max length: 64.
dg_code

{"dg_code": "0966"}

String - A code that identifies dangerous goods. Required if shipping lithium batteries, ORM-D, or other dangerous goods. Refer to this page for a list of codes and further information. Default: null.
dimensions

{
    "dimensions": {
        "width": 1.5,
        "height": 0.75
    }
}

Object - The dimensions of the barcode in inches. Only used when bulk printing.

height: The height of the PDF. Min: 0.5, Max: 4, Default: 1
width: The width of the PDF. Min: 0.5, Max: 4, Default: 2
height

{"height": 5}

Integer - The product height in CM. Set by the system.
hs_code

{"hs_code": "3109165102"}

String - The Harmonized System classification number for Customs clearance (read more). Required for shipments to the US with a combined value greater than $800 (USD). Default: null.
id

{"id": 20191}

Integer - The product ID. Set by the system.
length

{"length": 12}

Integer - The product length in CM. Set by the system.
local_descriptions

{
    "local_descriptions": [
        {
            "description": "100% Cotton T-Shirt",
            "language_code": "en"
        },
        {
            "description": "\u6bdb\u8863",
            "language_code": "zh"
        }
    ]
}

Array - A list of product descriptions in different languages. Only used to update the description in a warehouse's local language. It will update all descriptions with a matching language_code. Required if the product is actually inventoried at warehouses.

description: String - The product description in the language indicated by language_code. Required. Max length: 64
language_code: String - The local language code for the warehouse in ISO 639-1 format. Required.
name

{"name": "XL Pink T-Shirt"}

String - The product name to help identify the product. Required. Min length: 3. Max length: 64.
quantity

{"quantity": 544}

Integer - The quantity on hand across all warehouses. Set by the system.
skus

{
    "skus": [
        {
            "active": true,
            "shop_id": "my-shop",
            "sku": "SK10291"
        },
        {
            "active": false,
            "shop_id": "my-shop",
            "sku": "08X092"
        }
    ]
}

Array - An array of SKUs that reference this product. Required.

active: Boolean - Whether or not this SKU is active. Orders with an inactive SKU will not be imported or created. Default: true.
shop_id: String - The shop ID associated with this SKU. Required.
sku: String - The SKU identifier. Required. Min length: 3. Max length: 32.
value

{"value": 19.99}

Decimal - The product value in USD. Required.
warehouses

{
    "warehouses": [
        {
            "description": "\u6bdb\u8863",
            "id": "WH0HK001",
            "language": "Chinese",
            "language_code": "zh",
            "quantity": 102
        },
        {
            "description": "\u6bdb\u8863",
            "id": "WH0SZ001",
            "language": "Chinese",
            "language_code": "zh",
            "quantity": 0
        }
    ]
}

Array - An array of warehouses and their inventory for this product. Only present when retrieving a single product. Set by the system.

description: String - The product description in the local language.
id: String - The unique warehouse ID.
language: String - The local language for the warehouse.
language_code: String - The local language code for the warehouse in ISO 639-1 format.
quantity: Integer - The quantity on hand.
weight

{"weight": 0.325}

Decimal - The product weight in KG. Set by the system.
width

{"width": 10}

Integer - The product width in CM. Set by the system.
GET
/products/{id}
Retrieves a product
type The data stream type for printing the product barcode. Only PDF is accepted.
height The height of the barcode in inches. Default: 1. Min: 0.5, Max: 4
width The width of the barcode in inches. Default: 2. Min: 0.5, Max: 4
request
GET /products/20192
response

HTTP/1.1 200 OK

{
    "product": {
        "backordered": 0,
        "barcode": "20192",
        "coo": "CN",
        "description": "100% Cotton Shirt",
        "dg_code": null,
        "height": 5,
        "hs_code": null,
        "id": 20192,
        "length": 10,
        "name": "XL T-Shirt",
        "quantity": 102,
        "skus": [
            {
                "active": true,
                "shop_id": "my-shop",
                "sku": "SK001"
            }
        ],
        "value": 19.99,
        "warehouses": [
            {
                "description": "\u6bdb\u8863",
                "id": "WH0SZ001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 102
            },
            {
                "description": "\u6bdb\u8863",
                "id": "WH0HK001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 0
            }
        ],
        "weight": 0.259,
        "width": 12
    }
}
request
GET /products/20192
type=pdf&size=1.5x0.75
response

HTTP/1.1 200 OK

[blob]
POST
/products
Creates a product
request
POST /products
{
    "product": {
        "barcode": null,
        "coo": "CN",
        "description": "100% Cotton Shirt",
        "dg_code": null,
        "hs_code": null,
        "local_descriptions": [
            {
                "description": "\u6bdb\u8863",
                "language_code": "zh"
            }
        ],
        "name": "XL T-Shirt",
        "value": 19.99
    }
}
response

HTTP/1.1 201 Created

{
    "product": {
        "barcode": "20192",
        "description": "100% Cotton Shirt",
        "dg_code": null,
        "height": 0,
        "hs_code": null,
        "id": 20192,
        "length": 0,
        "name": "XL T-Shirt",
        "quantity": 0,
        "skus": [],
        "value": 19.99,
        "warehouses": [
            {
                "description": "\u6bdb\u8863",
                "id": "WH0SZ001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 0
            },
            {
                "description": "\u6bdb\u8863",
                "id": "WH0HK001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 0
            }
        ],
        "weight": 0,
        "width": 0
    }
}
POST
/products/barcodes
Create a PDF with up to 100 barcodes
request
POST /products/barcodes
{
    "barcodes": {
        "dimensions": {
            "width": 1.5,
            "height": 0.75
        },
        "products": [
            100001,
            100002,
            100003,
            "..."
        ]
    }
}
response

HTTP/1.1 201 Created

[blob]
PUT
/products/{id}
Updates a product
request
PUT /products/20192
{
    "product": {
        "barcode": "40194291",
        "coo": "CN",
        "description": "100% Cotton Shirt",
        "dg_code": "0967",
        "hs_code": null,
        "name": "SM T-Shirt",
        "value": 15
    }
}
response

HTTP/1.1 200 OK

{
    "product": {
        "barcode": "40194291",
        "coo": "CN",
        "description": "100% Cotton Shirt",
        "dg_code": "0967",
        "height": 5,
        "hs_code": null,
        "id": 20192,
        "length": 10,
        "name": "SM T-Shirt",
        "quantity": 102,
        "skus": [
            {
                "active": true,
                "shop_id": "my-shop",
                "sku": "SK001"
            }
        ],
        "value": 15,
        "warehouses": [
            {
                "description": "\u6bdb\u8863",
                "id": "WH0SZ001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 102
            },
            {
                "description": "\u6bdb\u8863",
                "id": "WH0HK001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 0
            }
        ],
        "weight": 0.259,
        "width": 12
    }
}
DELETE
/products/{id}
Deletes a product
request
DELETE /products/20192
response

HTTP/1.1 200 OK


		
POST
/products/{id}/skus
Adds a SKU to a product
request
POST /products/20192/skus
{
    "sku": {
        "active": true,
        "shop_id": "my-shop",
        "sku": "SK001"
    }
}
response

HTTP/1.1 201 Created

{
    "product": {
        "barcode": "20192",
        "coo": "CN",
        "description": "100% Cotton Shirt",
        "dg_code": "0967",
        "height": 5,
        "hs_code": null,
        "id": 20192,
        "length": 10,
        "name": "XL T-Shirt",
        "quantity": 102,
        "skus": [
            {
                "active": true,
                "shop_id": "my-shop",
                "sku": "SK001"
            }
        ],
        "value": 19.99,
        "warehouses": [
            {
                "description": "\u6bdb\u8863",
                "id": "WH0SZ001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 102
            },
            {
                "description": "\u6bdb\u8863",
                "id": "WH0HK001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 0
            }
        ],
        "weight": 0.259,
        "width": 12
    }
}
PUT
/products/{id}/shop/{id}/sku/{id}
Updates a SKU
request
PUT /products/20192/shop/my-shop/sku/SK001
{
    "sku": {
        "active": false,
        "sku": "SK2016"
    }
}
response

HTTP/1.1 200 OK

{
    "product": {
        "barcode": "20192",
        "coo": "CN",
        "description": "100% Cotton Shirt",
        "dg_code": "0967",
        "height": 5,
        "hs_code": null,
        "id": 20192,
        "length": 10,
        "name": "XL T-Shirt",
        "quantity": 102,
        "skus": [
            {
                "active": false,
                "shop_id": "my-shop",
                "sku": "SK2016"
            }
        ],
        "value": 19.99,
        "warehouses": [
            {
                "description": "\u6bdb\u8863",
                "id": "WH0SZ001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 102
            },
            {
                "description": "\u6bdb\u8863",
                "id": "WH0HK001",
                "language": "Chinese",
                "language_code": "zh",
                "quantity": 0
            }
        ],
        "weight": 0.259,
        "width": 12
    }
}
DELETE
/products/{id}/shop/{id}/sku/{id}
Deletes a SKU
request
DELETE /products/20192/shop/my-shop/sku/SK2016
response

HTTP/1.1 200 OK