Valura API Documentation

ApiFunctionController

Controller: ApiFunctionController

Method: OpenSession

Description:

Oturumu yeniler ve kullanıcı yetkilendirmesini kontrol eder.

UserReportsController

Controller: UserReportsController

Method: GetUserReports

Description:

Belirtilen kullanıcı kimliğine (UserId) ait rapor dosyalarını (metin ve JSON formatında) getirir.

Request Examples:

Code:
İstek Parametreleri:
 **BodyRequest (UserReportRequest)**:
 
 {
     "UserId": "string (Zorunlu, Kullanıcıya özel kimlik, 'APIKey' ile türetilmiş bir kombinasyon olmalı. Örn: '12345_your_api_key')"
 }
 
 **HTTP Headers:**
 
 {
     "X-VlrApi-Key": "string (Zorunlu, API anahtarınız)"
 }

Response Examples:

Code:
API'nin başarılı veya hatalı durumlarda döndürdüğü sınıf yapısı: UserReportResponse.
 Başarılı Durum (HTTP 200 OK):
 
 {
     "ResponseType": "ReportResult",
     "ResponseTypeName": "ReportResult",
     "ResponseText": [],
     "Files": [
         {
             "FileName": "string (Dosyanın adı, örn: ValuraReport_User123.txt)",
             "Content": "string (Dosyanın içeriği)",
             "SizeInBytes": "long (Dosyanın bayt cinsinden boyutu)",
             "LastModified": "string (Dosyanın son değiştirilme tarihi ve saati UTC formatında, ISO 8601, örn: 2024-06-15T14:30:00Z)"
         }
     ],
     "ErrorResponse": {
         "ErrorCode": 0,
         "ErrorMessage": "null"
     }
 }
 
 Hata Durumu (HTTP 200 OK - Hata Kodu ile):
 
 {
     "ResponseType": "ApiError",
     "ResponseTypeName": "ApiError",
     "ResponseText": [],
     "Files": [],
     "ErrorResponse": {
         "ErrorCode": "long (Hata kodu, örn: 4002, 1000, 1001, 1002, 1003, 9999)",
         "ErrorMessage": "string (Hatanın açıklaması, örn: 'Geçersiz UserId')"
     }
 }
 
 Hata Kodları ve Anlamları:
 **4001**: Geçersiz API Anahtarı (şu anda devre dışı bırakılmış kod bloğuna ait).
 **4002**: Geçersiz UserId (API Anahtarı ile UserId eşleşmiyor).
 **1000**: UserId boş olamaz.
 **1001**: Belirtilen UserId için dosya bulunamadı veya dizin bulunamadı.
 **1002**: UserId ile eşleşen .txt veya .json dosyası bulunamadı.
 **1003**: Dosya okuma yetkiniz yok. Sunucu izinlerini kontrol edin.
 **9999**: Beklenmeyen bir hata oluştu.

Parameters:

  • BodyRequest (ValueCo.IntegrationModels.UserReportRequest) (Required)
  • API isteğinin gövdesinde gönderilen parametreler. { "UserId": "string" }