Skip to main content

Get Barcode

Retrieve a single barcode by its ID.

Endpointโ€‹

GET /v1/barcodes/{id}

Required Scopeโ€‹

products:read

Path Parametersโ€‹

ParameterTypeDescription
idintegerThe 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โ€‹

FieldTypeDescription
idintegerUnique barcode ID
barcode_valuestringThe barcode value/data
barcode_typestringType code (e.g., qr, code128)
barcode_type_labelstringHuman-readable type name
is_auto_generatedbooleanWhether auto-generated by system
entity_typestringproduct or inventory
entity_idintegerID of the associated entity
entityobjectDetails about the associated product/inventory
created_atstringISO 8601 creation timestamp
updated_atstringISO 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"
}
}