Get Barcode
Retrieve a single barcode by its ID.
Endpointโ
GET /v1/barcodes/{id}
Required Scopeโ
products:read
Path Parametersโ
| Parameter | Type | Description |
|---|---|---|
id | integer | The barcode ID |
Request Exampleโ
curl "https://app.equipdash.com/api/v1/barcodes/1" \
-H "Authorization: Bearer YOUR_API_KEY"
Responseโ
{
"data": {
"id": 1,
"barcode_value": "RENT-001-A7B3C9",
"barcode_type": "qr",
"barcode_type_label": "QR Code",
"is_auto_generated": true,
"entity_type": "inventory",
"entity_id": 456,
"entity": {
"type": "inventory",
"id": 456,
"identifier": "MTB-001",
"product_id": 123,
"product_name": "Mountain Bike",
"variation_id": null
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2024-01-15T12:00:00Z"
}
}
Response Fieldsโ
| Field | Type | Description |
|---|---|---|
id | integer | Unique barcode ID |
barcode_value | string | The barcode value/data |
barcode_type | string | Type code (e.g., qr, code128) |
barcode_type_label | string | Human-readable type name |
is_auto_generated | boolean | Whether auto-generated by system |
entity_type | string | product or inventory |
entity_id | integer | ID of the associated entity |
entity | object | Details about the associated product/inventory |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last update timestamp |
Error Responsesโ
Barcode Not Foundโ
{
"error": {
"code": "resource_not_found",
"message": "The requested barcode was not found."
},
"meta": {
"request_id": "req_abc123"
}
}
Access Deniedโ
{
"error": {
"code": "forbidden",
"message": "You do not have permission to access this barcode."
},
"meta": {
"request_id": "req_abc123"
}
}