Fatura Tahsilat Silme
ID si verilen Tahsilatı yapılmış faturanın tahsilatını silmek için kullanılır.
Endpoint
DELETE /kolaybi/v1/invoices/proceed/{document_id}
Parametreler
Parametre | Tip | Açıklama |
---|---|---|
document_id | integer | Oluşturulan faturanın ID değeri |
Örnekler
- cURL
- JavaScript
- PHP
- Python
- C#
curl -X DELETE "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/invoices/proceed/18" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL"
async function deleteInvoiceProceed(documentId) {
const response = await fetch(
`https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/invoices/proceed/${documentId}`,
{
method: "DELETE",
headers: {
Authorization: `Bearer ${accessToken}`,
Channel: channel,
},
}
);
return await response.json();
}
// Kullanım
const result = await deleteInvoiceProceed(18);
function deleteInvoiceProceed($documentId) {
$url = "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/invoices/proceed/{$documentId}";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $accessToken,
'Channel: ' . $channel
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// Kullanım
$result = deleteInvoiceProceed(18);
import requests
def delete_invoice_proceed(document_id):
url = f'https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/invoices/proceed/{document_id}'
headers = {
'Authorization': f'Bearer {access_token}',
'Channel': channel
}
response = requests.delete(url, headers=headers)
return response.json()
# Kullanım
result = delete_invoice_proceed(18)
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json;
async Task<dynamic> DeleteInvoiceProceedAsync(int documentId)
{
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete,
$"https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/invoices/proceed/{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 result = await DeleteInvoiceProceedAsync(18);
Yanıt
{
"success": true
}
Yanıt Alanları
Alan | Tip | Açıklama |
---|---|---|
success | boolean | İşlem başarı durumu |