UDENTIVA スマート歯科マネジメントプラットフォーム
API RESOURCE

Collections & Finance

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.

Early Access All API

Endpoints

12 endpoint

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.

POST /v1/invoices Creates an invoice admin · secretary · physician
GET /v1/invoices Lists invoices admin
GET /v1/invoices/{id} Retrieves invoice details All authorized roles
POST /v1/invoices/{id}/void Cancels the invoice (reversing entry) admin
POST /v1/invoices/{id}/einvoice Sends the invoice as an e-Fatura (GİB) admin
GET /v1/einvoices Lists e-Fatura records admin
POST /v1/payments Records a collection (idempotent) admin · secretary · physician
GET /v1/patients/{id}/balance Retrieves the patient's account balance All authorized roles
GET /v1/patients/{id}/ledger Lists the patient's account transactions All authorized roles
GET /v1/cash/day Retrieves the end-of-day cash summary admin · secretary
GET /v1/cari Lists account balances admin · secretary
GET /v1/billing/summary Retrieves the finance/collection summary admin · secretary

Example Usage

Record a collection (idempotent)

Request
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"}'
Response
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 in this resource

Security isn't a feature, it's the architecture itself. The guarantees that apply to this resource:

Idempotent collection: thanks to the Idempotency-Key + server lock, the same payment is never recorded twice even on network retries (no double collection).
Money is always numeric(14,2); no arithmetic is performed with amounts received from the client, and rounding is done at a single point on the server.
Cancellation/refund = reversing entry (void/refund); the row is never physically deleted. The account balance is derived as Σinvoices − Σpayments.
A multi-entity operation (invoice + item + payment) is atomic within a single transaction: all or nothing.
Full security model →

Error Format

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"
  }
}

Other Resources

患者 予約とカレンダー Odontogram & Treatment 在庫 Imaging ラボ Lead & CRM 医療ツーリズム Reporting & BI Webhooks Data Transfer (Export API)
Want early access?
Be the first to know when the API opens.
お問い合わせ