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,
"is_controlled": 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>",
"archived_at": "2023-11-07T05:31:56Z",
"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>"
}
]
}Update a catalogue item
Permission: inventory.items:write Update a catalogue item. Absent field ≠ JSON null. Idempotency-Key OPTIONAL — a PATCH is naturally idempotent. Barcode (upc): only a changed value must be a valid GTIN. A upc equal, as stored, to the item’s current value is accepted even when it is not a valid GTIN, so an item read from the API can be written back. A new or different upc that is not a valid GTIN is refused with 400 invalid_gtin and nothing is written. To make that comparison the API reads the item’s current value with the caller’s own key, so a key without inventory.items:read cannot send an unchanged invalid value.
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,
"is_controlled": 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>",
"archived_at": "2023-11-07T05:31:56Z",
"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
Headers
Body
Absent ≠ null. Idempotency-Key optional — a PATCH is naturally idempotent.
A gtin value must be a valid GTIN-8, GTIN-12, GTIN-13 or GTIN-14: digits only, the right length and a correct GS1 check digit. A request that sends any other value is refused with 400 invalid_gtin, naming the field and the value. Values already stored are not changed and are returned as they are. On update, a value equal to the one already stored is accepted even if it is not a valid GTIN; only a changed value is checked (the comparison reads the item with your key, which counts toward your rate limit; if that read is refused you get that refusal, not invalid_gtin). null clears the code.