Inspections (Raporlar) endpoint'leri
statusenum hem request'te hem response'ta lowercase (published,archived,cancelled). Default'tapublished + archiveddöner.
GET /api/v1/partner/inspections
Cursor-paginated rapor listesi.
node scripts/sign.node.mjs GET "/api/v1/partner/inspections?limit=10"
Query parametreleri:
| Param | Tip | Açıklama |
|---|---|---|
organization_id | string | Belirli bir org'a filtre |
branch_id | string | Belirli bir bayiye filtre |
status | enum | published, archived, cancelled (varsayılan: published + archived) |
published_from | RFC3339 | publishedAt ≥ |
published_to | RFC3339 | publishedAt ≤ |
created_from | RFC3339 | createdAt ≥ |
created_to | RFC3339 | createdAt ≤ |
cursor | opaque | Önceki yanıtın next_cursor'ı |
limit | int | 1..100, default 25 |
Yanıt kodları: 200 listet, 400 invalid_request geçersiz query.
Yanıt:
{
"data": [
{
"id": "ins_cl4xy...",
"report_number": "YAV-2026-00031",
"organization_id": "org_...",
"branch_id": "br_...",
"status": "published",
"package_name": "Tam Ekspertiz",
"overall_score": 78,
"final_price_try": "1500.00",
"vehicle": {
"plate_masked": "34 ABC ***",
"vin_masked": "WBA12345******1234",
"brand": "BMW",
"model": "320d",
"year": 2018,
"type": "SEDAN",
"fuel_type": "DIESEL",
"transmission": "AUTOMATIC",
"color": "Beyaz",
"mileage_km": 124500
},
"published_at": "2026-05-15T10:14:22Z",
"created_at": "2026-05-15T09:00:00Z"
}
],
"page": {
"next_cursor": "eyJ0Ijoi...",
"has_more": true
}
}
final_price_tryondalık koruma için string döner;parseFloatile sayıya çevirebilirsiniz.
GET /api/v1/partner/inspections/{id}
Tek rapor detayı.
node scripts/sign.node.mjs GET /api/v1/partner/inspections/ins_cl4xy...
Yanıt:
{
"id": "ins_cl4xy...",
"report_number": "YAV-2026-00031",
"organization": { "id": "org_...", "slug": "yavuz-ekspertiz", "name": "Yavuz Oto Ekspertiz" },
"branch": { "id": "br_...", "name": "Çankaya Şubesi", "city": "Ankara" },
"status": "published",
"package": { "name": "Tam Ekspertiz", "base_price_try": "1800.00" },
"pricing": {
"base_price_try": "1800.00",
"discount_percent": "16.67",
"discount_name": "Tekrar Gelen Müşteri",
"final_price_try": "1500.00",
"payment_type": "CREDITCARD",
"currency": "TRY"
},
"vehicle": { /* aynı list item ile */ },
"snapshot": {
"vin_masked": "WBA12345******1234",
"mileage_km": 124530
},
"summary": "Aracın genel durumu iyi; sol arka çamurlukta lokal boya tespit edildi.",
"recommendation": "Lokal boya bilgilendirme amaçlıdır...",
"overall_score": 78,
"links": {
"forms": "https://api.ekspertiz.app/api/v1/partner/inspections/ins_.../forms",
"photos": "https://api.ekspertiz.app/api/v1/partner/inspections/ins_.../photos",
"pdf": "https://api.ekspertiz.app/api/v1/partner/inspections/ins_.../pdf"
}
}
404 not_found döner:
- Rapor yoksa
- Rapor partner'ın erişebileceği org/branch dışındaysa
- Rapor
DRAFT/IN_REVIEW/REVISION_REQUESTED/CANCEL_REQUESTEDise
GET /api/v1/partner/inspections/{id}/forms
Rapordaki tüm form cevapları — template + cevap merge edilmiş.
Yanıt:
{
"inspection_id": "ins_...",
"forms": [
{
"code": "KAPORTA_BOYA",
"name": "Kaporta & Boya",
"score_category": "STRUCTURAL",
"general_note": "...",
"points": [
{
"code": "FRONT_LEFT_FENDER",
"name": "Ön Sol Çamurluk",
"status_code": "PAINTED_LOCAL",
"status_label": "Lokal Boyalı",
"severity": "WARNING",
"numeric_value": 145,
"unit": "micron",
"note": "20cm² bölgede kalınlık ölçümü."
}
]
}
]
}
note alanı eksperin serbest yorumu — TC/telefon regex'i ile scrub edilir (PII modu NONE/MASKED'da).
GET /api/v1/partner/inspections/{id}/photos
Foto listesi. URL'ler 15 dakika geçerli presigned (GCS V4).
Yanıt:
{
"inspection_id": "ins_...",
"photos": [
{
"id": "ph_cl...",
"kind": "EXTERIOR_FRONT",
"point_code": null,
"caption": null,
"url": "https://storage.googleapis.com/...?X-Goog-Algorithm=...&X-Goog-Expires=900",
"thumb_url": null,
"expires_at": "2026-05-17T14:45:00Z",
"mime_type": "image/jpeg",
"size_bytes": 184320
}
]
}
Daima gizlenir:
REGISTRATION(ruhsat — TCKN/adres içerir)OTOSICIL_PDF(3rd party arşiv)showInReport: falsefoto'lar
URL'ler kısa ömürlü; uzun saklamak istiyorsanız kendi sisteminize indirin.
GET /api/v1/partner/inspections/{id}/pdf
Müşteriye sunulan ile birebir aynı raporun PDF dosyası.
Yanıt: Content-Type: application/pdf, byte stream. PDF'i kaydedip arşivleyebilirsiniz.
404 not_found döner: PUBLISHED değilse veya publicSlug henüz oluşmamışsa.