Upload medicine codes
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entries": [
{
"code": "<string>",
"barcode": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"rxcui": "<string>",
"name": "<string>",
"strength": "<string>",
"form": "<string>",
"pack_size": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entries: [
{
code: '<string>',
barcode: '<string>',
nafdac_no: '<string>',
ndc: '<string>',
rxcui: '<string>',
name: '<string>',
strength: '<string>',
form: '<string>',
pack_size: '<string>'
}
]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/codes"
payload = { "entries": [
{
"code": "<string>",
"barcode": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"rxcui": "<string>",
"name": "<string>",
"strength": "<string>",
"form": "<string>",
"pack_size": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"code": "<string>",
"state": "linked",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Inventory
Upload medicine codes
Permission: inventory.items:write Upload up to 1,000 of a partner’s own medicine codes. An exact identifier match links automatically; the rest wait for review. Idempotent by construction — Idempotency-Key optional. Unknown per-row fields are refused by name WITHOUT aborting the rest of the batch.
POST
/
v1
/
clinics
/
{clinic_id}
/
inventory
/
codes
Upload medicine codes
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/codes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entries": [
{
"code": "<string>",
"barcode": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"rxcui": "<string>",
"name": "<string>",
"strength": "<string>",
"form": "<string>",
"pack_size": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
entries: [
{
code: '<string>',
barcode: '<string>',
nafdac_no: '<string>',
ndc: '<string>',
rxcui: '<string>',
name: '<string>',
strength: '<string>',
form: '<string>',
pack_size: '<string>'
}
]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/codes"
payload = { "entries": [
{
"code": "<string>",
"barcode": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"rxcui": "<string>",
"name": "<string>",
"strength": "<string>",
"form": "<string>",
"pack_size": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": [
{
"code": "<string>",
"state": "linked",
"reason": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional. A unique value you choose for this request, such as a UUID. When sent, a retry with the same key returns the first answer instead of applying the change twice. See Retries and idempotency.
Minimum string length:
1Path Parameters
Body
application/json
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
Response
OK.
Show child attributes
Show child attributes