Skip to main content
POST
/
api
/
products
/
bulk-pack
Bulk-pack multiple identical units under a single group
curl --request POST \
  --url https://app.buylo.ai/api/products/bulk-pack \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ean": "8594001524129",
  "quantity": 5,
  "epc_ids": [
    "E2004001020304",
    "E2004001020305"
  ],
  "location_id": 1
}
'
{
  "group": {
    "id": 123,
    "product_id": "ABC123",
    "name": "Brazil Santos Coffee",
    "category": "Coffee",
    "description": "Roasted Arabica coffee beans from Brazil",
    "ean": "8594001524129",
    "ean_registry_id": 42,
    "brand": "CoffeeCo",
    "sale_price": 199.99,
    "sale_price_currency": {},
    "vat_rate": 21,
    "unit": "kg",
    "product_data": {},
    "epc_hashes": [],
    "warehouse_nodes": [],
    "created_at": "2025-08-06T12:00:00Z",
    "updated_at": "2025-08-06T12:30:00Z"
  },
  "children": [
    {
      "id": 123,
      "product_id": "ABC123",
      "name": "Brazil Santos Coffee",
      "category": "Coffee",
      "description": "Roasted Arabica coffee beans from Brazil",
      "ean": "8594001524129",
      "ean_registry_id": 42,
      "brand": "CoffeeCo",
      "sale_price": 199.99,
      "sale_price_currency": {},
      "vat_rate": 21,
      "unit": "kg",
      "product_data": {},
      "epc_hashes": [],
      "warehouse_nodes": [],
      "created_at": "2025-08-06T12:00:00Z",
      "updated_at": "2025-08-06T12:30:00Z"
    }
  ],
  "epc_hashes": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
ean
string
required

European Article Number looked up in the central EAN registry.

Example:

"8594001524129"

quantity
integer
required

Number of child product records to create under the group.

Required range: 1 <= x <= 10000
Example:

5

epc_ids
string[]
required

EPC IDs to be attached to the group product.

Minimum array length: 1
Example:
["E2004001020304", "E2004001020305"]
location_id
integer | null

Optional location ID. When provided, every created EPC is assigned this location (latest_location_id). Must reference an existing row in locations. Omit or set to null to leave EPCs without a location.

Example:

1

Response

Group product and children created, EPCs attached to the group.

group
object
required
children
object[]
required
epc_hashes
string[]
required

Hashes of the EPCs attached to the group product.