Alış faturasını sil
curl --request DELETE \
--url https://api.noyax.com/api/v1/purchase-invoices/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/purchase-invoices/{invoiceId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'DELETE',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/purchase-invoices/{invoiceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/purchase-invoices/{invoiceId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "3012",
"Message": "The invoice cannot be deleted because it is used by other records.",
"Errors": [
{
"Code": "3012",
"Message": "The invoice cannot be deleted because it is used by other records."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "3000",
"Message": "Invoice not found.",
"Errors": [
{
"Code": "3000",
"Message": "Invoice not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Alış Faturaları
Alış faturasını sil
Faturayı, satırlarını ve satırların stok hareketlerini siler.
DELETE
/
api
/
v1
/
purchase-invoices
/
{invoiceId}
Alış faturasını sil
curl --request DELETE \
--url https://api.noyax.com/api/v1/purchase-invoices/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/purchase-invoices/{invoiceId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'DELETE',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/purchase-invoices/{invoiceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/purchase-invoices/{invoiceId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "3012",
"Message": "The invoice cannot be deleted because it is used by other records.",
"Errors": [
{
"Code": "3012",
"Message": "The invoice cannot be deleted because it is used by other records."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "3000",
"Message": "Invoice not found.",
"Errors": [
{
"Code": "3000",
"Message": "Invoice not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Faturayı, satırlarını ve satırların stok hareketlerini siler. Bir çıkış işleminde zaten kullanılmış bir Lot, ya da çıkışı yapılmış bir seri no, ait olduğu satırın silinmesini engeller. Cari hareket kaydı bir ödemeyle zaten kapatılmış bir fatura silinemez (
3015), başka kayıtlarca referans verilen bir fatura da silinemez (3012). GİB’e gönderilmiş bir fatura silinemez (3027).
Hata kodları
Bu endpoint’in dönebileceği kodlar. Her endpoint için geçerli olan genel hatalar (kimlik doğrulama, yetki, istek header’ları, istek limitleri) burada tekrarlanmaz.| Kod | HTTP | Anlamı |
|---|---|---|
3000 | 404 | Fatura bulunamadı |
3012 | 400 | Fatura başka kayıtlarca referans verildiği için silinemez |
3027 | 400 | Fatura GİB’e gönderildiği için silinemez |
3304 | 400 | Lot bir çıkış işleminde zaten kullanıldığı için işlem (silme/güncelleme) iptal edildi |
3404 | 400 | Seri no zaten sevk edildiği için kaldırılamaz |
4401 | 400 | İşlem, ürünün o depodaki stoğunu minimum stokun altına düşürür (kritik stok “işlemi durdur” olarak ayarlı) |
4402 | 400 | İşlem, ürünün o depodaki stoğunu negatife düşürür (kritik stok “işlemi durdur” olarak ayarlı) |
4403 | 400 | İşlem, ürünün o depodaki stoğunu maksimum stokun üzerine çıkarır (kritik stok “işlemi durdur” olarak ayarlı) |
Yetkilendirmeler
Başlıklar
Yanıt
No Content