Skip to navigation

Reject Premium

Bu dokümantasyon, offline iş akışı kapsamında prim teklifi reddetme endpoint’inin teknik kullanım kılavuzudur. Endpoint aracılığıyla sigorta şirketi API kullanıcıları; acentelerden gelen teklif taleplerini red nedeni ve açıklama mesajı ile reddedebilir, gerektiğinde destekleyici PDF dokümanlar ekleyebilir.


Endpoint Bilgisi

ÖzellikDeğer
HTTP MetoduPUT
URL/api/offline/jobs/{jobId}/premiums/reject
Content-Typeapplication/json
YetkilendirmeAuthorization: Bearer {token}

Yetkilendirme Rolleri

Çağıranın aşağıdaki rollerden birine sahip olması gerekir:

RolErişim Kapsamı
InsuranceCompanyAPIUserSadece kendi işlerine erişebilir
InsuranceCompanyAPIAdminŞirketin tüm işlerine erişebilir
SupervizorŞirketin tüm işlerine erişebilir

Beklenen Yanıtlar

SenaryoHTTP DurumuBody
Başarılı red204 No Content(boş)
Eksik zorunlu alanlar400 Bad RequestDoğrulama hata detayları
Geçersiz red nedeni400 Bad RequestJobRejectReason alan hatası
Geçersiz veya süresi dolmuş token401 Unauthorized—
Farklı kullanıcının job’ı403 ForbiddenOfflineJobs.JobOwnershipDenied
Var olmayan job ID404 Not FoundOfflineJobs.JobNotFound
Platform senkronizasyon hatası500 Internal Server ErrorJobState.ActionNotSentToPlatform

Route Parametreleri

ParametreTipZorunluAçıklama
jobIdintegerEvetReddedilecek işin benzersiz tanımlayıcısı

İstek Modeli

Ana İstek — RejectPremiumRequest

AlanTipZorunluAçıklamaDoğrulama Kuralları
JobRejectReasonintegerEvetÖnceden tanımlı listeden red nedeni ID’si. Nedenler sigorta şirketine göre yapılandırılır.Zorunlu: "JobRejectReason is required."
0’dan büyük olmalı: "JobRejectReason must be greater than 0."
Veritabanındaki JobRejectReason tablosunda mevcut olmalı
Red nedeninin ReasonCategory değeri Proposal olmalı
MessagestringEvetTeklif talebinin neden reddedildiğini açıklayan not. Platform üzerinden acente tarafından görülebilir. Saklamadan önce HTML-encoded yapılır.Zorunlu: "Message is required."
Boş olamaz: "Message must not be empty."
Maks. 500 karakter: "Message must not exceed 500 characters."
AttachmentsPremiumFileRequest[]HayırReddetmeye eklenecek destekleyici PDF dokümanların isteğe bağlı listesiSağlanırsa her eleman PremiumFileRequest doğrulamasından geçer

JobRejectReason Değerleri

Aşağıdaki tablo JobRejectReason alanı için kullanılabilecek geçerli red nedeni ID’lerini listeler. ReasonCategory değeri 0 olan nedenler Proposal kategorisine aittir.

IDAçıklamaŞirket KısıtlamasıReasonCategory
1Eksik Bilgi/BelgeTüm şirketler0 (Proposal)
4Risk Kabul KriterleriTüm şirketler0 (Proposal)
9Başka Şirketten Teklif Alınamaz - Risk Kabul KriterleriSadece şirket ID: 610 (Proposal)
17Başka Şirketten Teklif Alınabilir - Risk Kabul KriterleriSadece şirket ID: 610 (Proposal)

Not: Bazı red nedenleri belirli sigorta şirketlerine özeldir. Şirket kısıtlaması olmayan nedenler tüm şirketler tarafından kullanılabilir.


PDF Dosyası — PremiumFileRequest

Aşağıdaki alanlar yalnızca Attachments listesi içinde eleman gönderildiğinde zorunludur.

AlanTipZorunluAçıklamaDoğrulama Kuralları
FileNamestringEvet*Dosya adıBoş olamaz: "FileName must not be empty."
.pdf uzantısı olmalı (büyük/küçük harf duyarsız): "Only PDF files are allowed."
ContentTypestringHayırMIME türü—
Base64ContentstringEvet*Base64 kodlu dosya içeriğiBoş olamaz: "Base64Content must not be empty."
Geçerli Base64 olmalı: "Base64Content must be a valid base64 encoded string."
İçerik geçerli bir PDF olmalı (PDF magic bytes %PDF kontrolü): "File content is not a valid PDF."

İstek Örnekleri

Minimal İstek (ek yok)

{
"JobRejectReason": 5,
"Message": "Risk değerlendirmesi underwriting kurallarımızı aşıyor."
}

Ekli İstek (PDF dokümanlarla)

