Product Serials

Individual serial numbers for products that carry them. A serial belongs to one product in one warehouse and moves through IN_STOCK → RESERVED → SOLD (or RETURNED).

Use cases: Use this when you need to know which physical unit went to which customer — warranty, RMA, or regulated goods.
GET/products/id/:id/serials

List the serial numbers registered for one product.

Not paginated — every serial for the product comes back, newest first. 404 PRODUCT_NOT_FOUND if the product does not exist or is inactive.

Path Parameters

NameTypeDescription
id
stringrequiredThe product's `visibleId` (a UUID).

Query Parameters

NameTypeDescription
warehouseId
numberOnly serials held in this warehouse.
status
string"IN_STOCK", "RESERVED", "SOLD" or "RETURNED".

Request

curl -X GET "https://api.glance.co.il/products/id/:id/serials" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "success": true,
  "serials": [
    {
      "id": 9001,
      "visibleId": "3f6c2b71-0d94-4f2a-8f1e-6a0b7c8d9e01",
      "serialNumber": "SN-000123",
      "warehouseId": 1,
      "status": "IN_STOCK",
      "createdAt": "2026-08-01T09:14:22.000Z",
      "warehouseName": "מחסן ראשי"
    }
  ]
}
POST/products/id/:id/serials

Register serial numbers for a product, in bulk.

Partial success is the normal outcome: each serial is inserted on its own, and the ones that fail come back in `errors` while the rest are created. A serial is unique per product **and warehouse**, so the same number can exist in two warehouses. New serials start as IN_STOCK.

Path Parameters

NameTypeDescription
id
stringrequiredThe product's `visibleId` (a UUID).

Body Parameters

NameTypeDescription
serialNumbers
string[]requiredOne or more serial numbers. Each is trimmed.
warehouseId
numberrequiredThe warehouse the units are held in.

Request

curl -X POST "https://api.glance.co.il/products/id/:id/serials" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "serialNumbers": "example_serialNumbers",
  "warehouseId": 0
}'

Response

Response
{
  "success": true,
  "created": 2,
  "errors": [
    {
      "serialNumber": "SN-000123",
      "error": "מספר סריאלי כבר קיים"
    }
  ]
}
PUT/products/serials/:id

Change a serial's status.

Path Parameters

NameTypeDescription
id
stringrequiredThe serial's `visibleId` (a UUID).

Body Parameters

NameTypeDescription
status
string"IN_STOCK", "SOLD", "RESERVED" or "RETURNED". This is the only field that can be changed — the serial number itself and its warehouse are fixed at creation.

Request

curl -X PUT "https://api.glance.co.il/products/serials/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "example_status"
}'

Response

Response
{
  "success": true
}
DELETE/products/serials/:id

Delete a serial number.

Only an IN_STOCK serial can be deleted; anything sold, reserved or returned answers 400 — that history has to stay.

Path Parameters

NameTypeDescription
id
stringrequiredThe serial's `visibleId` (a UUID).

Request

curl -X DELETE "https://api.glance.co.il/products/serials/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "success": true
}

Last updated