Invoicing, idempotent collection, account balance, end-of-day reconciliation and e-Fatura. Money is stored as numeric(14,2); the account balance is derived, never entered manually.
Endpoints for this resource. Every endpoint is scoped to the clinic data the API key is bound to; write endpoints support the Idempotency-Key header.
/v1/invoices
Creates an invoice
admin · secretary · physician
/v1/invoices
Lists invoices
admin
/v1/invoices/{id}
Retrieves invoice details
All authorized roles
/v1/invoices/{id}/void
Cancels the invoice (reversing entry)
admin
/v1/invoices/{id}/einvoice
Sends the invoice as an e-Fatura (GİB)
admin
/v1/einvoices
Lists e-Fatura records
admin
/v1/payments
Records a collection (idempotent)
admin · secretary · physician
/v1/patients/{id}/balance
Retrieves the patient's account balance
All authorized roles
/v1/patients/{id}/ledger
Lists the patient's account transactions
All authorized roles
/v1/cash/day
Retrieves the end-of-day cash summary
admin · secretary
/v1/cari
Lists account balances
admin · secretary
/v1/billing/summary
Retrieves the finance/collection summary
admin · secretary
Record a collection (idempotent)
curl -X POST https://api.udentiva.com/v1/payments \
-H "Authorization: Bearer udk_live_xxx" \
-H "Idempotency-Key: pay-7c3f..." \
-H "Content-Type: application/json" \
-d '{"patient_id":"c0ffee00-...","amount":"1500.00","method":"card"}'
HTTP/1.1 201 Created
{
"id": "pmt-9001",
"amount": "1500.00",
"method": "card",
"created_at": "2026-06-24T09:15:00Z"
}
# Aynı Idempotency-Key ile tekrar → aynı kayıt döner, ikinci tahsilat OLUŞMAZ.
Security isn't a feature, it's the architecture itself. The guarantees that apply to this resource:
Errors are returned in a consistent envelope; the code is for the machine, the message for the user. Internal error/stack is never leaked.
{
"error": {
"code": "validation_failed",
"message": "Invalid field: email"
}
}
We use cookies necessary for core functionality; analytics and marketing cookies are enabled only with your consent. Cookie-Richtlinie