Ürünü sil
curl --request DELETE \
--url https://api.noyax.com/api/v1/products/{productId} \
--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/products/{productId}");
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/products/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/products/{productId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "2012",
"Message": "The product cannot be deleted because it is used in invoices, orders, quotes, stock or production records.",
"Errors": [
{
"Code": "2012",
"Message": "The product cannot be deleted because it is used in invoices, orders, quotes, stock or production 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": "2000",
"Message": "Product not found.",
"Errors": [
{
"Code": "2000",
"Message": "Product not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Ürünler
Ürün sil
Ürün kaydını siler.
DELETE
/
api
/
v1
/
products
/
{productId}
Ürünü sil
curl --request DELETE \
--url https://api.noyax.com/api/v1/products/{productId} \
--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/products/{productId}");
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/products/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/products/{productId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "2012",
"Message": "The product cannot be deleted because it is used in invoices, orders, quotes, stock or production records.",
"Errors": [
{
"Code": "2012",
"Message": "The product cannot be deleted because it is used in invoices, orders, quotes, stock or production 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": "2000",
"Message": "Product not found.",
"Errors": [
{
"Code": "2000",
"Message": "Product not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Ürün; faturada, siparişte, teklifte, depo fişinde, sayımda, satın alma kaydında, serviste, üretimde ya da muhasebe bağlantısında kullanılıyorsa silinemez (
2012).Ürünün kendi alt kayıtları (fiyat ve indirim satırları, ürün parametreleri, depo parametreleri, e-ticaret bilgileri, cari-ürün eşleştirmeleri, kabul kriterleri) silmeyi engellemez; bu kayıtlar olduğu gibi kalır.Yetkilendirmeler
Access token obtained from the Noyax auth service with your API key.
Başlıklar
İsteğin adına yapıldığı Noyax kullanıcısının ID'si. Oluşturulan, güncellenen ve silinen kayıtların denetim alanlarına yazılır.
Gerekli aralık:
x >= 1Şirketin ID'si. Kullanıcı bu şirkete tanımlı olmalıdır. Bütün okuma ve yazma işlemleri bu şirketle sınırlıdır.
Gerekli aralık:
x >= 1Muhasebe döneminin ID'si. Cari endpoint'lerinde isteğe bağlıdır; gönderilirse oluşturulan kayıtlara yazılır.
Gerekli aralık:
x >= 1Yol Parametreleri
Ürün ID'si.
Yanıt
No Content