{
"JobRejectReason": 12,
"Message": "Talep edilen gayrimenkul tipi mevcut kriterlerimize göre kapsama uygun değil. Lütfen underwriting kriterlerimizi inceleyin.",
"Attachments": [
{
"FileName": "underwriting-guidelines.pdf",
"ContentType": "application/pdf",
"Base64Content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgL1BhZ2VNVQgzIC9QYWdlU2l6ZXMgWyAzIDAgUiBdID4+PlN0cmVhbQpCVAplYm9va2MwCgo..."
},
{
"FileName": "coverage-explanation.pdf",
"ContentType": "application/pdf",
"Base64Content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMSBSIC9QYWdlTVQgMiAvUGFnZVNpemVzIFsgMiAwIFIgXSA+Pj5TdHJlYW0KQlQKZWJvb2tjMQoK..."
}
]
}

Sınır Testi İsteği (500 karakter mesaj)

{
"JobRejectReason": 1,
"Message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Pelle",
"Attachments": []
}

Yanıt Formatı

Başarılı Yanıt

HTTP Durumu: 204 No Content
Yanıt gövdesi boştur.

Başarılı Red Sonuçları:

  • Job stage’i PremiumRequestRejected (2) olarak güncellenir

  • Red bilgisi platforma senkronize edilir

  • Acente için email notification kuyruğa alınır

  • Attachment’lar (varsa) document storage’a kaydedilir

Hata Yanıtı

{
"Status": false,
"Code": "Error.Code",
"Message": "Error description",
"Response": null
}

Doğrulama hatalarında Response alanı detayları içerir:

{
"Status": false,
"Code": "Validation.General",
"Message": "One or more validation errors occurred",
"Response": [
{
"Field": "FieldName",
"Message": "Error message description"
}
]
}

HTTP Durum Kodları

DurumAçıklama
204 No ContentPrim teklifi başarıyla reddedildi
400 Bad RequestDoğrulama hatası veya geçersiz red nedeni
401 UnauthorizedEksik, geçersiz veya süresi dolmuş token
403 ForbiddenYetersiz yetki veya iş sahipliği reddedildi
404 Not Foundİş veya platform kullanıcısı bulunamadı
500 Internal Server ErrorPlatform servisi hatası veya beklenmeyen hata

Hata Kodları Referansı

KodHTTP DurumuMesaj
Validation.General400One or more validation errors occurred
OfflineUsers.InsuranceCompanyNotFound403No valid insurance company assignment found in token.
OfflineUsers.UserIdentityNotResolved403User identity could not be resolved from token.
OfflineJobs.JobNotFound404No job found for the requested JobId.
OfflineJobs.JobOwnershipDenied403You do not have permission to access this job.
JobState.PlatformUserNotFound404Platform user not found for job {jobId}.
JobState.SenderUserNotFound404Sender user not found in the system.
JobState.ActionNotSentToPlatform500Failed to synchronize rejection action to the platform.
JobState.UnknownBusinessRule500An unexpected business rule violation occurred.
JobState.TransitionError500An unexpected error occurred during job state transition.

Hata Yanıt Örnekleri

Doğrulama Hatası (birden fazla alan)

{
"Status": false,
"Code": "Validation.General",
"Message": "One or more validation errors occurred",
"Response": [
{
"Field": "JobRejectReason",
"Message": "JobRejectReason must be greater than 0."
},
{
"Field": "Message",
"Message": "Message must not be empty."
},
{
"Field": "Attachments[0].FileName",
"Message": "Only PDF files are allowed."
},
{
"Field": "Attachments[0].Base64Content",
"Message": "Base64Content must be a valid base64 encoded string."
}
]
}

Red Nedeni Bulunamadı

{
"Status": false,
"Code": "Validation.General",
"Message": "One or more validation errors occurred",
"Response": [
{
"Field": "JobRejectReason.RejectReasonNotFound",
"Message": "The specified reject reason was not found."
}
]
}

Red Nedeni Yanlış Kategori

{
"Status": false,
"Code": "Validation.General",
"Message": "One or more validation errors occurred",
"Response": [
{
"Field": "JobRejectReason.InvalidRejectReasonCategory",
"Message": "The reject reason must be in the Proposal category."
}
]
}

Sigorta Şirketi İçin Geçersiz Red Nedeni:

{
"Status": false,
"Code": "Validation.General",
"Message": "One or more validation errors occurred",
"Response": [
{
"Field": "JobRejectReason.RejectReasonNotAllowedForInsuranceCompany",
"Message": "The specified reject reason is not allowed for your insurance company."
}
]
}

İş Bulunamadı

{
"Status": false,
"Code": "OfflineJobs.JobNotFound",
"Message": "No job found for the requested JobId.",
"Response": null
}

Erişim Reddedildi

{
"Status": false,
"Code": "OfflineJobs.JobOwnershipDenied",
"Message": "You do not have permission to access this job.",
"Response": null
}

Platform Kullanıcısı Bulunamadı

{
"Status": false,
"Code": "JobState.PlatformUserNotFound",
"Message": "Platform user not found for job 12345.",
"Response": null
}

Platform Senkronizasyon Hatası

{
"Status": false,
"Code": "JobState.ActionNotSentToPlatform",
"Message": "Failed to synchronize rejection action to the platform.",
"Response": null
}


Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

jobIdintegerRequired
The unique identifier of the job to reject the premium offer request for.

Request

This endpoint expects an object.

Response headers

Content-TypestringOptional

Response

No Content

Errors

400
Bad Request Error
500
Internal Server Error