Proforma Detay
İlgili şirkete ait proforma bilgileri.
Endpoint
POST /kolaybi/v1/proformas/{document_id}
Parametreler
Parametre | Tip | Açıklama |
---|---|---|
document_id | integer | Detayı alınmak isteden proformanın ID değeri |
Örnekler
- cURL
- JavaScript
- PHP
- Python
- C#
curl -X POST "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/proformas/18" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL"
async function getProformaDetail(documentId) {
const response = await fetch(
`https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/proformas/${documentId}`,
{
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
Channel: channel,
},
}
);
return await response.json();
}
// Kullanım
const proformaDetail = await getProformaDetail(18);
function getProformaDetail($documentId) {
$url = "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/proformas/{$documentId}";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $accessToken,
'Channel: ' . $channel
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// Kullanım
$proformaDetail = getProformaDetail(18);
import requests
def get_proforma_detail(document_id):
url = f'https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/proformas/{document_id}'
headers = {
'Authorization': f'Bearer {access_token}',
'Channel': channel
}
response = requests.post(url, headers=headers)
return response.json()
# Kullanım
proforma_detail = get_proforma_detail(18)
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json;
async Task<dynamic> GetProformaDetailAsync(int documentId)
{
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post,
$"https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/proformas/{documentId}");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
request.Headers.Add("Channel", channel);
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<dynamic>(content);
}
// Kullanım
var proformaDetail = await GetProformaDetailAsync(18);
Yanıt
{
"data": [
{
"document_id": 18,
"serial_no": "PRO001",
"issue_date": "2024-01-15",
"due_date": "2024-01-30",
"grand_total": 1000,
"grand_currency": "TRY",
"status": "active"
}
]
}
Yanıt Alanları
Alan | Tip | Açıklama |
---|---|---|
document_id | integer | Proforma ID değeri |
serial_no | string | Proforma seri numarası |
issue_date | string | Proforma tarihi |
due_date | string | Geçerlilik tarihi |
grand_total | number | Toplam tutar |
grand_currency | string | Para birimi |
status | string | Proforma durumu |