curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
item_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
from_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 123
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/transfer', 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/transfer"
payload = {
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lot_id": "<string>",
"quantity": "<string>",
"idempotent_replay": true
}
}{
"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>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"request_id": "<string>",
"detail": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>"
}
]
}Transfer stock
Permission: inventory.stock:write
Transfer stock between two of this clinic’s own active locations.
Every controlled drug is refused outright — an API key has no witness identity to offer.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
item_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
from_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to_location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
quantity: 123
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/inventory/transfer', 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/transfer"
payload = {
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lot_id": "<string>",
"quantity": "<string>",
"idempotent_replay": true
}
}{
"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>"
}
]
}{
"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.
1Path Parameters
Body
Response
OK.
The ledger movement receive/adjust/transfer just recorded — never the whole inventory_transactions row.
Show child attributes
Show child attributes