Document Upload
Belge yükleme işlemleri için kullanılan endpoint'ler.
Belge Yükle
Sisteme yeni bir belge yükler.
Authentication
x-auth (tenant-id)
HTTP Request
POST /document/upload-document
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
base64Data | string | true | - | Base64 formatında dosya içeriği |
fileName | string | true | - | Dosya adı |
description | string | true | - | Belge açıklaması |
fileNameJson | object | false | - | Çoklu dil desteği için JSON formatında dosya adı |
descriptionJson | object | false | - | Çoklu dil desteği için JSON formatında açıklama |
Request Body Example
{
"base64Data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...",
"fileName": "kimlik_belgesi.png",
"description": "Kimlik belgesi ön yüz"
}
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
data | object | true | Belge metadata bilgileri |
Response Body Example
{
"userId": "123",
"identityNo": "12345678901",
"name": "kimlik_belgesi.png",
"mimeType": "image/png",
"type": 1,
"description": "Kimlik belgesi ön yüz",
"status": "active",
"reason": "waitingApproval",
"filePath": "documents/123e4567/kimlik_belgesi.png"
}
Kullanıcı Belgelerini Getir
Kullanıcıya ait belgeleri listeler.
Authentication
x-auth (tenant-id)
HTTP Request
GET /user/get-documents
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
userId | string | false | - | Kullanıcı ID (filtreleme) |
type | string | false | - | Belge tipi |
status | string | false | - | Belge durumu |
reason | string | false | - | Belge sebebi |
Response Parameters
| Field | Type | Nullable | Desc |
|---|---|---|---|
id | string | false | Belge ID |
userId | string | false | Kullanıcı ID |
name | string | false | Dosya adı |
mimeType | string | false | Dosya MIME tipi |
type | number | false | Belge tipi kodu |
description | string | true | Belge açıklaması |
status | string | false | Belge durumu |
reason | string | true | Durum sebebi |
filePath | string | false | Dosya yolu |
createdAt | date | false | Oluşturulma tarihi |
Admin - Belge Kaydet
Admin tarafından kullanıcıya belge kaydeder.
Authentication
x-auth (tenant-id)
HTTP Request
POST /admin/save-document
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
userId | string | true | - | Belge sahibi kullanıcı ID |
base64String | string | true | - | Base64 formatında dosya içeriği |
documentName | string | true | - | Belge adı |
type | string | true | - | Belge tipi |
description | string | false | - | Belge açıklaması |
descriptionJson | object | false | - | Çoklu dil açıklaması |
nameJson | object | false | - | Çoklu dil belge adı |
Request Body Example
{
"userId": "123",
"base64String": "data:application/pdf;base64,JVBERi0xLjQK...",
"documentName": "sozlesme.pdf",
"type": "contract",
"description": "Kullanıcı sözleşmesi"
}
Kullanıcı Belgesi Güncelle
Mevcut bir belgeyi günceller.
Authentication
x-auth (tenant-id)
HTTP Request
POST /user/update-document
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
id | string | true | - | Belge ID |
userId | string | true | - | Kullanıcı ID |
description | string | false | - | Yeni açıklama |
descriptionJson | object | false | - | Çoklu dil açıklaması |
status | string | false | - | Yeni belge durumu |
reason | string | false | - | Durum değişiklik sebebi |
Admin - Belge Dosyasını Getir
Belge dosyasının içeriğini getirir.
Authentication
x-auth (tenant-id)
HTTP Request
GET /admin/get-document-file
Request Parameters
| Field | Type | Required | Default | Desc |
|---|---|---|---|---|
documentInfo | object | true | - | Belge bilgisi |
Response Parameters
Belge dosyası binary formatında döner.