candeniz
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Contract Management Döküman süreçlerinin tasarımını versiyon, personel, servis check gibi kontrollerin yapılarak tek platformdan takip edilmesini sağlayan modül yapılacaktır. Yeni oluşturulacak proje ile Döküman ve Kontrat Yönetimi yeni teknolojiler kullanılarak parametrik bir yapıda oluşturulup özel hizmete sunulacaktır. Döküman veya döküman gruplarının, tanımlı olan kontroller ile eksik belgelerin veya güncellenmesi gereken sözleşmelerin client'a bilgilendiren servis yapısının parametrik olarak yapılması amaçlanmıştır. Mevcutta DMS'nin yaptığı kontrolleri ve viewer kontrollerini bu proje kapsamında yönetiyor olacağız. ## Hedefler - Uçtan uca Kontrat yönetimin sağlanması. - Ayrı bir platform yaratmak - Kayıt edilecek dokümanın kurallarını kontrol eder - Doküman setlerinin hazırlanması - Doküman şablonunun oluşturulması - Doküman saklaması için tanımlanan platform a entegrasyon sağlanır - Endostment entegrasyonu ile kural setlerimize uyan dokumanların onay mekanizmalarının çalıştırılması - Client'lerın tüm sözleşme ve dokumanlar süreçlerinde kullanacakları api'ler geliştirmek - Rule Management Module - Document Percentage Module: Clientlara dökümanın belirli kısmını izleyebilir kılma (sadece imza sayfası gibi) - Format Converter Module ## Definitions - Document Type - Döküman Dili(tr,ing,arp...) - Kurallar - Versiyon(Kural Seti) - Kanal(Kural Seti) - Mob Service kontrolleri - Dokuman için Service kontrolu - Döküman Grupları ----------------------------- # Contract and Document İşlemleri TEST: https://nonprod-apisix.burgan.com.tr/ebanking/contract/ PREPROD: https://preprod-apisix.burgan.com.tr/ebanking/contract/ DMZTEST: https://test-pubagw6.burgan.com.tr/ebanking/contract/ DMZPREPROD: https://preprod-pubagw6.burgan.com.tr/ebanking/contract/ | Column 1 | Column 2 | | -------- | -------- | | https://nonprod-apisix.burgan.com.tr/ebanking/contract/* | https://preprod-apisix.burgan.com.tr/ebanking/contract/* | Text | Text | | Text | Text | | Text | Text | | Text | Text | ## POST /contract/Instance POST /contract/Instance endpoint'i, belirli bir müşteri için sözleşme örneği oluşturur ve müşterinin kontrata bağlı eksik belgelerini döndürür. Bu işlem, müşterinin hangi belgeleri onaylaması gerektiğini anlamasına yardımcı olur. İstek, sözleşmenin adını, referansı (genellikle TCKN veya VKN), sahibi ve işlemle ilgili bilgileri içerir. İşlem bilgileri, işlemi yapan istemci, kullanıcı, işlemin adı, durumu ve eylemi içerir. Bu endpoint, müşteri onayı gerektiren belgeleri yönetmek ve eksik belgeleri saptamak için kullanılır, böylece müşteriler gereken tüm belgeleri eksiksiz bir şekilde sunabilirler. ### Request Curl: ``` curl --location --request POST 'https://dev-amorphie-contract.burgan.com.tr/contract/Instance' \ --header 'Content-Type: application/json' \ --header 'Business_line: X' \ --header 'User_reference: 11223344558' \ --header 'Cookie: 79aa751ea7c0210235c7d1ba7d63a7c2=60bf996c67174c852f9e6723f3266901' \ --data-raw '{ "contractname": "dev-con-tr-test", "reference": "11223344558", "owner": "11223344558", "process": { "client": "ekyc-application", "user": "34455667789", "name": "ekyc-process", "state": "load-document", "action": "web-mobil-document-load" } }' ``` ### Request Detayları - **Header Parametreleri** - **Content-Type**: İstek gövdesinin içeriğinin türünü belirtir. Bu örnekte `application/json` olarak ayarlanmış, yani gönderilen veri JSON formatındadır. - **Business_line**: Mobil ON veya Mobil Burgan ayrımını belirten parametre. - **ClientId**: İstek yapan müşterinin kimliğini belirten parametre. - **Accept-Language**: İstemcinin tercih ettiği dil kodunu belirten parametre. Örneğin, "en-US" veya "tr-TR". - **User_reference**: Genellikle müşterinin TCKN veya VKN bilgisini ifade eden referans bilgisi. - **Cookie**: Oturum bilgileri gibi ek bilgileri taşımak için kullanılan HTTP cookie’si. - **Request Body** - `contractname`: Oluşturulacak sözleşmenin adı. - `reference`: Sözleşme örneği ile ilişkilendirilen referans numarası. - `owner`: Sözleşme sahibinin kimliği veya referans numarası. - `process`: Sözleşme süreciyle ilgili detayları içeren nesne. - `client`: İşlemin yapıldığı client türünü belirtir. Örneğin, "ekyc-application". - `user`: İşlemi gerçekleştiren kullanıcının kimliği. - `name`: İşlem sürecinin adı. - `state`: Sürecin mevcut durumu. - `action`: Gerçekleştirilecek eylemi belirten parametre. ### Response Detayları ``` { "success": true, "data": { "code": "dev-con-tr-test", "status": "InProgress", "document": [ { "name": "SÖZLEŞME ÖNCESİ BİLGİLENDİRME FORMU", "status": "Active", "code": "doc-sozlesme-oncesi-bildilendirme-formu", "useExisting": "AnyValid", "minVersion": "1.0.0", "isRequired": true, "documentDetail": { "onlineSing": { "templateCode": "cont-sozlesme-oncesi-bildilendirme-formu", "version": "1.0.0" } } }, { "name": "KUR KORUMALI TÜRK LİRASI VADELİ MEVDUAT HESABI EK SÖZLEŞMESİ", "status": "Active", "code": "doc-kkm-hhesabi-ek-sozlesmesidir", "useExisting": "AnyValid", "minVersion": "1.0.0", "isRequired": true, "documentDetail": { "onlineSing": { "templateCode": "cont-kkm-hhesabi-ek-sozlesmesidir", "version": "1.0.0" } } } ], "documentGroup": [ { "required": true, "status": "Active", "title": "Login Belgeleri", "at-least-required-document": 1, "documentGroupDetailInstanceDto": { "documentInstances": [ { "name": "vk4", "status": "Active", "code": "vk4-test", "useExisting": null, "minVersion": "1.0.0", "isRequired": false, "documentDetail": { "onlineSing": { "templateCode": "doc-bankacilik-hizmetleri-sozlesmesi-30-VK4-1", "version": "1.0.0" } } }, { "name": "vk5 test", "status": "Active", "code": "vk5-test", "useExisting": null, "minVersion": "1.0.0", "isRequired": false, "documentDetail": { "onlineSing": { "templateCode": "doc-bankacilik-hizmetleri-sozlesmesi-30-VK5-1", "version": "1.0.0" } } }, { "name": "vk11-test", "status": "Active", "code": "vk11-test", "useExisting": null, "minVersion": "1.0.0", "isRequired": false, "documentDetail": { "onlineSing": { "templateCode": "doc-bankacilik-hizmetleri-sozlesmesi-30-VK11", "version": "1.0.0" } } } ], "status": null, "name": "Login Belgeleri", "code": "login-doc-grup-test", "id": "f3beaa2e-ba72-4700-b2df-019de51ced99" } } ] }, "errorMessage": null } ``` ### Response Dönüş Değerleri - **success**: İşlemin başarılı olup olmadığını belirten boolean bir değer. - **data**: İşlem sonucunda dönen veri nesnesi. - `code`: Sözleşmenin kodu. Sözleşmenin türünü belirten bir tanımlayıcıdır. - `status`: Sözleşmenin mevcut durumu. Örneğin, "InProgress" sözleşmenin henüz tamamlanmadığını gösterir. - `document`: İlgili belgelerin listesi. - `name`: Belgenin adı. - `status`: Belgenin durumu. - `code`: Belgenin kodu. - `useExisting`: Mevcut dokümanların kullanılıp kullanılmayacağını belirten bir alan. Örneğin, "AnyValid" herhangi bir geçerli dokümanın kullanılabileceğini gösterir.. - `minVersion`: Belgenin gerektirdiği minimum versiyon. - `isRequired`: Belgenin zorunlu olup olmadığı. - `documentDetail`: Belge detayları. - `onlineSing`: Dijital onay ile ilgili detaylar. - `templateCode`: İmza şablonunun kodu. - `version`: İmza şablonunun versiyonu. - `documentGroup`: İlgili belge gruplarının listesi. - `required`: Grubun zorunlu olup olmadığı. - `status`: Grubun durumu. - `title`: Grubun başlığı. - `at-least-required-document`: Grubun gerektirdiği minimum belge sayısı. - `documentGroupDetailInstanceDto`: Belge grubu detayları. - `documentInstances`: Belge örneklerinin listesi. - `status`: Belge grubunun durumu. - `name`: Belge grubunun adı. - `code`: Belge grubunun kodu. - `id`: Belge grubunun benzersiz tanımlayıcısı. - **errorMessage**: Hata mesajı, işlem başarısız olduğunda hata detaylarını içerir. ## POST template-render/render/pdf /template-render/render/pdf endpoint'i, belirtilen bir şablonu(document defination) kullanarak PDF formatında belge oluşturmak için tasarlanmış bir servistir. Bu servis, dinamik verilerle belirli bir şablonun doldurulup, sonucun PDF olarak geri dönmesini sağlar. ### Request Detayları ``` curl --location --request POST 'https://test-amorphie-contract.burgan.com.tr/template-render/render/pdf' \ --header 'Authorization: Bearer' \ --header 'User_reference: 11223344558' \ --header 'Business_line: X' \ --header 'Language: en-EN' \ --header 'Content-Type: application/json' \ --header 'Cookie: 80ba7bf6b241fbce6b86fb15ee661993=c504d2a83fd6a72c8331dd9438bd3136' \ --data-raw '{ "name": "cont-ddkkm-erken-kapama-talimati", "render-data": {"customer":{"customerIdentity":"40156437404"}, "customerIdentity":40156437404, "Tarih":"06.03.2024"}, "render-data-for-log": {"customer":{"customerIdentity":"40156437404"}, "customerIdentity":40156437404, "Tarih":"06.03.2024"}, "semantic-version": "1.0.0" } ``` - **Header Parametreleri** - `User_reference`: Genellikle müşterinin TCKN veya VKN bilgisini ifade eden referans bilgisi. - `Business_line`: Mobil ON veya Mobil Burgan ayrımını belirten parametre. - `Language`: İstemcinin tercih ettiği dil kodunu belirten parametre. Bu örnekte "en-EN" olarak ayarlanmıştır. - `Content-Type`: İstek gövdesinin içeriğinin türünü belirtir. Bu örnekte `application/json` olarak ayarlanmış, yani gönderilen veri JSON formatındadır. - `Cookie`: Oturum bilgileri gibi ek bilgileri taşımak için kullanılan HTTP cookie’si. - **Request Body** - `name`: Kullanılacak şablonun adını(Template-name) belirten parametre. - `render-data`: PDF oluşturulurken kullanılacak verileri içeren nesne. Bu veriler şablonda yer alacak dinamik içeriği belirler. - `render-data-for-log`: Loglama amacıyla kullanılacak verileri içeren nesne. Genellikle `render-data` ile aynı içeriğe sahiptir fakat loglama sırasında farklı bir amaçla kullanılabilir. - `semantic-version`: Şablonun kullanılacak semantik versiyonunu belirten parametre. ### Response Detayları ``` data": { "templateRenderRequestModel": { "name": "cont-ddkkm-erken-kapama-talimati", "render-id": "beb8ec55-c51f-4986-a882-dcc4a16f5720", "render-data": { "customer": { "customerIdentity": "40156437404" }, "customerIdentity": 40156437404, "Tarih": "06.03.2024" }, "render-data-for-log": { "customer": { "customerIdentity": "40156437404" }, "customerIdentity": 40156437404, "Tarih": "06.03.2024" }, "semantic-version": "1.0.0", "process-name": null, "identity": "11223344558" }, "content": "JVBERi0xLjQKMSAwIG9iago8PAovVGl0bGUgKP7/AHAAZABmKQovQ3JlYXRvciAo/ ``` - **data**: İşlem sonucunda dönen veri nesnesi. - `templateRenderRequestModel`: İstek modeli hakkında bilgi içeren nesne. - `name`: İşlenen şablonun adı. - `render-id`: Oluşturulan PDF'in benzersiz tanımlayıcısı. - `render-data`: Şablonda kullanılan veriler. - `render-data-for-log`: Loglama için kullanılan veriler. - `semantic-version`: Kullanılan şablonun semantik versiyonu. - `process-name`: İşlem adı, bu örnekte null olarak belirtilmiş. - `identity`: Kullanıcı kimliği. - `content`: Oluşturulan PDF'in içeriği, base64 kodlanmış bir string olarak döner. - **success**: İşlemin başarılı olup olmadığını belirten boolean bir değer. - **errorMessage**: Hata mesajı, işlem başarısız olduğunda hata detaylarını içerir. Bu örnekte boş bir string olarak dönmüş, yani hata oluşmamıştır. ## POST document/Instance Bu endpoint, müşterilerin dökümanları onaylamasını ve sunmasını işleyen bir API'dir. Bu endpoint, dosya içeriğini (örneğin PDF formatında) base64 kodlanmış içerik ile birlikte kabul eder ve döküman kodu, versiyonu, referans ve sahip gibi meta verileri işler. - **Header Parametreleri** - `User_reference`: Genellikle müşterinin TCKN veya VKN bilgisini ifade eden referans bilgisi. - `Business_line`: Mobil ON veya Mobil Burgan ayrımını belirten parametre. - `Accept-Language`: İstemcinin tercih ettiği dil kodunu belirten parametre. Bu örnekte "en-EN" olarak ayarlanmıştır. - `Customer_no`: Müşteri numarasını belirtir. Müşteriye özgü işlemlerde veya sorgularda kullanılır. ## GET /customer/get-documents-by-contracts Endpoint Analizi Bu API endpoint'i, belirli sözleşmelere bağlı dokümanları getirmek için kullanılır. Endpoint, özellikle müşterilere ait sözleşmelerle ilişkilendirilmiş dokümanları sorgulamak için tasarlanmıştır. Kullanıcı bu endpoint'e bir istek gönderdiğinde, sistem sözleşme bilgilerine göre ilgili dokümanları bulur ve döndürür. Bu işlem, müşteri hizmetleri ve sözleşme yönetimi süreçlerinde, müşterilerin ilgili dokümanlara hızlı ve kolay erişimini sağlamak için önemlidir. Endpoint, genellikle sözleşme ID'si veya benzer bir tanımlayıcı alır ve bu tanımlayıcıya bağlı dokümanları listeler. Yanıt olarak, ilgili dokümanların detayları (örneğin, doküman adı, türü, oluşturulma tarihi vb.) döndürülür. Bu endpoint'in kullanımı, müşteri ve sözleşme bilgilerinin doğru ve güncel tutulmasını gerektirir. --------------------------- # Contract Management Api Flow Listesi ## Contract Management Apileri Contract Instance Oluşturma ### ContractInstanceApi #### Eski ```bash curl --location 'https://test-amorphie-contract.burgan.com.tr/contract/Instance' \ --header 'Business_line: X' \ --header 'User_reference: 998877' \ --header 'Language: en-EN' \ --header 'Content-Type: application/json' \ --header 'Cookie: 80ba7bf6b241fbce6b86fb15ee661993=2ec8c9c5780129299a756f605126f2ba' \ --data '{ "contractname": "logindocs" }' ##Response : { "success": true, "data": { "code": "logindocs", "status": "InProgress", "document": [ { "name": "On İnternet Şubesi Bilgilendirme Metni", "status": "Active", "code": "doc-on-internet-subesi-bilgilendirme-metni", "useExisting": "AnyValid", "minVersion": "1.0.0", "isRequired": true, "documentDetail": { "onlineSing": { "templateCode": "cont-on-internet-subesi-bilgilendirme-metni", "version": "1.0.0" } } } ], "documentGroup": [] }, "errorMessage": null } ``` #### Yeni ```bash= curl --location 'https://dev-amorphie-contract.burgan.com.tr/Contract/Instance' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --header 'Cookie: 79aa751ea7c0210235c7d1ba7d63a7c2=0f13095bbcb69f04f3bec89444c8ea8b' \ --data '{ "contractCode": "logindocs", "contractInstanceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }' ##Response { "success": true, "data": { "contractCode": "logindocs", "status": "InProgress", "contractInstanceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "documentList": [ { "name": "On İnternet Şubesi Bilgilendirme Metni", "status": "InProgress", "code": "doc-on-internet-subesi-bilgilendirme-metni", "useExisting": "AnyValid", "minVersion": "1.0.0", "isRequired": true, "lastVersion": "1.0.5", "documentDetail": { "onlineSign": { "templateCode": "cont-on-internet-subesi-bilgilendirme-metni", "version": "1.0.6" } } } ], "documentGroupList": [] }, "errorMessage": null } ``` minversion yerine lastversion kullanılacak ### TemplateRenderApi PDF Şablonu Render Etme #### Eski ```bash curl --location 'https://test-amorphie-contract.burgan.com.tr/template-render/render/pdf' \ --header 'Business_line: X' \ --header 'User_reference: 998877' \ --header 'Language: en-EN' \ --header 'Content-Type: application/json' \ --header 'Cookie: 80ba7bf6b241fbce6b86fb15ee661993=2ec8c9c5780129299a756f605126f2ba' \ --data '{ "name": "cont-on-internet-subesi-bilgilendirme-metni", "semantic-version": "1.0.0" }' ``` #### Yeni ```bash curl --location 'https://dev-amorphie-contract.burgan.com.tr/template-render/render/pdf' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --header 'Cookie: 79aa751ea7c0210235c7d1ba7d63a7c2=0f13095bbcb69f04f3bec89444c8ea8b' \ --data '{ "name": ContractInstanceApi.Response.data.documentList[x].documentDetail.onlineSign.templateCode , "semantic-version": "ContractInstanceApi.Response.data.documentList[x].documentDetail.onlineSign.version" } ' ##Response: { "data": { "templateRenderRequestModel": { "name": "cont-on-internet-subesi-bilgilendirme-metni", "render-id": "9affea78-2ee4-485b-aee9-15b671f9c824", "render-data": "{\"customer\":{\"customerIdentity\":\"101010\"}, \"customerIdentity\":101010}", "render-data-for-log": "{\"customer\":{\"customerIdentity\":\"101010\"}, \"customerIdentity\":101010}", "semantic-version": "1.0.0", "process-name": null, "identity": "101010" }, "content":"string.base64" }, "success": true, "errorMessage": "" } ``` ### GetTemplateRenderApi ```bash curl --location 'https://dev-amorphie-contract.burgan.com.tr/template-render/instance/pdf/RenderId' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ #Response : { "success": true, "data": "string.base64", "errorMessage": null } ``` * RenderId : flow veya apilerden gelen renderId bilgisi ile dokumanın base64 hali alınır ### DocumentInstanceApi imzalanacak dokumanlari flow üzerinden taşımamak için ayrı bir request atılır. ```bash curl --location 'https://dev-amorphie-contract.burgan.com.tr/document/Instance' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --header 'Cookie: 79aa751ea7c0210235c7d1ba7d63a7c2=0f13095bbcb69f04f3bec89444c8ea8b' \ --data '{ "documentContent": { "contentType": "application/pdf", "fileContext": "TemplatePdfApi.Response.data.content", "fileName": "test2.pdf" }, "renderId": "TemplatePdfApi.data.render-id", "documentCode": "ContractInstanceApi.Response.data.documentList[x].code", "documentVersion": ContractInstanceApi.Response.data.documentList[x].lastVersion, "instanceMetadata": [ ], "notes": [ ] }' Response: { "success": true, "data": { "documentInstanceId": "9affea78-2ee4-485b-aee9-15b671f9c824" }, "errorMessage": null } ``` ### GetDocumentByContract **customer/get-documents-by-contracts** Bu API endpoint'i, belirli sözleşmelere bağlı dokümanları getirmek için kullanılır. Endpoint, özellikle müşterilere ait sözleşmelerle ilişkilendirilmiş dokümanları sorgulamak için tasarlanmıştır. Kullanıcı bu endpoint'e bir istek gönderdiğinde, sistem sözleşme bilgilerine göre ilgili dokümanları bulur ve döndürür. #### Eski Request ``` curl --location --request GET 'https://test-amorphie-contract.burgan.com.tr/customer/get-documents-by-contracts' \ --header 'User_reference: 123456789' \ --header 'Language: tr-TR' \ --header 'Business_line: X' \ --header 'Cookie: 80ba7bf6b241fbce6b86fb15ee661993=71afb9124b5aa467d71a3c8b6d011104; 80ba7bf6b241fbce6b86fb15ee661993=71afb9124b5aa467d71a3c8b6d011104' ``` #### Eski Response ``` { "success": true, "data": [ { "id": "6631b10b-57b8-4a0a-8429-f58855bff988", "code": "logindocs", "title": "On İnternet Şubesi Bilgilendirme Sözleşmesi", "contractStatus": "valid", "customerContractDocuments": [ { "id": "3f095a57-df58-4122-baef-dcf0aea26076", "title": "On İnternet Şubesi Bilgilendirme Metni", "code": "doc-on-internet-subesi-bilgilendirme-metni", "documentStatus": "valid", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=dff21c97-d76e-4da3-abb4-809f7900026a", "approvalDate": "2024-05-23T14:03:07.994833", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-on-internet-subesi-bilgilendirme-metni", "min-version": "1.0.0" } ] } } ], "customerContractDocumentGroups": [] }, { "id": "a25a71e0-70b2-4ca4-b724-dc619da667e8", "code": "con-kkm-hesaplari", "title": "Undefined_Lang_Key", "contractStatus": "in-progress", "customerContractDocuments": [ { "id": "128dd636-bde1-4aeb-99e6-b32e0008a3f7", "title": "KUR KORUMALI TÜRK LİRASI VADELİ MEVDUAT HESABI EK SÖZLEŞMESİ", "code": "doc-kkm-hhesabi-ek-sozlesmesidir", "documentStatus": "valid", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=3723287b-ab1f-4cf6-8a24-88a80da735b2", "approvalDate": "2024-05-28T09:14:05.766554", "onlineSign": { "sca-required": false, "allowed-clients": [ "direct-sales", "dealer", "mobile-ib", "web-ib" ], "document-model-template": [ { "name": "cont-kkm-hhesabi-ek-sozlesmesidir", "min-version": "1.0.0" } ] } }, { "id": "c0777032-511a-4ee1-820a-4f8d01368d97", "title": "Kur Korumalı Türk Lirası Vadeli Mevduat Hesabı Talep Formu", "code": "doc-kkm-talep-formu", "documentStatus": "not-valid", "required": true, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [ "web-ib", "direct-sales", "dealer", "mobile-ib" ], "document-model-template": [ { "name": "cont-kkm-talep-formu", "min-version": "1.0.0" } ] } }, { "id": "f6893cf9-f47a-4187-a1dd-eac1a7f4202f", "title": "KUR KORUMALI TÜRK LİRASI VADELİ MEVDUAT HESABI SÖZLEŞME ÖNCESİ RİSK BİLGİLENDİRME FORMU (“Form”)", "code": "doc-kkm-hesabi-sozlesme-oncesi-risk-bil-formuu", "documentStatus": "not-valid", "required": true, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [ "direct-sales", "mobile-ib", "dealer", "web-ib" ], "document-model-template": [ { "name": "cont-kkm-hesabi-sozlesme-oncesi-risk-bil-formuu", "min-version": "1.0.0" } ] } } ], "customerContractDocumentGroups": [] }, { "id": "e57a0f85-af4e-4b40-b493-bdc312d62d24", "code": "con-ekinsu-deneme-1305", "title": "Ekinsu Deneme", "contractStatus": "valid", "customerContractDocuments": [ { "id": "128dd636-bde1-4aeb-99e6-b32e0008a3f7", "title": "KUR KORUMALI TÜRK LİRASI VADELİ MEVDUAT HESABI EK SÖZLEŞMESİ", "code": "doc-kkm-hhesabi-ek-sozlesmesidir", "documentStatus": "valid", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=3723287b-ab1f-4cf6-8a24-88a80da735b2", "approvalDate": "2024-05-28T09:14:05.766554", "onlineSign": { "sca-required": false, "allowed-clients": [ "dealer", "direct-sales", "mobile-ib", "web-ib" ], "document-model-template": [ { "name": "cont-kkm-hhesabi-ek-sozlesmesidir", "min-version": "1.0.0" } ] } } ], "customerContractDocumentGroups": [] }, { "id": "00000000-0000-0000-0000-000000000000", "code": "Other_idle_docs", "title": "Diğer", "contractStatus": "", "customerContractDocuments": [], "customerContractDocumentGroups": [] } ], "errorMessage": null } ``` #### Yeni Request ``` curl --location --request GET 'https://dev-amorphie-contract.burgan.com.tr/customer/get-documents-by-contracts' \ --header 'User_reference: 99887766554' \ --header 'Accept-Language: tr-TR' \ --header 'Business_line: X' \ --header 'Cookie: 79aa751ea7c0210235c7d1ba7d63a7c2=9c4414a2d523f42bcb3ff1cc70b49536' ``` #### Yeni Response ``` { "success": true, "data": [ { "id": "530d9923-e497-4595-abc8-899523dec7ee", "code": "con-bakir-my", "title": "Bakır Kontrat", "contractStatus": "Approved", "customerContractDocuments": [], "customerContractDocumentGroups": [ { "id": "22d53cfb-15dc-40ec-876e-a380b4751698", "code": "my-grup-1", "title": "TR VK GRUP", "documentGroupStatus": "Approved", "atLeastRequiredDocument": 1, "required": true, "customerContractGroupDocuments": [ { "id": "eac86e48-dfdb-4aac-9dea-0268678b606a", "title": "TR VK4", "code": "doc-vk4-my", "documentStatus": "InProgress", "required": false, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-vk4", "min-version": "1.0.0" } ] } }, { "id": "cc99381a-a79e-426f-8bf8-c66c91ab0d29", "title": "TR VK11", "code": "doc-vk11-my", "documentStatus": "InProgress", "required": false, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-vk11", "min-version": "1.0.0" } ] } }, { "id": "f652bee6-fc7a-4668-954a-ad9fc3cb0ec6", "title": "TR VK5", "code": "doc-vk5-my", "documentStatus": "Approved", "required": false, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=e9b5a5ae-dc74-4f00-8665-8c15ad6acdc1", "approvalDate": "2024-05-16T13:39:35.395011", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-vk5", "min-version": "1.0.0" } ] } } ] } ] }, { "id": "7cec49d7-2f50-4f54-895c-f79eca180a3d", "code": "con-altin-my", "title": "Altın Kontrat", "contractStatus": "Approved", "customerContractDocuments": [ { "id": "fcf1364c-26c2-49ac-96a9-9331bbaaf668", "title": "TR 723", "code": "doc-723-my", "documentStatus": "HasNewVersion", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=252ff0e9-42d9-4a93-b63a-b1ba5b30d500", "approvalDate": "2024-01-25T11:29:34.819047", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-723-my", "min-version": "1.0.0" }, { "name": "cont-en-723-my", "min-version": "1.0.0" } ] } }, { "id": "dfc3662c-308b-4ff7-af26-be9b37d77cc9", "title": "TR 731", "code": "doc-731-my", "documentStatus": "Approved", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=ecb4135d-ed9a-47e7-94d8-1d1c72e102cb", "approvalDate": "2024-01-16T13:27:02.419464", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-731-my", "min-version": "1.0.0" }, { "name": "cont-en-731-my", "min-version": "1.0.0" } ] } }, { "id": "3074c4fe-c97e-4f47-bf41-6de709547fd8", "title": "TR 702", "code": "doc-702-my", "documentStatus": "Approved", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=9ce76c16-5914-459c-9914-0242c05ea60c", "approvalDate": "2024-01-01T13:15:19.209811", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-702-my", "min-version": "1.0.0" }, { "name": "cont-en-702-my", "min-version": "1.0.0" } ] } }, { "id": "25124aac-2a21-3425-abcc-dee34fad2132", "title": "TR 723", "code": "doc-723-my", "documentStatus": "Approved", "required": true, "render": true, "version": "1.0.2", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=10147cdf-ee47-4a93-bf88-79da7f71dff7", "approvalDate": "2024-05-23T12:56:04.302128", "onlineSign": { "sca-required": false, "allowed-clients": [ "mobile-ib", "dealer", "direct-sales", "web-ib" ], "document-model-template": [ { "name": "cont-tr-723-my", "min-version": "1.0.2" }, { "name": "cont-en-723-my", "min-version": "1.0.0" } ] } }, { "id": "ee424aac-2a21-3425-abcc-dee34fad2132", "title": "TR 723", "code": "doc-723-my", "documentStatus": "HasNewVersion", "required": true, "render": false, "version": "0.0.98", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=e9780442-6816-4c46-9547-0a89cb77fabf", "approvalDate": "2024-05-27T11:04:25.968456", "onlineSign": { "sca-required": false, "allowed-clients": [ "direct-sales", "mobile-ib", "dealer", "web-ib" ], "document-model-template": [ { "name": "cont-tr-723-my", "min-version": "0.0.98" }, { "name": "cont-en-723-my", "min-version": "1.0.0" } ] } } ], "customerContractDocumentGroups": [ { "id": "22d53cfb-15dc-40ec-876e-a380b4751698", "code": "my-grup-1", "title": "TR VK GRUP", "documentGroupStatus": "Approved", "atLeastRequiredDocument": 1, "required": true, "customerContractGroupDocuments": [ { "id": "eac86e48-dfdb-4aac-9dea-0268678b606a", "title": "TR VK4", "code": "doc-vk4-my", "documentStatus": "InProgress", "required": false, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-vk4", "min-version": "1.0.0" } ] } }, { "id": "cc99381a-a79e-426f-8bf8-c66c91ab0d29", "title": "TR VK11", "code": "doc-vk11-my", "documentStatus": "InProgress", "required": false, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-vk11", "min-version": "1.0.0" } ] } }, { "id": "f652bee6-fc7a-4668-954a-ad9fc3cb0ec6", "title": "TR VK5", "code": "doc-vk5-my", "documentStatus": "Approved", "required": false, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=e9b5a5ae-dc74-4f00-8665-8c15ad6acdc1", "approvalDate": "2024-05-16T13:39:35.395011", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-vk5", "min-version": "1.0.0" } ] } } ] }, { "id": "04abe43c-4e61-4179-8ac6-dbaa513ddd6e", "code": "my-grup-2", "title": "TR FX GRUP", "documentGroupStatus": "Approved", "atLeastRequiredDocument": 1, "required": true, "customerContractGroupDocuments": [ { "id": "3d79a1fe-16b0-4153-a947-2915fa845e33", "title": "TR 931", "code": "doc-931-my", "documentStatus": "Approved", "required": false, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=7a121ab5-a088-4697-ab9e-c8f5831aa597", "approvalDate": "2024-05-16T12:09:09.555942", "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-931-my", "min-version": "1.0.0" }, { "name": "cont-en-931-my", "min-version": "1.0.0" } ] } }, { "id": "15e08e1d-e451-4d6f-bba2-1c2f9842ab8d", "title": "TR 930", "code": "doc-930-my", "documentStatus": "InProgress", "required": false, "render": true, "version": "1.0.0", "minioUrl": null, "approvalDate": null, "onlineSign": { "sca-required": false, "allowed-clients": [], "document-model-template": [ { "name": "cont-tr-930-my", "min-version": "1.0.0" }, { "name": "cont-en-930-my", "min-version": "1.0.0" } ] } } ] } ] }, { "id": "00000000-0000-0000-0000-000000000000", "code": "//OtherDocuments", "title": "Diğer", "contractStatus": null, "customerContractDocuments": [ { "id": "ac32dde2-adce-3211-adc2-45faed34dc3e", "title": "TR 170", "code": "doc-170-my", "documentStatus": "Approved", "required": true, "render": true, "version": "1.0.0", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=064b99e7-a5d5-4afc-b50b-53b2c9de83da", "approvalDate": "2024-05-16T15:27:01.020712", "onlineSign": { "sca-required": false, "allowed-clients": [ "direct-sales", "mobile-ib", "web-ib", "dealer" ], "document-model-template": [ { "name": "cont-tr-170-my", "min-version": "1.0.0" } ] } } ], "customerContractDocumentGroups": null } ], "errorMessage": null } ``` #### Eski ve Yeni Geliştirme arasındaki farklar **Eski documentStatus Değerleri** 1. not-valid: Doküman geçerli değil. Bu, dokümanın onaylanmadığı anlamına gelir. 2. valid: Doküman geçerli. Bu, dokümanın onaylandığı ve gerekli tüm kriterleri karşıladığı anlamına gelir. **Yeni documentStatus Değerleri** 1. InProgress: Doküman üzerinde çalışılıyor. Bu, dokümanın onay sürecinin devam ettiği anlamına gelir. 2. Approved: Doküman onaylandı. Bu, dokümanın tüm gerekli kriterleri karşıladığı ve resmi olarak kabul edildiği anlamına gelir. 3. HasNewVersion: Doküman onaylandı ve Dokümanın yeni bir versiyonu mevcut. Bu, dokümanın eski versiyonunun geçerliliğini yitirdiği ve yeni bir versiyonun kullanıma sunulduğu anlamına gelir. ## Akışlar ### RenderFlowStart ```bash curl --location 'https://dev-amorphie-workflow.burgan.com.tr/workflow/instance/d7effeb5-c7b7-4376-b8d1-e811839cf037/transition/render-online-sign-start' \ --header 'User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Behalf-Of-User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --data '{ "ContractInstanceId": "d7effeb5-c7b7-4376-b8d1-e811839cf037", "ContractCode":"logindocs", "DocumentList": [ { "Code": "ContractInstanceApi.Response.data.documentList[x].code" } ] }' ``` * ContractInstanceId : optional * ContractCode : optional * DocumentList : required * DocumentList.Code : required dokument definition daki code alanına denk geliyor. [#ContractInstanceApi](###ContractInstanceApi) > TemplateRenderApi [#GetTemplateRenderApi](###GetTemplateRenderApi) Template Render Akışdan gelen bilgiler dogrultusunda çalıştırılır. > DocumentInstanceApi [#DocumentInstanceApi](###DocumentInstanceApi) Template Render'dan gelen ve akışdan gelen bilgilerle doldurulur #### RenderApproved ```bash curl --location 'https://dev-amorphie-workflow.burgan.com.tr/workflow/instance/ec8fcf32-fcdf-45c1-b02c-c57f7307fe6d/transition/document-onlinesign-approved' \ --header 'User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Behalf-Of-User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --data '{ "ContractCode":"logindocs", "ContractIstanceId":"{{#guid}}" "DocumentInstanceIds": [ "DocumentInstanceApi.data.documentInstanceId" ] }' ``` ** ContractCode ,ContractIstanceId opsiyonel** ### Render Flow Start 2 [#DocumentInstanceApi](#DocumentInstanceApi) Render Online Sign Flow IsRender false gönderilirse approve adımı kullanılmayacak sekilde akış ilerler tek stepde biter. ```bash curl --location 'https://dev-amorphie-workflow.burgan.com.tr/workflow/instance/d7effeb5-c7b7-4376-b8d1-e811839cf037/transition/render-online-sign-start' \ --header 'User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Behalf-Of-User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --data '{ "DocumentInstanceIds": [ "DocumentInstanceApi.data.documentInstanceId" ], "IsRender":false }' ``` ### ContractFlow ```bash curl --location 'https://dev-amorphie-workflow.burgan.com.tr/workflow/instance/27c7f5e6-5d62-4f88-93a3-64aa17f89702/transition/contract-start-StartContract' \ --header 'User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Behalf-Of-User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --data '{ "ContractCode": "logindocs" }' ``` hub dan additionalData içerisinde renderId bilgisi gelir > TemplateRenderApi [#GetTemplateRenderApi](###GetTemplateRenderApi) Template Render Akışdan gelen bilgiler dogrultusunda çalıştırılır. > DocumentInstanceApi [#DocumentInstanceApi](###DocumentInstanceApi) Template Render'dan gelen ve akışdan gelen bilgilerle doldurulur > RenderApproved [#RenderApproved](###RenderApproved) ### SubContractFlow #### ContractWithoutHeaderDto header da user bilgileri yoksa sub flow başlatırken input olarak ContractWithoutHeaderDto verilmeli ![image](https://hackmd.io/_uploads/Sy3M8fM4C.png) ContractWithoutHeaderDto: `{ "Reference":TCKN veya VKN, "BankEntity":"X", "CustomerNo":Müşteri numarasi }` ![image](https://hackmd.io/_uploads/HJyvUzzV0.png) #### BackTransitionId ``` contract-back-BackTransitionId ``` Eger subflow başlatırken backtransitionId vermeden contract-start-back transition çalıştırılırsa default olarak ` "additionalData":{"backTransitionId":"contract-start-back"},` degerini döndürür ## Task Services ### customer-approve-by-contract TaskServiceName = customer-approve-by-contract ![image](https://hackmd.io/_uploads/Bk9OcMMN0.png) ### contractinstancestate TaskServiceName = contractinstancestate ![image](https://hackmd.io/_uploads/SJAC5MfV0.png) ## InstanceStateApi: Sözleşme Durumunu Sorgulama ### Curl Komutu: ```bash curl --location 'https://test-amorphie-contract.burgan.com.tr/contract/InstanceState?ContractName=logindocs' \ --header 'Business_line: X' \ --header 'User_reference: 998877' \ --header 'Language: en-EN' \ ``` ## DeleteAllDocumentsApi: Tüm Belge Kayıtlarını Silme bu sadece test için yaptıgımız bir api token'ı degiştirmesi zor oldugundan yaptık prod da olmıyacak ### Curl Komutu: ```bash curl --location --request DELETE 'http://localhost:4300/customer/delete-all-documents?reference=998877' \ --header 'accept: */*' ----------------- # Definition ### Document Definitions **3 type document definitions** 1. Şeması olmayan, render edilmeyen,image olarak eklenebilecek dokuman tipi tanımı ```json= { "name": "identification-certificate-nc", "title": { "tr-TR": "Nufus Cuzdani", "en-EN": "Birth Certificate" }, "tags": [ { "tag": "id-card", "id": "reference" }, { "tag": "customer-info", "id": "#mernis.response.$.tcknno" }, { "tag": "mernis", "id": "owner" } ], "upload": { "sca-required": false, "allowed-clients": [ "web-ib", "mobile-ib", "dealer", "direct-sales" ], "allowed-formats": [ { "format": "png", "max-size-kilobytes": 512 }, { "format": "jpg", "max-size-kilobytes": 1024 } ] }, "optimize": [ { "transform-to": "jpg", "size": true } ], "starting-transition-name" : "trx-upload-document",//sor "operation": { "control-layout": { "view-tags": [ { "tag": "mernis", "parameter-key": "owner" } ] }, "[OBSOLUTE]document-manuel-control": true }, "metadata": { "form":"", "template":"", "valid-after-upload": "6M", "offical-expiry": "#mernis.response.$.information.expiryAt" }, "status": "active", "base-status": "active" } ``` * allowed-clients client bilgileri idm üzerindenmi gelecek bunlari ona göre mi kontrol edecegiz Mehmet * **valid-after-upload**: validity period of document for contract validation after upload. Values can be *days ex:5d, months ex:5m, and years ex:2y. Operator can alter this datre manually. * **offical-expiry**: Offical document expiry date comes from tag data. Operator can alter this date manually. * Direct input sample "1997-07-16T19:20+01:00" * **max-size-kilobytes**: Allowed maximum size(kilobyte) per document. This limit controlled while uploding document in client side and also server side. * **transform-to**: If some formats have to converted to another format before storing, target format has to suplied. * **optimize**: If the file is to be optimized before it is saved, it is set to true. * **tags**: dokumanı alabilcegime dair sorulari cevaplayan service entegrasyonu (örneğin müşteri 70 yaş üstüyse ekstra belge alımı için) * **allowed-clients**: hangi clientlar bu dokumanı yükleyebilir. * **sca-required**: 2 factor banka herhangi bir talimatı 2 birleşenli alabilir. * **allowed-formats**:izin verilen format ve max sizeleri * **metadata**: birden fazla kural field i istenebilir. * **operation**: operasyon kontrollerinin tanımlandıgı alan 2. Şeması olan dijital olarak onaylanan dokuman tipi ```json= { "name": "gdpr-consent", "title": { "tr-TR": "KVKK Bilgilendirme Onayi", "en-EN": "GDPR Approval" }, "tags": [ { "tag": "gdpr", "id": "reference" } ], "online-sign": { "version": 2.2, "sca-required": false, "template": { "tr-TR": "consent-gdpr-2.2-tr-html", "en-EN": "consent-gdpr-2.2-en-html" }, "allowed-clients": [ "ib", "mobile-ib", "idm-account" ] }, "status": "active", "base-status": "active" } ``` bir yerde tutulcakmı online sing base64 olarak neyi onayladıgını kacırmamız gerekiyor consent-gdpr-2.2-tr-html ezebilirler çünkü 3. Şeması olan ve aynı zamanda ıslak imzalı upload edilebilir dokuman tanımı ```json= { "name": "address-statement", "title": { "tr-TR": "Adres Beyanı", "en-EN": "Address Statement" }, "tags": [ { "tag": "address-statement-tag", "id": "reference" } ], "upload": { "sca-required": false, "allowed-clients": [ "web-ib", "mobile-ib", "dealer", "direct-sales" ], "allowed-formats": [ { "format": "png", "max-size-kilobytes": 512 }, { "format": "jpg", "max-size-kilobytes": 1024 } ] }, "render": { "version": 6.2, "template": { "tr-TR": "address-statement-6.2-tr-html", "en-EN": "address-statement-6.2-en-html" }, "allowed-clients": [ "ib", "mobile-ib", "idm-account" ] }, "optimize": [ { "transform-to": "jpg", "size": true } ], "status": "active" } ``` ## Document Group ```json= { "name": "address-confirmation-group", "status": "active", "title": { "tr-TR": "Adres Teyit Grubu", "en-EN": "Address Confirmation Group" }, "document": [ "gas-bill", "water-bill", "electricity-bill", "residence-certificate", "property-deeds" ] } ``` * **at-least-required-document**: At least document count to validate to document group reqirement. ## Contract Definition ```json= { "name": "ekyc-customer-application", "status": "active", "tags": [ { "tag": "ekyc-application", "id": "reference" } ], "documents": [ { "name": "gdpr-consent", "use-existing": "any-valid | uploaded-by-contract | never", "required": true }, { "name": "channel-usage-consent", "use-existing": "any-valid", "min-version": 2.2, "required": true }, { "name": "salary-certificate", "use-existing": "never", "required": false } ], "document-group": [ { "name": "address-confirmation-group", "at-least-required-document": 2, "required": true }, { "name": "identification-certificate-group", "at-least-required-document": 1, "required": true } ], "validations": [ { "type": "all-valid" }, { "type": "decision-table", "decision-table": "dmn-ekyc-document-validation" } ] } ``` * **validations** The contract can different include multiple validation methods. All validation methods return validation status and a multilingual message set. * **all-valid** just checks all reqired document is uploaded. * ~~script is expression (C# ? Javscript ? FEEL ?) based valdiation~~ * **decision-table** is DMN table. ## Callback Definition Workflow un her step ınde call back tanımlanabılır. ```json= [ { "name": "ekyc-callback", "url": "https://api.burgan.com.tr/ekyc/..../document-tracking", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" }, { "name": "loan-callback", "url": "https://api.burgan.com.tr/retail-loan/..../document-tracking", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" } ] ``` -------------- # Endpoint: `/admin/contract-category/getCategories` --- **Amaç:** Bu endpoint, mevcut kontrat kategorilerini listelemek veya belirli bir kategori koduna göre filtrelemek için kullanılır. --- ### GET İstek Parametreleri: 1. **Sorgu Parametreleri (Query Parameters):** - **code (Opsiyonel):** - **Tip:** string - **Açıklama:** Filtreleme amacıyla kullanılacak kategori kodu. Belirtilmediğinde tüm kategoriler listelenir. 2. **Başlık Parametreleri (Header Parameters):** - **Business_line (Opsiyonel):** - **Tip:** string - **Açıklama:** ON(X) veya Burgan(B) ayrımını belirtir. - **Accept-Language (Opsiyonel):** - **Tip:** string - **Açıklama:** İstemcinin dil kodunu belirtir. `tr-TR` veya `en-EN`. --- ### GET Yanıt (Response): 1. **Başarılı Yanıt:** - **HTTP Durum Kodu:** 200 OK - **İçerik Tipi:** application/json - **İçerik:** ```json { "success": true, "data": [ { "id": "string", "code": "string", "title": "string", "contracts": { "string": "string" } } ], "errorMessage": null } ``` - **Açıklama:** - **success:** İşlemin başarılı olup olmadığını belirtir (`true`/`false`). - **data:** Kategori bilgilerini içeren bir dizi. - **id:** Kategorinin benzersiz kimliği. - **code:** Kategorinin kodu. - **title:** Kategorinin başlığı. - **contracts:** İlgili kontratları ve onların başlıklarını içeren bir sözlük (dictionary). - **errorMessage:** Hata mesajı (varsa). --- ### Yeni Eklenen URL'ler: - **Test Ortamı:** - `https://test-pubagw6.burgan.com.tr/ebanking/contract/contract-category/get-categories` - **Preprod Ortamı:** - `https://preprod-pubagw6.burgan.com.tr/ebanking/contract/contract-category/get-categories` --- **Not:** Apisix'den gelmeyecek internal kullanıcılar için farklı bir Apisix URL tanımı yapılmıştır. Bu URL'lerde `Customer_No` zorunlu olarak gönderilmelidir. Dışarıya açık Apisix'de ise token ile dolu gelecektir. --- ### Örnek Kullanımlar: 1. **Tüm Kategorileri Listeleme:** - **İstek:** ```bash curl -X 'GET' \ 'https://test-amorphie-contract.burgan.com.tr/admin/contract-category/getCategories' \ -H 'accept: */*' \ -H 'Accept-Language: tr-TR' ``` - **Yanıt:** ```bash {"success": true,"data": [ { "id": "22aab476-8e1e-42ff-af0c-0a19bd7a0aca", "code": "cat-test-workflow-2", "title": "Test Category Workflow 2", "contracts": { "con-fonlu-mevduat-erken-kapama": "FONLU MEVDUAT ERKEN KAPAMA TALEP FORMU", "con-banka-karti-sozlesmesi": "Banka Kartı Sözleşmesi" } }, { "id": "25124aac-2a21-3425-abcc-dee34fad2132", "code": "cat-code-1", "title": "Kategori TR Başlık", "contracts": {} }, { "id": "3b435913-5fb2-44ff-92d4-18d2290cacc3", "code": "cat-test-wwo", "title": "Test Category wwo", "contracts": { "con-yatirim-hisse-senedi": "Hisse Senedi", "con-kkm-erken-kapama-en": "Undefined_Lang_Key" } }, { "id": "5d84f995-5830-423e-a0e5-9380411fec7c", "code": "cat-yatirim-urunleri", "title": "Yatırım Ürünleri", "contracts": { "con-yatirim-hisse-senedi": "Hisse Senedi", "con-yatirim-viop": "Viop", "con-fon-islemleri-hesap-acilisi": "Fon İslemleri Hesap Acilisi", "con-kıymetli-maden-hesap-acilisi": "Kıymetli Maden Hesap Açılışı", "con-burgan-on-robo sozlesmesi": "Burgan/On Robo Sözleşmesi" } }, { "id": "926f7886-5be1-4f07-9b54-6f5f81e816c5", "code": "cat-risk", "title": "Risk", "contracts": { "con-banka-karti-sozlesmesi": "Banka Kartı Sözleşmesi" } }, { "id": "ad32b476-8e1e-42ff-af0c-0a19bd7a0697", "code": "cat-test", "title": "Test Category", "contracts": {} }, { "id": "b118b476-8e1e-42fb-af0c-0a19bd7a1697", "code": "cat-okan-1", "title": "TR CAT OKAN 1", "contracts": {} }, { "id": "b118b476-8e1e-42ff-af0c-0a19bd7a1697", "code": "cat-test", "title": "Test Category", "contracts": { "logindocs": "Cont 24 TR" } }, { "id": "cc21b476-8e1e-42ff-af0c-0a19bd7a0aca", "code": "cat-test-workflow", "title": "Test Category Workflow", "contracts": {} }, { "id": "d46a1777-d1e9-43d3-bb17-5838bc5b5efe", "code": "cat-yatirim", "title": "Yatırım", "contracts": { "con-banka-karti-sozlesmesi": "Banka Kartı Sözleşmesi" } }],"errorMessage": null} ``` 1. **Tüm Kategorileri Listeleme:** - **İstek:** ```bash curl -X 'GET' \ 'https://test-amorphie-contract.burgan.com.tr/admin/contract-category/getCategories?code=cat-yatirim-urunleri' \ -H 'accept: */*' \ -H 'Accept-Language: tr-TR' ``` - **Yanıt:** ```bash "success": true,"data": [ { "id": "5d84f995-5830-423e-a0e5-9380411fec7c", "code": "cat-yatirim-urunleri", "title": "Yatırım Ürünleri", "contracts": { "con-yatirim-viop": "Viop", "con-yatirim-hisse-senedi": "Hisse Senedi", "con-fon-islemleri-hesap-acilisi": "Fon İslemleri Hesap Acilisi", "con-kıymetli-maden-hesap-acilisi": "Kıymetli Maden Hesap Açılışı", "con-burgan-on-robo sozlesmesi": "Burgan/On Robo Sözleşmesi" } } ``` # Kontrat Kategorileri ve Doküman Sorgulama Teknik Analizi ## 1. Kategori Listeleme ve Kontratları Dropdown Listesine Doldurma ### Dropdown Liste Oluşturma: Bu endpointin yanıtı, frontend'de dropdown listesine doldurulabilir. Her kategoriye ait kontratlar dropdown listesinde seçilebilir. ### Dropdown Yapısı: #### Kategoriler: Dropdown Listesi 1 ![image](https://hackmd.io/_uploads/SyLwRHBdR.png) #### Kontratlar: Dropdown Listesi 2 (Seçilen kategoriye göre dinamik olarak güncellenir) code= cat-yatirim-urunleri ``` { "success": true, "data": [ { "id": "5d84f995-5830-423e-a0e5-9380411fec7c", "code": "cat-yatirim-urunleri", "title": "Yatırım Ürünleri", "contracts": { "con-yatirim-viop": "Viop", "con-yatirim-hisse-senedi": "Hisse Senedi", "con-fon-islemleri-hesap-acilisi": "Fon İslemleri Hesap Acilisi", "con-kıymetli-maden-hesap-acilisi": "Kıymetli Maden Hesap Açılışı", "con-burgan-on-robo sozlesmesi": "Burgan/On Robo Sözleşmesi" } } ], "errorMessage": null } ``` ![image](https://hackmd.io/_uploads/BJZKRHr_C.png) ## Onay Bekleyen ve Onaylanan Dokumanlar için ### ContractFlow ```bash curl --location 'https://dev-amorphie-workflow.burgan.com.tr/workflow/instance/27c7f5e6-5d62-4f88-93a3-64aa17f89702/transition/contract-start-StartContract' \ --header 'User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Behalf-Of-User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --data '{ "ContractCode": "con-yatirim-viop" }' ``` hub dan additionalData içerisinde renderId bilgisi gelir > TemplateRenderApi [#GetTemplateRenderApi](###GetTemplateRenderApi) Template Render Akışdan gelen bilgiler dogrultusunda çalıştırılır. > DocumentInstanceApi [#DocumentInstanceApi](###DocumentInstanceApi) Template Render'dan gelen ve akışdan gelen bilgilerle doldurulur > RenderApproved [#RenderApproved](###RenderApproved) ### GetTemplateRenderApi ```bash curl --location 'https://dev-amorphie-contract.burgan.com.tr/template-render/instance/pdf/RenderId' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ #Response : { "success": true, "data": "string.base64", "errorMessage": null } ``` * RenderId : flow veya apilerden gelen renderId bilgisi ile dokumanın base64 hali alınır ### DocumentInstanceApi imzalanacak dokumanlari flow üzerinden taşımamak için ayrı bir request atılır. ```bash curl --location 'https://dev-amorphie-contract.burgan.com.tr/document/Instance' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --header 'Cookie: 79aa751ea7c0210235c7d1ba7d63a7c2=0f13095bbcb69f04f3bec89444c8ea8b' \ --data '{ "documentContent": { "contentType": "application/pdf", "fileContext": "TemplatePdfApi.Response.data.content", "fileName": "test2.pdf" }, "contractCode": "con-yatirim-viop", "contractInstanceId": "27c7f5e6-5d62-4f88-93a3-64aa17f89702", "renderId": "TemplatePdfApi.data.render-id", "documentCode": "ContractInstanceApi.Response.data.documentList[x].code", "documentVersion": ContractInstanceApi.Response.data.documentList[x].lastVersion, "instanceMetadata": [ ], "notes": [ ] }' Response: { "success": true, "data": { "documentInstanceId": "9affea78-2ee4-485b-aee9-15b671f9c824" }, "errorMessage": null } ``` #### RenderApproved ```bash curl --location 'https://dev-amorphie-workflow.burgan.com.tr/workflow/instance/ec8fcf32-fcdf-45c1-b02c-c57f7307fe6d/transition/document-onlinesign-approved' \ --header 'User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Behalf-Of-User: 650c0ab5-7e1d-4d06-a7ce-f75e6857da68' \ --header 'Accept-Language: tr-TR' \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'User_reference: 101010' \ --header 'business_line: X' \ --header 'Customer_no: 100100' \ --data '{ "contractCode":"con-yatirim-viop" "contractIstanceId":"27c7f5e6-5d62-4f88-93a3-64aa17f89702" "documentInstanceIds": [ "DocumentInstanceApi.data.documentInstanceId" ] }' ``` ### Hub longpooling Test Analiz ```bash curl --location 'https://dev-amorphie-workflow-hub.burgan.com.tr/longpooling/contract-check-document-flow?instanceId=42572384-318c-4323-9f83-88845f339de2' \ --header 'accept: */*' \ --header 'X-Device-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'X-Token-Id: 651c0ab5-7e1d-4d06-a7ce-f75e6857da69' \ --header 'Accept-Language: tr-TR' \ --header 'Cookie: 02b44bcb56ffcf6e1c72a1877c18bdcb=48e5a09d8d9f66fdc47d1459b593eec6' ``` Test Analiz Onaylanacak listesini dönüyor ```bash { "mfatype": "public", "time": "2024-07-23T11:23:32.49798Z", "datacontenttype": "application/json", "specversion": "v1.0", "deviceId": "651c0ab5-7e1d-4d06-a7ce-f75e6857da69", "base-state": "Completed", "id": "42572384-318c-4323-9f83-88845f339de2", "source": "workflow", "type": "workflow", "subject": "worker-completed", "data": { "userId": "650c0ab5-7e1d-4d06-a7ce-f75e6857da68", "recordId": "42572384-318c-4323-9f83-88845f339de2", "eventInfo": "worker-completed", "instanceId": "42572384-318c-4323-9f83-88845f339de2", "entityName": "render-online-sign-flow", "data": { "DocumentInstanceIds": [ "cbe0f0f7-4b4f-4540-9aa3-76409b8acf2f" ] }, "time": "2024-07-23T11:23:32.4832597Z", "state": "control-document-onlinesign", "transition": "document-onlinesign-approved", "baseStatus": 2, "page": { "operation": "Open", "type": "push-replacement", "pageRoute": { "language": "en-EN", "label": "Approve_Documents_Page" }, "timeout": 0 }, "message": "", "errorCode": "", "additionalData": { "backTransitionId": "contract-start-back", "contractData": { "contractWithoutHeader": null, "approvedDocuments": [ { "approvalDate": "2024-07-23T11:13:48.07904", "code": "doc-on-internet-subesi-bilgilendirme-metni", "minioUrl": "https://test-pubagw6.burgan.com.tr/ebanking/contract/document/download?ObjectId=8e3d4ef8-1ab6-4e4c-94f3-4ce8bff2b86e", "name": "On İnternet Şubesi Bilgilendirme Metni", "version": "1.0.0" }, "documentsForApproval": [ { "approved": false, "contractCode": "con-account-listing-open-banking", "contractInstanceId": "42572384-318c-4323-9f83-88845f339de2", "documentDefinitionCode": "doc-account-listing-aydinlatma-metni", "documentSemanticVersion": "1.0.0", "identity": "101010", "isRequired": true, "name": "cont-account-listing-aydınlatma-metni", "processName": "ZeebeRenderOnlineSign", "renderData": "{\"customer\":{\"customerIdentity\":\"101010\"}, \"customerIdentity\":101010}", "renderDataForLog": "{\"customer\":{\"customerIdentity\":\"101010\"}, \"customerIdentity\":101010}", "renderId": "bf17f4c3-047d-4d61-a55f-7f5e1b1519dc", "semanticVersion": "1.0.0", "title": "Aydınlatma Metni" } ] } }, "workflowName": "render-online-sign-flow", "viewSource": "page", "requireData": false, "buttonType": "Forward" }, "routeChange": true } ``` ------------- # Instance (Application) ## Lifecycles (Status) ### Document #### (Upload) Document ```mermaid stateDiagram-v2 ns: not-started up: uploaded wc: waiting-control ac: auto-control v: validated nv: not-validated ns --> up : upload-document up --> wc : auto up --> ac : auto ac --> v : valid wc --> v : valid ac --> nv : not-valid wc --> nv : not-valid nv --> v : valid ``` #### (Render & Wet-Sign & Upload) Document ```mermaid stateDiagram-v2 ns: not-started r: rendered up: uploaded wc: waiting-control ac: auto-control v: validated nv: not-validated ns --> r : render r --> up : upload-document up --> wc : auto up --> ac : auto ac --> v : valid wc --> v : valid ac --> nv : not-valid wc --> nv : not-valid nv --> v : valid ns --> v : validated-with-existing ``` #### (Render & Online-Sign) Document ```mermaid stateDiagram-v2 ns: not-started r: rendered v: validated nv: not-validated ns --> r : render r --> v : valid r --> nv : not-valid ``` ### Document Group ```mermaid stateDiagram-v2 ns: not-started ip: in-progress v: validated nv: not-validated ns --> ip : start ip --> v : valid ip --> nv : not-valid ``` ### Contract ```mermaid stateDiagram-v2 ns: not-started ip: in-progress v: validated nv: not-validated ns --> ip : start ip --> v : valid ip --> nv : not-valid ``` ## Start Instance POST https://api.burgan.com.tr/amorphie.contract/contract/ Header **Accept-Language** has to set ### Request ```json= { "id": "439b2e3a-4e40-4d44-a933-4eb1ef3bd887", "contract-name": "ekyc-customer-application", "reference": "38552069000", "owner": "38552069008", "callback-name": "web-ui-ekyc-callback" "process": { "client": "ekyc-application", "user": "34455667789", "behalf-of-user": "34455667789", "name": "ekyc-process", "id": "f220740a-5466-4bbd-8b82-3eaa97c2c15f", "state": "load-document", "action": "web-ui-document-load", } } ``` * **reference** müşteri no olabilir, login name(u05762) olabilir. * **owner** required sadece tckn/vkn alabilir. * **user** işlemi yapan kişi * **behalf-of-user** vekalet eden kişi ### Generic Response for Contract Status ```json= { "id": "88acf003-94f6-497e-90dc-bdd90c45fd12", "status": "in-progress", "document": [ { "name": "identification-certificate-nc", "title": "Nufus Cüzdanı", "status": "validated", "required": "true", "upload": { "sca-required": false, "allowed-clients": [ "web-ib", "mobile-ib", "dealer", "direct-sales" ], "allowed-formats": [ { "format": "png", "max-size-kilobytes": 512 }, { "format": "pdf", "max-size-kilobytes": 1024 } ] } }, { "name": "gdpr-cosent", "title": "KVKK Bilgilendirme Onayi", "status": "not-started", "required": "true", "render": true, "online-sign": { "version": 2.2, "sca-required": false, "alloved-clients": [ [ "ib", "mobile-ib", "idm-account" ] ] } }, { "name": "address-statement", "title": "Adres Beyanı", "status": "not-started", "required": "true", "render": true, "upload": { "sca-required": false, "allowed-clients": [ "web-ib", "mobile-ib", "dealer", "direct-sales" ], "allowed-formats": [ { "format": "png", "max-size-kilobytes": 512 }, { "format": "pdf", "max-size-kilobytes": 1024 } ] } } ], "document-groups": [ { "name": "address-confirmation-group", "status": "in-progress", "title": "Adres Teyit Grup Belgeleri", "at-least-required-document": 1, "document": [ { "name": "water-bill", "title": "Su faturasi", "status": "waiting-control", "upload": { "sca-required": false, "allowed-clients": [ "web-ib", "mobile-ib", "dealer", "direct-sales" ], "allowed-formats": [ { "format": "png", "max-size-kilobytes": 512 }, { "format": "pdf", "max-size-kilobytes": 1024 } ] } }, { "name": "gass-bill", "title": "Dogalgaz Faturasi", "status": "not-started", "upload": { "sca-required": false, "allowed-clients": [ "web-ib", "mobile-ib", "dealer", "direct-sales" ], "allowed-formats": [ { "format": "png", "max-size-kilobytes": 512 }, { "format": "pdf", "max-size-kilobytes": 1024 } ] } } ] } ] } ``` ## Render Document POST https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name}/render POST https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name}/render/pdf POST https://api.burgan.com.tr/amorphie.contract/document/{name}/owner/{owner}/render POST https://api.burgan.com.tr/amorphie.contract/document/{name}/owner/{owner}/render/pdf ### Request All requests must include json data body for support templating while render. ```json= { "data": { "customer": { "firstName": "Ahmet", "lastName": "Halil" } } } ``` ### Response Client display or prints rendered document. ```json= { "content": "base64;pdf 0xsdad" } ``` ## Upload Document POST https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name} POST https://api.burgan.com.tr/amorphie.contract/document/{name}/owner/{owner} ### Request Content-Type: application/pdf Content-Transfer-Encoding: base64 > https://www.w3.org/Graphics/JPEG/ ### Response ```json= { "status": "uploaded" } ``` ### Additional Properties of Document PATCH https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name} PATCH https://api.burgan.com.tr/amorphie.contract/document/{name}/owner/{owner} ```json= { "data": { "customer": { "notes": "sgk belgesi eklenmelir." } } } ``` ## Get Instance GET https://api.burgan.com.tr/amorphie.contract/contract/{id} [Response ](/Instance (Application)) ## Query Instance GET https://api.burgan.com.tr/amorphie.contract/contract/ Query Params * contract-name * owner * process... * page-size & page ## Get Document GET https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name} GET https://api.burgan.com.tr/amorphie.contract/document/{name}/owner/{owner} GET https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name}/schema GET https://api.burgan.com.tr/amorphie.contract/document/{name}/owner/{owner}/schema ## Callback When state of any document is changed, callback url is consumed with below body. ```json= { "name": "ekyc-customer-application", "status": "in-progress", "id": "1180d691-f53d-48fa-a960-aea265267d1d", "document": [ { "name": "identification-certificate-nc", "status": "waiting-control" }, { "name": "gdpr-consent", "status": "valid" } ], "document-groups": [ { "name": "address-confirmation-group", "status": "in-progress", "document": [ { "name": "water-bill", "status": "waiting-control" }, { "name": "gas-bill", "status": "not-started" } ] } ] } ``` # Instance (Manuel Ops) ## Approve/Reject Document POST https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents/{name}/transition/{transition-name} POST https://api.burgan.com.tr/amorphie.contract/documents/{id}/transition/{transition-name} ## Request More Document POST https://api.burgan.com.tr/amorphie.contract/contract/{id}/documents { document tipi } # Rule Management Module Biz ve iş birimimiz için kullanabileceğimiz bir kural (rule) modülü geliştirilecektir. Uygulama (APP) içerisinde, yapılacak tüm işlemlerin tanımları tutulacak ve bir belgenin dönüştürüleceği bilgisi, küçültme işleminin gerekip gerekmediği ve ne kadar küçültülebileceği gibi bilgiler müşterilerden hangi formatlarda alınabilir ve hangi formatta saklanmalıdır sorularına yanıt sağlayacaktır. Uygulama (APP) dışında, versiyon, son kullanma tarihi (expritedate), geliş kanalı, doküman tipi gibi alanlara bakarak, sonuç tag servisiyle iletişim kurup mob onayının gerekip gerekmediğini, gerekiyorsa hangi rule koduyla mob'a sorulacağını belirleyebileceğimiz bir tasarım kurgulayacağız. Admin tarafından oluşturulan kural tanımına (rule definition) göre doküman alanlarını da belirleyeceğiz. Her doküman için kendine özgü bir kural tanımı yapılabilir, bu nedenle her doküman için farklı bir alan seti beklenmesi mümkündür. Örneğin, aynı doküman grubunda yer alan bir doküman için kural seti 3 farklı alandan oluşabilirken, aynı gruptaki başka bir doküman için farklı bir alan seti bekleniyor olabilir. Bu nedenle, her doküman için özel bir kural tanımı yapılacaktır. olası kullanılacak teknolojiler esicion-table zeebe-comand-dmn c# roslyn– zeebe feel expression # Format Converter Module Gönderilen dokumanı istenilen formata ceviren modul geliştirilecek. Rule manager kullnaılarak hangi dokuman hangi formata çevrile biliniyor sorgulanır. örnek pdf > jpg docx> jpg xlsx> jpg # # Document Percentage Module Dosya boyutlarini gerekliligi kadar küçültecek modul geliştirilecek. burada rule manager kullanılarak gerekli boyutları sorgulanır kucultülme izni ve tanımı varise kucultulur 5000px*5000px > 2000px * 2000px # Dosya Gerekli Kısım Belirleme 40 sayfalık bir pdf içinde bizim için gerekli olan sayfa belirlenip saklanacak. sorular: Bu kısımda şimdilik mob a yaptırabilirsin ekran tasarlanmalı aslı saklanmalı mı?(sorgula) Burada saklama 2 yöne ayrılabilir birinci aslı saklanır 2.seçili olanda saklanır bizim için birinci tc altında dosyada tutulur 2 dosya documant defination karsılığı olur birinci bişi ifade etmiyor hale gelir. 40 sayfa > 1 sayfa # Callback Module clientlar kendi api leri için tanımladıklari url ve securty bilgileri ile callback çalıştırmamızı saglıyacak modul. bir callback seneryosu için 3 istektede buluna bilir. default atmasını bekledigimiz requestler bizim tarafımızdan tanımlı olacak fakat istenirse callback requesti clientlar tarafında callback defination ile override(json model) edile bilir olacak. workflow içerisinden dogrudan bir callback atmayıp kendi callback apimizi cagıracagız api arkatarafta bu istegi ilk aldıgında defination a bakarak bir q kaydı olusturacak bu kayıtlari eriten bir worker yazılacak client isterse son bir aylık veya instance bazlı callback leri tekrar calistirabilecegi bir istekte buluna bilir. # 23-24 Mayıs notlar 1)Dokumanın silinmesi opsıyonunu istiyorlar. Bunu senle konuşmuştuk silinmemeli goruşunu iletmiştin soledik. Uğur Bey yorum: dokuman elbete silinmemeli. Bu ihtgiyac aslinda alrtapi eksiliginde. ORnegin burgan trade kullanimi icin sozlesme imaziliyor musteri, sonra erisimin kapatilmasini istediginde sozlesme silerek yapabiliyorlar. O kisim belge tarafindan transactional olarak feature kapatmasi olmali. Butunsel de tum surec ornekleri ile degerlenmdiririz. Belki onayladigi belgeyi gecersiz kilacak baska bir belge onaylamali, talimat iptali gibi. 2)Dokumanı html/pdf template den etme kısmını kım yapcak sorusu ondada var. Dha ihale kımde bilmiyoruz dedık ama otomatık olmalı görüşü var. Uğur Bey yorum: Birden fazla dokuman olup paralel gidecegi icin konu evet otomatik olmali ama render icin gereken veri setlerinin tedarigi konusunda konu netlesmeli. Bu noktada TAG yapisi yardima kosabilir. verilerio TAG den cekip render edilebilir. 3-IB ve mobılde dokumanlar gösterilmesin mi parametresi olmalı. Bu kritik. Uğur Bey yorum: dokuman tipi icin bir property gibi anliyorum. Amorpie client ile eslebilir dokuman tipi 4-Mail gönderimi? Müşteri dokumları maille istediğinde göndermeliyiz. Uğur Bey yorum: Bu konu derin bir konu. Email validasyonu yapilmilmissa gonderilmeli. Gonderim gatewayden yapilir, oradan da kontrol edilir email dogrulama. Ama hangi dokumanin gonderilecegini, documan set instance icindeki dokumanlari gondermek icin servis tetikleme isi sureclerde olmali. Paylasma destegi verelim, paylasma kurali tuketen uzman sistemlerde olsun müşterinin onaylamış olduğu formları bir tamplate ile mail gönderme

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully