curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/payment-advices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paid_on": "2023-12-25",
"amount": 123,
"currency": "<string>",
"reference": "<string>",
"allocations": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
insurance_company_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
paid_on: '2023-12-25',
amount: 123,
currency: '<string>',
reference: '<string>',
allocations: [{claim_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 123}]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/payment-advices', 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}/insurance/payment-advices"
payload = {
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paid_on": "2023-12-25",
"amount": 123,
"currency": "<string>",
"reference": "<string>",
"allocations": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"status": "advised",
"paid_on": "2023-12-25",
"currency": "<string>",
"method": "bank_transfer",
"reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"allocations": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123
}
]
},
"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>"
}
]
}Send a payment advice
Permission: insurance.remittances:write
Tell the clinic what your insurer paid.
Records an ADVICE for clinic staff to reconcile. It never changes a claim, a payment or the clinic’s books - the clinic records the money itself. Answers 201 with the advice. Only for the insurer the clinic linked to your organization. The Idempotency-Key header is REQUIRED.
curl --request POST \
--url https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/payment-advices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paid_on": "2023-12-25",
"amount": 123,
"currency": "<string>",
"reference": "<string>",
"allocations": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123
}
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
insurance_company_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
paid_on: '2023-12-25',
amount: 123,
currency: '<string>',
reference: '<string>',
allocations: [{claim_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 123}]
})
};
fetch('https://api.clinikehr.com/v1/clinics/{clinic_id}/insurance/payment-advices', 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}/insurance/payment-advices"
payload = {
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"paid_on": "2023-12-25",
"amount": 123,
"currency": "<string>",
"reference": "<string>",
"allocations": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 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": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insurance_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"status": "advised",
"paid_on": "2023-12-25",
"currency": "<string>",
"method": "bank_transfer",
"reference": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"allocations": [
{
"claim_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123
}
]
},
"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
A payment advice. Each allocation names a claim of that insurer that is awaiting payment and an amount no larger than what the claim still owes; the allocations may not add up to more than amount. currency, if sent, must be the clinic's currency.
bank_transfer, eft, cheque, other 10200500Show child attributes
Show child attributes
Response
Created - an advice, status advised.
What an insurer says it paid the clinic. It is an ADVICE for clinic staff to reconcile: it never changes a claim, the clinic's payments or its books. status is advised until staff act on it.
Show child attributes
Show child attributes
Present and true when this Idempotency-Key was already used and the original answer is returned.