Skip to main content
POST
/
api
/
products
/
create-with-epc
Create or update product with EPC IDs
curl --request POST \
  --url https://app.buylo.ai/api/products/create-with-epc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "epc_id": [
    "aaa1234",
    "bbb1234",
    "ccc1234"
  ],
  "product": {
    "product_id": "ABC123",
    "name": {
      "en": "Brazil Santos Coffee",
      "cs": "Brazilská káva Santos"
    },
    "category": "Coffee",
    "description": {
      "en": "Roasted Arabica coffee beans from Brazil",
      "cs": "Pražená arabica z Brazílie"
    },
    "ean": "8591234567890",
    "brand": "CoffeeCo",
    "prices": [
      {
        "currency": "EUR",
        "price": 199.99
      },
      {
        "currency": "CZK",
        "price": 4999
      }
    ],
    "vat_rate": 21,
    "unit": "kg",
    "product_data": {
      "color": "red",
      "size": "L"
    }
  }
}
'
{
  "product_epc_hashes": [
    "8aaedfc3559d0ce545ca55bcea31aad2",
    "2b1c7f8c2aab4e33a5e09a2d77f3b611",
    "a7d9c4e8b3f2a1c5e7b9d4f8a2c6e9b1"
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
epc_id
string[]
required

Array of EPC identifiers to assign to the product (must all be new)

Minimum array length: 1
Example:
["aaa1234", "bbb1234", "ccc1234"]
product
object
required

Response

Product created/updated and EPCs assigned successfully

product_epc_hashes
string[]
required

List of unique EPC hashes for newly created EPCs

Example:
[
"8aaedfc3559d0ce545ca55bcea31aad2",
"2b1c7f8c2aab4e33a5e09a2d77f3b611",
"a7d9c4e8b3f2a1c5e7b9d4f8a2c6e9b1"
]