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:

FieldTypeDescriptionRequired
sku stringCode 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 stringName of the productalways
description stringDescription of the productoptional
barcode stringBarcode 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 stringType of barcode
It accepts: ean_13, code_128, gs1_128, qr_code.
conditional
Required if the field barcode is used.
purchasePrice price objectPurchase 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 stringUnique 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 stringCountry 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 objectSize 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 booleanIf 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 booleanIf it's an organic product (special storage required)
It accepts: true,false
conditional
Required if the product is organic
fragile booleanIf it's a fragile product (special packaging required)
It accepts: true,false
conditional
Required if the product is fragile
serialNumberEnabled booleanIf serial number should be tracked when shipping this product
It accepts: true,false
conditional
Required if the serial number has to be tracked
reorderPointintegerThe stock level below which you want to be alerted in the daily notification email (if enabled).optional
packagingUnitEnabledbooleanIf 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
packagingUnitslist of packagingUnit objectsDetails 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 objectValue 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
    }
}