Dövizi sil
curl --request DELETE \
--url https://api.noyax.com/api/v1/definitions/currencies/{currencyId} \
--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/definitions/currencies/{currencyId}");
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/definitions/currencies/{currencyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/definitions/currencies/{currencyId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "0546",
"Message": "The currency cannot be deleted because it is used in customer or financial records.",
"Errors": [
{
"Code": "0546",
"Message": "The currency cannot be deleted because it is used in customer or financial 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": "0540",
"Message": "Currency not found.",
"Errors": [
{
"Code": "0540",
"Message": "Currency not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Dövizler
Döviz sil
Döviz kaydını siler.
DELETE
/
api
/
v1
/
definitions
/
currencies
/
{currencyId}
Dövizi sil
curl --request DELETE \
--url https://api.noyax.com/api/v1/definitions/currencies/{currencyId} \
--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/definitions/currencies/{currencyId}");
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/definitions/currencies/{currencyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/definitions/currencies/{currencyId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"Success": false,
"ResultCode": "0546",
"Message": "The currency cannot be deleted because it is used in customer or financial records.",
"Errors": [
{
"Code": "0546",
"Message": "The currency cannot be deleted because it is used in customer or financial 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": "0540",
"Message": "Currency not found.",
"Errors": [
{
"Code": "0540",
"Message": "Currency not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Döviz, muhasebe verisinin her yerinde kullanıldığı için silme kontrolü geniştir:
- Varsayılan döviz silinemez (
0545). Önce başka bir dövizi varsayılan yapın. - Döviz; faturada, siparişte, teklifte, depo fişinde, kasa fişinde, çek bordrosunda, fırsatta, finans bağlantısında, banka hesabında, bordroda, kur kaydında ya da cari banka hesabında kullanılıyorsa silinemez (
0546).
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
Döviz ID'si.
Yanıt
No Content