Update a catalogue item
curl --request PATCH \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items/{item_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<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,
"is_active": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<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,
is_active: true
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items/{item_id}', 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/{item_id}"
payload = {
"name": "<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,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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
Update a catalogue item
Permission: inventory.items:write Update a catalogue item. Absent field ≠ JSON null. Idempotency-Key OPTIONAL — a PATCH is naturally idempotent.
PATCH
/
v1
/
clinics
/
{clinic_id}
/
inventory
/
items
/
{item_id}
Update a catalogue item
curl --request PATCH \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items/{item_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<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,
"is_active": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<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,
is_active: true
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/items/{item_id}', 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/{item_id}"
payload = {
"name": "<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,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(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
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:
1Body
application/json
Absent ≠ null. Idempotency-Key optional — a PATCH is naturally idempotent.
Minimum string length:
1Above the clinic's configured percentage threshold is refused (limit_exceeded).
Response
OK.
Show child attributes
Show child attributes