Creating a product
API reference ProductsAPI
Overview
This endpoint can be used to import products from your system into byrd
Method access
POST https://api.getbyrd.com/v2/warehouse/products
Request Headers
Authorization: Bearer token-from >Authentication
Content-Type: application/json
User-Agent: your user-agent >How to call the APIs
Fields
To create a product usable by the rest of the system, include the following fields in the JSON request body. Some are always required, others only in specific cases:
| Field | Type | Description | Required |
|---|---|---|---|
| sku | string | Code consisting of letters and/or numbers to identify a single physical item. Has to be unique in your environment. If your sales channel sends orders to byrd, it must match the SKU on their order lines. | conditional Required if your shipments or sales channel refer to the product by SKU instead of its product_id |
| name | string | Name of the product | always |
| description | string | Description of the product | optional |
| barcode | string | Barcode that is on the product. It accepts digits and characters, depending on the barcode type selected. | conditional Required if the product has a barcode |
| barcodeType | string | Type of barcode It accepts: ean_13, code_128, gs1_128, qr_code. | conditional Required if the field barcode is used. |
| purchasePrice | price object | Purchase price of one unit, used to insure shipments. It is not declared to customs: customs documents use the item price sent when creating the shipment, or customsValue when the item has no price.fields: - value (string): string of digits with decimals separated by a dot. - currency (string): currency in ISO 3-Letter code Please use the purchase price and not the retail price. Bundles cannot have one. | optional |
| customsTariffNumber | string | Unique code that is documented in the Harmonised System (HS) for your product. It accepts only digits with lengths of 6, 8, or 10. | conditional Required if you plan to send shipments outside of EU or UK |
| originCountryCode | string | Country code of the origin of the product. It accepts only ISO 3166-1 two digit codes. | conditional Required if you plan to send shipments outside of EU or UK |
| dimensions | dimensions object | Size and weight of one unit of the product, as sent to the warehouse. The weight is needed for shipments leaving the EU or the UK; a prepacked_product needs all dimensions and a sizeGroup. When length, width and height are sent, byrd calculates the sizeGroup from them. Once the warehouse has measured the product, the dimensions you send are ignored.fields: - length, width, height (string): in cm, string of digits with decimals separated by a dot. - weight (string): in kg, string of digits with decimals separated by a dot. - sizeGroup (string): XS, S, M, L, XL, XXL, CUSTOM, PAL | conditional Required if you plan to send shipments outside of EU or UK (weight), or for a prepacked_product (all dimensions and sizeGroup) |
| lotsEnabled | boolean | If lots should be tracked when inbounding and shipping this product It accepts: true,false | conditional Required if the lot number has to be tracked |
| organic | boolean | If it's an organic product (special storage required) It accepts: true,false | conditional Required if the product is organic |
| fragile | boolean | If it's a fragile product (special packaging required) It accepts: true,false | conditional Required if the product is fragile |
| serialNumberEnabled | boolean | If serial number should be tracked when shipping this product It accepts: true,false | conditional Required if the serial number has to be tracked |
| reorderPoint | integer | The stock level below which you want to be alerted in the daily notification email (if enabled). | optional |
| packagingUnitEnabled | boolean | If the packaging unit contains multiple selling units. (the warehouse will attempt to pick high quantities more efficiently) It accepts: true,false | conditional Required if the packaging unit contains multiple units |
| packagingUnits | list of packagingUnit objects | Details of the packaging unit fields: - active (boolean): true, false- quantity (string): string of digits - barcodeType (string): ean_13, code_128, gs1_128, qr_code- barcodeValue (string): digits and characters, depending on the barcode type selected. | conditional Required if packagingUnitEnabled is true |
| customsValue | price object | Value declared to customs for the product when the shipment item has no price, for example for a free gift. Not the purchase price. fields: - value (string): string of digits with decimals separated by a dot. - currency (string): currency in ISO 3-Letter code | optional |
Request body example
{
"sku": "AELMO-00005",
"name": "Awesome dog food",
"description": null,
"barcode": "0123456789101",
"barcodeType": "ean_13",
"productType": "product",
"purchasePrice": {
"value": 0.01,
"currency": "SEK"
},
"customsTariffNumber": "910121",
"originCountryCode": "CN",
"dimensions": {
"weight": 1.2
},
"lotsEnabled": false,
"organic": false,
"fragile": false,
"serialNumberEnabled": false,
"reorderPoint": 10,
"packagingUnitEnabled": true,
"packagingUnits": [
{
"quantity": "10",
"active": true,
"barcodeType": "ean_13",
"barcodeValue": "978020137962"
}
]
}Successful response example
Product id
When the product is created successfully the response will contain all the details of the product. Some of them will be filled with default values. You can change most of the product details at any moment by calling the ProductAPI using the field id from this response when product_id is required.
We recommend saving the byrd product_id on your side, since it might be needed when you implement other flows like deliveries or stocks (querying by single product).
{
"data": {
"pictureID": null,
"deletedDate": null,
"isbn": null,
"bsku": "BSKU-ONXV1VAF04",
"active": true,
"reorderPoint": 10,
"weightEstimation": null,
"changeRequests": null,
"isDangerousGoods": false,
"fragile": false,
"unavailableStock": 0,
"sku": "AELMO-00005",
"customsTariffNumber": "910121",
"deleted": false,
"barcodeType": "ean_13",
"physicalStock": 0,
"retailPrice": null,
"updatedAt": "2023-03-16T13:26:06.226926+00:00",
"id": "the_product_id",
"purchasePriceEvidenceURL": null,
"dangerousGoods": [],
"packagingUnits": [
{
"active": true,
"barcodeType": "ean_13",
"barcodeValue": "978020137962",
"quantity": 10
}
],
"variantID": null,
"reservedStock": 0,
"dangerousGoodsMSDSURL": null,
"barcode": "0123456789101",
"description": null,
"createdAt": "2023-03-16T13:26:06.226913+00:00",
"ean": null,
"lotsEnabled": false,
"name": "Awesome dog food",
"availableStock": 0,
"productType": "product",
"storages": [],
"shopID": null,
"originCountryCode": "CN",
"purchasePrice": {
"value": "0.01",
"currency": "SEK",
"taxFactor": "1.0"
},
"dimensions": {
"length": null,
"createdAt": "2023-03-16T13:26:06.247048+00:00",
"weight": 1.2,
"updatedAt": "2023-03-16T13:26:06.247056+00:00",
"height": null,
"createdBy": "CUSTOMER",
"id": "the_dimensions_id",
"sizeGroup": null,
"isHeightVariable": false,
"width": null
},
"productID": null,
"skipBarcodePick": false,
"packagingUnitEnabled": true,
"organic": false,
"stocksByWarehouse": {},
"serialNumberEnabled": false,
"upc": null
}
}Updated 7 days ago

