Faturalar (alacaklar)operator_invoices
/api/v1/imports/operator_invoicesUpsert: aynı external_id ile tekrar gönderim mevcut satırı günceller.
Uç noktalar
- validatePOST /api/v1/imports/operator_invoices/validate
- importPOST /api/v1/imports/operator_invoices
- feedGET /api/v1/imports/operator_invoices/records
- read_backGET /api/v1/imports/operator_invoices/records/{external_id}
Yeni bir satırda bulunmalı
legacy_numberissued_ontotal_amountşunlardan biri: customer_external_id | bill_to_name
Alanlar(11)
external_idstringlegacy_numberstringzorunluissued_ondatezorunludue_ondatetotal_amountmoneyzorunluamount_paidmoneyalready collected before cutover; imported as a brought-forward receipt
paid_ondatewhen
amount_paidwas collected; defaults to the invoice datecurrencycurrencybill_to_namestringcustomer_external_idreferencenotesstring
Referanslar
customer_external_id→ customers · eşleşme external_id, email · bulunamazsa error
Geri okuma
Acente kaydı işledikten sonra (onaylar, biletleri numaralar, faturalar) GET /api/v1/imports/{entity}/records/{external_id} bunu döner; her webhook da aynı gövdeyi taşır. detail, gönderiminizden sonra yalnız acentenin ekleyebildiği bilgileri taşır.
{
"entity": "operator_invoices",
"external_id": "OPERATOR-INVOICE-1001",
"source_system": "crm",
"type": "OperatorInvoice",
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"created_at": "2026-03-14T09:30:00Z",
"updated_at": "2026-03-15T11:05:00Z",
"status": "issued",
"currency": "EUR",
"totals": {
"total": "1250.0",
"paid": "0.0",
"balance": "1250.0"
}
}İstek · deneme, tüm alanlar
curl -X POST 'https://YOUR-CELL.lydira.com/api/v1/imports/operator_invoices/validate' \
-H 'Authorization: Bearer sek_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 8f14e45f-ea2c-4f33-9a3b-6d0c1b7e5a90' \
-d '{
"source_system": "crm",
"rows": [
{
"external_id": "OPERATOR-INVOICE-1001",
"legacy_number": "2025-000431",
"issued_on": "2026-03-14",
"due_on": "2026-03-18",
"total_amount": "1250.00",
"amount_paid": "1250.00",
"paid_on": "2026-03-14",
"currency": "EUR",
"bill_to_name": "Lovelace Seyahat A.Ş.",
"customer_external_id": "CUSTOMER-1001",
"notes": "Imported from the source system."
}
]
}'{
"import": {
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"entity": "operator_invoices",
"source_system": "crm",
"status": "ready",
"company_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"stats": {
"total": 1,
"will_create": 1,
"will_update": 0,
"created": 0,
"updated": 0,
"skipped": 0,
"invalid": 0,
"failed": 0,
"not_selected": 0
},
"error": null,
"created_at": "2026-03-14T09:30:00Z",
"links": {
"self": "/api/v1/imports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"rows": "/api/v1/imports/9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18/rows"
},
"mode": "validate",
"async": false,
"on_conflict": "skip",
"pricing": "apply_rules"
},
"ignored_fields": [],
"results": [
{
"row": 1,
"external_id": "OPERATOR-INVOICE-1001",
"status": "will_create"
}
]
}