Listing products

API reference ProductAPI

Overview

This endpoint can be used to get a list of the products that are created in byrd. The response will include different product details including the stocks. You will also get the stock by warehouse, for every warehouse that holds or reserves the product

Method access
      GET 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

Query params

You can filter the list by different fields combining them depending on your needs. The most frequent are:

FieldTypeDescription
productType stringType of product
It accepts product and bundle
sku stringInclude this specific sku.
lotsEnabled booleanInclude only products with lot tracking enabled.
It accepts true and false
organic booleanInclude only products with organic flag enabled.
It accepts true and false
include_non_deliverable booleanFilter out products that cannot be logically delivered to a warehouse.
Example: bundles
It accepts true and false
include_deleted booleanInclude products that were deleted
It accepts true and false
Defaults to false
active booleanFilter products by its status
It accepts true and false
include_packaging_material booleanInclude packaging materials.
It accepts true and false
qstringSearch by term. It searches for that term in the fields specified under field
fieldsstringFields where to search for the value in q

Pagination

By sending these parameters you can get the result in different pages:

Send page and per_page together. If you send only one of them, the API answers 400 with the error code Request.InvalidPagination.

FieldTypeDescription
per_page stringItems per page
Default is 250
page stringIt returns only that page
sort_by stringIt sorts the response by this field
It accepts createdAt (default), updatedAt, name, sku and physicalStock. physicalStock sorts by the physical stock in the warehouses sent in warehouse_ids, or in all warehouses when it is omitted. Bundles hold no stock of their own and sort as 0
sort_order stringIt sorts the response ascending or descending depending on this value
It accepts asc and desc (default)

Getting stock per warehouse

The response contains a child Element per Product called stocksByWarehouse, keyed by warehouse ID.
It lists every warehouse that holds or reserves units of the product, in the following way.
If no warehouse holds or reserves the product, the result is empty ({}).

"stocksByWarehouse": {
  "<warehouse-1-id>": {
    "available": 0,
    "physical": 0,
    "reserved": 0,
    "unavailable": 0
  },
  "<warehouse-2-id>": {
    "available": 0,
    "physical": 0,
    "reserved": 0,
    "unavailable": 0
  }
}

Successful response example

"data": [
  {
    "availableStock": 11,
    "physicalStock": 0,
    "unavailableStock": 0,
    "reservedStock": 0,
    "skipBarcodePick": false,
    "description": "string",
    "packagingUnitEnabled": false,
    "productID": "string",
    "ean": "string",
    "purchasePrice": {
        "currency": "EUR",
        "value": "0.01",
        "taxFactor": "1.0"
    },
    "purchasePriceEvidenceURL": null,
    "userID": "1111-22222-33333-44444",
    "id": "1111-33333-22222-44444",
    "deleted": false,
    "changeRequests": null,
    "packagingUnits": [
        {
            "barcodeValue": "string",
            "active": true,
            "barcodeType": "string",
            "quantity": 0
        }
    ],
    "pictureID": null,
    "dangerousGoods": [
        {
            "createdAt": "2023-01-06T14:12:59.105Z",
            "limit": 0,
            "productID": "string",
            "unit": "string",
            "updatedAt": "2023-01-06T14:12:59.105Z",
            "dangerousGoodsClass": 0,
            "id": "string",
            "dangerousGoodsType": "string",
            "description": "string",
            "UNNumber": "string",
            "quantity": 0
        }
    ],
    "barcodeType": "string",
    "dangerousGoodsMSDSURL": null,
    "shopID": null,
    "active": true,
    "barcode": null,
    "fragile": false,
    "serialNumberEnabled": false,
    "upc": null,
    "bsku": "BSKU-123452",
    "reorderPoint": 0,
    "internalComments": null,
    "sku": "MULTI127",
    "retailPrice": null,
    "productType": "product",
    "dimensions": null,
    "updatedAt": "2023-01-06T10:00:09.319935+00:00",
    "weightEstimation": null,
    "user": {
        "id": "4ea4616c-803b-4623-b30a-57734874e148"
    },
    "organic": false,
    "isbn": null,
    "lotsEnabled": false,
    "deletedDate": null,
    "originCountryCode": "GB",
    "name": "Product 1",
    "variantID": null,
    "createdAt": "2023-01-06T10:00:09.319925+00:00",
    "stocksByWarehouse": {
        "111-344532-1342245-323453": {
            "available": 11,
            "physical": 0,
            "reserved": 0,
            "unavailable": 0
        }
    },
    "isDangerousGoods": false,
    "customsTariffNumber": "123456789"
  },
]