Organization data
Attach an identifier
Assign an existing exact barcode or QR payload to a record
POST
/
identifiers
Attach an identifier
curl --request POST \
--url https://api.oncanary.com/v1/identifiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"id": "<string>"
},
"system": "<string>",
"value": "<string>",
"payload": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target: {id: '<string>'},
system: '<string>',
value: '<string>',
payload: '<string>'
})
};
fetch('https://api.oncanary.com/v1/identifiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/identifiers"
payload = {
"target": { "id": "<string>" },
"system": "<string>",
"value": "<string>",
"payload": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"system": "<string>",
"value": "<string>",
"source": "canary",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"scan_values": [
{
"id": "<string>",
"payload": "<string>",
"format_hint": "<string>"
}
]
},
"meta": {
"request_id": "<string>",
"api_version": "<string>"
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}Authorizations
Organization API key with an sk_live_ or sk_test_ prefix
Body
application/json
Show child attributes
Show child attributes
Stable customer namespace, limited to 255 UTF-8 bytes
Maximum string length:
255Exact opaque identifier value, limited to 4096 UTF-8 bytes
Maximum string length:
4096Exact scan payload, limited to 4096 UTF-8 bytes; defaults to value
Maximum string length:
4096Maximum string length:
64Additional exact carrier payloads that resolve this identifier
Required array length:
1 - 32 elementsShow child attributes
Show child attributes
⌘I
Attach an identifier
curl --request POST \
--url https://api.oncanary.com/v1/identifiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target": {
"id": "<string>"
},
"system": "<string>",
"value": "<string>",
"payload": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target: {id: '<string>'},
system: '<string>',
value: '<string>',
payload: '<string>'
})
};
fetch('https://api.oncanary.com/v1/identifiers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/identifiers"
payload = {
"target": { "id": "<string>" },
"system": "<string>",
"value": "<string>",
"payload": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"system": "<string>",
"value": "<string>",
"source": "canary",
"is_primary": true,
"created_at": "2023-11-07T05:31:56Z",
"scan_values": [
{
"id": "<string>",
"payload": "<string>",
"format_hint": "<string>"
}
]
},
"meta": {
"request_id": "<string>",
"api_version": "<string>"
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}