Skip to main content
PATCH
/
api
/
product-epc
/
{product_epc_hash}
/
state
Change Product EPC State
curl --request PATCH \
  --url https://app.buylo.ai/api/product-epc/{product_epc_hash}/state \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "sold"
}
'
{
  "message": "Product EPC state has been successfully updated",
  "updated_count": 3,
  "updated_hashes": [
    "8aaedfc3559d0ce545ca55bcea31aad2",
    "2b1c7f8c2aab4e33a5e09a2d77f3b611",
    "a7d9c4e8b3f2a1c5e7b9d4f8a2c6e9b1"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

product_epc_hash
string
required

The hash of the product EPC to update

Body

application/json
status
enum<string>
required

The new status for the EPC

Available options:
registered,
stored,
transit,
in_store,
for_sale,
sold,
stolen,
cancelled,
reserved,
returned,
damaged
Example:

"sold"

Response

State updated successfully

message
string
required
Example:

"Product EPC state has been successfully updated"

updated_count
integer
required

Number of EPCs updated (includes grouped EPCs)

Example:

3

updated_hashes
string[]
required

List of all updated EPC hashes

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