Products
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.
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 |
|
barcode |
|
coo |
|
cost |
|
created |
|
description |
|
dg_code |
|
dimensions |
{ "dimensions": { "width": 1.5, "height": 0.75 } } Object - The dimensions of the barcode in inches. Only used for bulk printing barcode labels. height: The height of the PDF. Min: 0.5, Max: 4, Default: 1width: The width of the PDF. Min: 0.5, Max: 4, Default: 2 |
height |
|
hs_codes |
{ "hs_codes": [ { "country": "US", "hs_code": "3109165102" }, { "country": "CN", "hs_code": "0302410090" } ] } Array - An array of objects containing HS codes used for Customs clearance in different countries. Some countries or services require an HS code for import and/or export. Optional. Remove countries' HS codes from the product by omitting the objects you no longer want associated in an update request. Remove all HS codes by passing an empty array. country: String - The country code. Required.hs_code: String - Harmonized System classification number. Required. |
id |
|
is_packaging |
|
length |
|
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: 64language_code: String - The local language code for the warehouse in ISO 639-1 format. Required. |
name |
|
quantity |
|
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 |
|
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 |
|
width |
|
limit |
The number of results to return. Max: 250. Default: 50. |
order |
The order of the results. Options are "asc" for ascending, or "desc" (default) for descending. |
name |
Filter that searches for products with a similar name. Default: none. |
page |
The page number of the results. Default is 1. |
page_token |
Used for selecting the page after the initial query. |
shop.id |
Filter that selects products for a shop with the matching Shop ID. Products for all shops are returned by default. |
sku |
Filter that searches for products with a similar SKU. Default: none. |
sort |
The property to sort by. Options are "id" (default), "name", "backordered", or "quantity". |
GET /products
limit=50&order=desc&sort=id
HTTP/1.1 200 OK
{ "products": [ { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": "4.55", "created": "2020-10-20 16:18:08", "description": "Black bikini swimwear - SM", "dg_code": null, "height": "0", "hs_codes": [ { "country": "US", "hs_code": "1234567890" } ], "id": 1946, "length": "0", "name": "Bikini - SM", "quantity": 0, "value": "25.00", "weight": "0.000", "width": "0" }, { "backordered": 0, "barcode": "1947", "coo": "CN", "cost": "4.20", "created": "2020-10-20 16:28:59", "description": "Blue bikini swimwear - SM", "dg_code": null, "height": "0", "hs_codes": [], "id": 1947, "length": "0", "name": "Bikini - SM", "quantity": 0, "value": "29.95", "weight": "0.000", "width": "0" }, { "...": "..." } ], "next_page": "bGltaXQ9NTAmb3JkZXI9ZGVzYyZwYWdlPTEmc29ydD1pZCZsYXN0X2lkPTI0NDEzMQ==" }
GET /products
shop.id=boxctestshop&sku=&name=&page=1=&limit=50&sort=name&order=desc
HTTP/1.1 200 OK
{ "products": [ { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": "4.55", "created": "2020-10-20 16:18:08", "description": "Black bikini swimwear - SM", "dg_code": null, "height": "0", "hs_codes": [ { "country": "US", "hs_code": "1234567890" } ], "id": 1946, "length": "0", "name": "Bikini - SM", "quantity": 0, "value": "25.00", "weight": "0.000", "width": "0", "active": true, "sku": "SKU12345678" } ], "total_pages": 0, "total_products": 0 }
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 |
GET /products/1946
HTTP/1.1 200 OK
{ "product": { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": "4.55", "created": "2020-10-20 16:18:08", "description": "Black bikini swimwear - SM", "dg_code": null, "height": "0", "hs_codes": [ { "country": "US", "hs_code": "1234567890" } ], "id": 1946, "length": "0", "name": "Bikini - SM", "quantity": 0, "skus": [ { "active": true, "shop_id": "boxctestshop", "sku": "SKU12345678" } ], "value": "25.00", "warehouses": [], "weight": "0.000", "width": "0" } }
GET /products/20192
type=pdf&size=1.5x0.75
HTTP/1.1 200 OK
[blob]
POST /products
{ "product": { "barcode": null, "cost": 4.20, "coo": "CN", "dg_code": null, "name": "Bikini - XS", "value": 29.95, "description": "Red bikini swimwear - XS", "hs_codes": [ { "country": "US", "hs_code": "12345668" }, { "country": "US", "hs_code": "12345669" }, { "country": "CN", "hs_code": "98762212" } ] } }
HTTP/1.1 201 Created
{ "product": { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": 4.2, "created": "2020-10-20 16:18:08", "description": "Red bikini swimwear - XS", "dg_code": null, "height": 0, "hs_codes": [ { "country": "CN", "hs_code": "98762212" }, { "country": "US", "hs_code": "12345669" } ], "id": 1946, "length": 0, "name": "Bikini - XS", "quantity": 0, "skus": [], "value": 29.95, "warehouses": [], "weight": 0, "width": 0 } }
POST /products
{ "product": { "barcode": null, "cost": 4.20, "coo": "CN", "dg_code": null, "name": "Bikini - SM", "value": 29.95, "description": "Blue bikini swimwear - SM", "local_descriptions": [ { "description": "Cotton blue bikini swimwear", "language_code": "en" }, { "description": "棉蓝色比基尼泳装", "language_code": "zh" } ], "hs_codes": [] } }
HTTP/1.1 201 Created
{ "product": { "backordered": 0, "barcode": "1947", "coo": "CN", "cost": 4.2, "created": "2020-10-20 16:28:59", "description": "Blue bikini swimwear - SM", "dg_code": null, "height": 0, "hs_codes": [], "id": 1947, "length": 0, "name": "Bikini - SM", "quantity": 0, "skus": [], "value": 29.95, "warehouses": [ { "description": "Cotton blue bikini swimwear", "id": "WH0CVG01", "language": "English", "language_code": "en", "quantity": 0 }, { "description": "Cotton blue bikini swimwear", "id": "WH0JFK01", "language": "English", "language_code": "en", "quantity": 0 }, { "description": "棉蓝色比基尼泳装", "id": "WH0HKG01", "language": "Chinese", "language_code": "zh", "quantity": 0 }, { "description": "棉蓝色比基尼泳装", "id": "WH0SZX02", "language": "Chinese", "language_code": "zh", "quantity": 0 } ], "weight": 0, "width": 0 } }
POST /products/barcodes
{ "barcodes": { "dimensions": { "width": 1.5, "height": 0.75 }, "products": [ 100001, 100002, 100003, "..." ] } }
HTTP/1.1 201 Created
[blob]
PUT /products/1946
{ "product": { "cost": 4.55, "coo": "CN", "dg_code": null, "name": "Bikini - SM", "value": 25, "description": "Black bikini swimwear - SM", "hs_codes": [ { "country": "US", "hs_code": "1234567890" } ] } }
HTTP/1.1 200 OK
{ "product": { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": 4.55, "created": "2020-10-20 16:18:08", "description": "Black bikini swimwear - SM", "dg_code": null, "height": "0", "hs_codes": [ { "country": "US", "hs_code": "1234567890" } ], "id": 1946, "length": "0", "name": "Bikini - SM", "quantity": 0, "skus": [ { "active": true, "shop_id": "boxctestshop", "sku": "SKU12345678" } ], "value": 25, "warehouses": [], "weight": "0.000", "width": "0" } }
PUT /products/1946
{ "product": { "cost": 4.55, "coo": "CN", "dg_code": null, "name": "Bikini - SM", "value": 25, "description": "Black bikini swimwear - SM", "hs_codes": [] } }
HTTP/1.1 200 OK
{ "product": { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": 4.55, "created": "2020-10-20 16:18:08", "description": "Black bikini swimwear - SM", "dg_code": null, "height": "0", "hs_codes": [], "id": 1946, "length": "0", "name": "Bikini - SM", "quantity": 0, "skus": [ { "active": true, "shop_id": "boxctestshop", "sku": "SKU12345678" } ], "value": 25, "warehouses": [], "weight": "0.000", "width": "0" } }
DELETE /products/20192
HTTP/1.1 200 OK
POST /products/1946/skus
{ "sku": { "active": true, "shop_id": "boxctestshop", "sku": "SKU123456" } }
HTTP/1.1 201 Created
{ "product": { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": "4.20", "created": "2020-10-20 16:18:08", "description": "Red bikini swimwear - XS", "dg_code": null, "height": "0", "hs_codes": [ { "country": "CN", "hs_code": "98762212" }, { "country": "US", "hs_code": "12345669" } ], "id": 1946, "length": "0", "name": "Bikini - XS", "quantity": 0, "skus": [ { "active": true, "shop_id": "boxctestshop", "sku": "SKU123456" } ], "value": "29.95", "warehouses": [], "weight": "0.000", "width": "0" } }
PUT /products/1946/shop/boxctestshop/sku/SKU123456
{ "sku": { "active": true, "sku": "SKU12345678" } }
HTTP/1.1 200 OK
{ "product": { "backordered": 0, "barcode": "1946", "coo": "CN", "cost": "4.20", "created": "2020-10-20 16:18:08", "description": "Red bikini swimwear - XS", "dg_code": null, "height": "0", "hs_codes": [ { "country": "CN", "hs_code": "98762212" }, { "country": "US", "hs_code": "12345669" } ], "id": 1946, "length": "0", "name": "Bikini - XS", "quantity": 0, "skus": [ { "active": true, "shop_id": "boxctestshop", "sku": "SKU12345678" } ], "value": "29.95", "warehouses": [], "weight": "0.000", "width": "0" } }
DELETE /products/1946/shop/boxctestshop/sku/SKU12345678
HTTP/1.1 200 OK