Create a catalogue item
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"item_type": "<string>",
"generic_name": "<string>",
"brand_name": "<string>",
"strength": "<string>",
"dosage_form": "<string>",
"category": "<string>",
"unit_of_measure": "<string>",
"upc": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"default_sale_price": 123,
"container_quantity": 123,
"container_label": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
item_type: '<string>',
generic_name: '<string>',
brand_name: '<string>',
strength: '<string>',
dosage_form: '<string>',
category: '<string>',
unit_of_measure: '<string>',
upc: '<string>',
nafdac_no: '<string>',
ndc: '<string>',
default_sale_price: 123,
container_quantity: 123,
container_label: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items', 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/items"
payload = {
"name": "<string>",
"item_type": "<string>",
"generic_name": "<string>",
"brand_name": "<string>",
"strength": "<string>",
"dosage_form": "<string>",
"category": "<string>",
"unit_of_measure": "<string>",
"upc": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"default_sale_price": 123,
"container_quantity": 123,
"container_label": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_active": true,
"identifiers": [
{
"system": "gtin",
"value": "<string>"
}
],
"generic_name": "<string>",
"brand_name": "<string>",
"strength": "<string>",
"dosage_form": "<string>",
"category": "<string>",
"item_type": "<string>",
"unit_of_measure": "<string>",
"retail_price": {
"amount": "<string>",
"currency": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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
Create a catalogue item
Permission: inventory.items:write Add a catalogue item. Unknown fields refused by name. container_sale_price/container_cost are refused outright.
POST
/
v1
/
clinics
/
{clinic_id}
/
inventory
/
items
Create a catalogue item
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"item_type": "<string>",
"generic_name": "<string>",
"brand_name": "<string>",
"strength": "<string>",
"dosage_form": "<string>",
"category": "<string>",
"unit_of_measure": "<string>",
"upc": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"default_sale_price": 123,
"container_quantity": 123,
"container_label": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
item_type: '<string>',
generic_name: '<string>',
brand_name: '<string>',
strength: '<string>',
dosage_form: '<string>',
category: '<string>',
unit_of_measure: '<string>',
upc: '<string>',
nafdac_no: '<string>',
ndc: '<string>',
default_sale_price: 123,
container_quantity: 123,
container_label: '<string>'
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items', 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/items"
payload = {
"name": "<string>",
"item_type": "<string>",
"generic_name": "<string>",
"brand_name": "<string>",
"strength": "<string>",
"dosage_form": "<string>",
"category": "<string>",
"unit_of_measure": "<string>",
"upc": "<string>",
"nafdac_no": "<string>",
"ndc": "<string>",
"default_sale_price": 123,
"container_quantity": 123,
"container_label": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_active": true,
"identifiers": [
{
"system": "gtin",
"value": "<string>"
}
],
"generic_name": "<string>",
"brand_name": "<string>",
"strength": "<string>",
"dosage_form": "<string>",
"category": "<string>",
"item_type": "<string>",
"unit_of_measure": "<string>",
"retail_price": {
"amount": "<string>",
"currency": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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
A unique value you choose for this request, such as a UUID. Sending the same key again returns the first answer instead of doing the work twice, so a timed-out request is safe to retry. Reusing a key for a different request is refused with 409 idempotency_key_conflict, and retrying while the first request is still running with 409 idempotency_key_reused. See Retries and idempotency.
Minimum string length:
1Path Parameters
Body
application/json
Unknown fields refused by name. container_sale_price/container_cost are refused outright.
Response
OK.
Show child attributes
Show child attributes