curl --request PATCH \
--url https://api.noyax.com/api/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"CustomerCode": "0000382026",
"Name": "Örnek Ticaret A.Ş.",
"TaxNumber": "1234567890",
"TaxOffice": "Kadıköy",
"InvoiceTitle": "Örnek Ticaret Anonim Şirketi",
"Note": "Deliveries on weekdays only.",
"DueDays": 30,
"DiscountRate": 5,
"Blacklisted": false,
"MovementType": 2,
"RiskLimit": 250000,
"RiskControl": 1,
"RiskAction": 1,
"EInvoiceUser": true,
"EInvoiceScenario": 1,
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"SharingCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShowNoteOnQuote": false,
"ShowNoteOnOrder": false,
"ShowNoteOnWaybill": true,
"ShowNoteOnInvoice": false,
"IdentitySchemes": [
{
"SchemeID": "MERSISNO",
"Value": "0123456789000015"
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/customers/{customerId}");
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>");
request.AddJsonBody("{\n \"CustomerCode\": \"0000382026\",\n \"Name\": \"Örnek Ticaret A.Ş.\",\n \"TaxNumber\": \"1234567890\",\n \"TaxOffice\": \"Kadıköy\",\n \"InvoiceTitle\": \"Örnek Ticaret Anonim Şirketi\",\n \"Note\": \"Deliveries on weekdays only.\",\n \"DueDays\": 30,\n \"DiscountRate\": 5,\n \"Blacklisted\": false,\n \"MovementType\": 2,\n \"RiskLimit\": 250000,\n \"RiskControl\": 1,\n \"RiskAction\": 1,\n \"EInvoiceUser\": true,\n \"EInvoiceScenario\": 1,\n \"ShipmentDefinitionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"SharingCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ShowNoteOnQuote\": false,\n \"ShowNoteOnOrder\": false,\n \"ShowNoteOnWaybill\": true,\n \"ShowNoteOnInvoice\": false,\n \"IdentitySchemes\": [\n {\n \"SchemeID\": \"MERSISNO\",\n \"Value\": \"0123456789000015\"\n }\n ]\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'PATCH',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
CustomerCode: '0000382026',
Name: 'Örnek Ticaret A.Ş.',
TaxNumber: '1234567890',
TaxOffice: 'Kadıköy',
InvoiceTitle: 'Örnek Ticaret Anonim Şirketi',
Note: 'Deliveries on weekdays only.',
DueDays: 30,
DiscountRate: 5,
Blacklisted: false,
MovementType: 2,
RiskLimit: 250000,
RiskControl: 1,
RiskAction: 1,
EInvoiceUser: true,
EInvoiceScenario: 1,
ShipmentDefinitionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
SharingCodeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ShowNoteOnQuote: false,
ShowNoteOnOrder: false,
ShowNoteOnWaybill: true,
ShowNoteOnInvoice: false,
IdentitySchemes: [{SchemeID: 'MERSISNO', Value: '0123456789000015'}]
})
};
fetch('https://api.noyax.com/api/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/customers/{customerId}"
payload = {
"CustomerCode": "0000382026",
"Name": "Örnek Ticaret A.Ş.",
"TaxNumber": "1234567890",
"TaxOffice": "Kadıköy",
"InvoiceTitle": "Örnek Ticaret Anonim Şirketi",
"Note": "Deliveries on weekdays only.",
"DueDays": 30,
"DiscountRate": 5,
"Blacklisted": False,
"MovementType": 2,
"RiskLimit": 250000,
"RiskControl": 1,
"RiskAction": 1,
"EInvoiceUser": True,
"EInvoiceScenario": 1,
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"SharingCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShowNoteOnQuote": False,
"ShowNoteOnOrder": False,
"ShowNoteOnWaybill": True,
"ShowNoteOnInvoice": False,
"IdentitySchemes": [
{
"SchemeID": "MERSISNO",
"Value": "0123456789000015"
}
]
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerCode": "0000382026",
"Name": "Örnek Ticaret A.Ş.",
"TaxNumber": "1234567890",
"TaxOffice": "Kadıköy",
"InvoiceTitle": "Örnek Ticaret Anonim Şirketi",
"Note": "Deliveries on weekdays only.",
"DueDays": 30,
"DiscountRate": 5,
"Blacklisted": false,
"MovementType": 2,
"RiskLimit": 250000,
"RiskControl": 1,
"RiskAction": 1,
"EInvoiceUser": true,
"EInvoiceScenario": 1,
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"SharingCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShowNoteOnQuote": false,
"ShowNoteOnOrder": false,
"ShowNoteOnWaybill": true,
"ShowNoteOnInvoice": false,
"IdentitySchemes": [
{
"SchemeID": "MERSISNO",
"Value": "0123456789000015"
}
],
"CreateDate": "2023-11-07T05:31:56Z",
"ModifyDate": "2023-11-07T05:31:56Z"
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "1002",
"Message": "CustomerCode '0000382026' is already used in this company.",
"Errors": [
{
"Code": "1002",
"Message": "CustomerCode '0000382026' is already used in this company."
}
]
}{
"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": "1000",
"Message": "Customer not found.",
"Errors": [
{
"Code": "1000",
"Message": "Customer not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Cari kısmi güncelle
Cari kaydının yalnızca gönderilen alanlarını değiştirir.
curl --request PATCH \
--url https://api.noyax.com/api/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"CustomerCode": "0000382026",
"Name": "Örnek Ticaret A.Ş.",
"TaxNumber": "1234567890",
"TaxOffice": "Kadıköy",
"InvoiceTitle": "Örnek Ticaret Anonim Şirketi",
"Note": "Deliveries on weekdays only.",
"DueDays": 30,
"DiscountRate": 5,
"Blacklisted": false,
"MovementType": 2,
"RiskLimit": 250000,
"RiskControl": 1,
"RiskAction": 1,
"EInvoiceUser": true,
"EInvoiceScenario": 1,
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"SharingCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShowNoteOnQuote": false,
"ShowNoteOnOrder": false,
"ShowNoteOnWaybill": true,
"ShowNoteOnInvoice": false,
"IdentitySchemes": [
{
"SchemeID": "MERSISNO",
"Value": "0123456789000015"
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/customers/{customerId}");
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>");
request.AddJsonBody("{\n \"CustomerCode\": \"0000382026\",\n \"Name\": \"Örnek Ticaret A.Ş.\",\n \"TaxNumber\": \"1234567890\",\n \"TaxOffice\": \"Kadıköy\",\n \"InvoiceTitle\": \"Örnek Ticaret Anonim Şirketi\",\n \"Note\": \"Deliveries on weekdays only.\",\n \"DueDays\": 30,\n \"DiscountRate\": 5,\n \"Blacklisted\": false,\n \"MovementType\": 2,\n \"RiskLimit\": 250000,\n \"RiskControl\": 1,\n \"RiskAction\": 1,\n \"EInvoiceUser\": true,\n \"EInvoiceScenario\": 1,\n \"ShipmentDefinitionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"SharingCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ShowNoteOnQuote\": false,\n \"ShowNoteOnOrder\": false,\n \"ShowNoteOnWaybill\": true,\n \"ShowNoteOnInvoice\": false,\n \"IdentitySchemes\": [\n {\n \"SchemeID\": \"MERSISNO\",\n \"Value\": \"0123456789000015\"\n }\n ]\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'PATCH',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
CustomerCode: '0000382026',
Name: 'Örnek Ticaret A.Ş.',
TaxNumber: '1234567890',
TaxOffice: 'Kadıköy',
InvoiceTitle: 'Örnek Ticaret Anonim Şirketi',
Note: 'Deliveries on weekdays only.',
DueDays: 30,
DiscountRate: 5,
Blacklisted: false,
MovementType: 2,
RiskLimit: 250000,
RiskControl: 1,
RiskAction: 1,
EInvoiceUser: true,
EInvoiceScenario: 1,
ShipmentDefinitionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
SharingCodeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ShowNoteOnQuote: false,
ShowNoteOnOrder: false,
ShowNoteOnWaybill: true,
ShowNoteOnInvoice: false,
IdentitySchemes: [{SchemeID: 'MERSISNO', Value: '0123456789000015'}]
})
};
fetch('https://api.noyax.com/api/v1/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/customers/{customerId}"
payload = {
"CustomerCode": "0000382026",
"Name": "Örnek Ticaret A.Ş.",
"TaxNumber": "1234567890",
"TaxOffice": "Kadıköy",
"InvoiceTitle": "Örnek Ticaret Anonim Şirketi",
"Note": "Deliveries on weekdays only.",
"DueDays": 30,
"DiscountRate": 5,
"Blacklisted": False,
"MovementType": 2,
"RiskLimit": 250000,
"RiskControl": 1,
"RiskAction": 1,
"EInvoiceUser": True,
"EInvoiceScenario": 1,
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"SharingCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShowNoteOnQuote": False,
"ShowNoteOnOrder": False,
"ShowNoteOnWaybill": True,
"ShowNoteOnInvoice": False,
"IdentitySchemes": [
{
"SchemeID": "MERSISNO",
"Value": "0123456789000015"
}
]
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerCode": "0000382026",
"Name": "Örnek Ticaret A.Ş.",
"TaxNumber": "1234567890",
"TaxOffice": "Kadıköy",
"InvoiceTitle": "Örnek Ticaret Anonim Şirketi",
"Note": "Deliveries on weekdays only.",
"DueDays": 30,
"DiscountRate": 5,
"Blacklisted": false,
"MovementType": 2,
"RiskLimit": 250000,
"RiskControl": 1,
"RiskAction": 1,
"EInvoiceUser": true,
"EInvoiceScenario": 1,
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"SharingCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShowNoteOnQuote": false,
"ShowNoteOnOrder": false,
"ShowNoteOnWaybill": true,
"ShowNoteOnInvoice": false,
"IdentitySchemes": [
{
"SchemeID": "MERSISNO",
"Value": "0123456789000015"
}
],
"CreateDate": "2023-11-07T05:31:56Z",
"ModifyDate": "2023-11-07T05:31:56Z"
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "1002",
"Message": "CustomerCode '0000382026' is already used in this company.",
"Errors": [
{
"Code": "1002",
"Message": "CustomerCode '0000382026' is already used in this company."
}
]
}{
"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": "1000",
"Message": "Customer not found.",
"Errors": [
{
"Code": "1000",
"Message": "Customer not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}- Gönderilmeyen alan değişmez,
nullgönderilen alan temizlenir. - Doğrulama birleştirilmiş kaydın tamamı üzerinde çalışır; zorunlu bir alanı
nullyaparsanız istek reddedilir. - Alt kayıtlar (adres, telefon, banka hesabı, …) bu endpoint’ten değişmez; kendi endpoint’lerini kullanın.
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.
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.
x >= 1Muhasebe döneminin ID'si. Cari endpoint'lerinde isteğe bağlıdır; gönderilirse oluşturulan kayıtlara yazılır.
x >= 1Yol Parametreleri
Cari ID'si.
Gövde
Zorunlu. Şirket içinde benzersizdir. Oluştururken "Next" gönderirseniz kod, şirketin cari numarası serisinden üretilir.
"0000382026"
Zorunlu. Cari adı.
"Örnek Ticaret A.Ş."
Zorunlu. Yalnızca rakam: 10 haneli vergi kimlik numarası (VKN) ya da 11 haneli T.C. kimlik numarası (TCKN).
"1234567890"
Vergi dairesi adı.
"Kadıköy"
Faturalarda kullanılan ünvan. Boş bırakılırsa Name alanı kullanılır.
"Örnek Ticaret Anonim Şirketi"
Serbest metin not. ShowNoteOn* alanlarından biri true ise zorunludur.
"Deliveries on weekdays only."
Gün olarak vade. 0'dan küçük olamaz.
30
Varsayılan iskonto oranı (%), 0 ile 100 arasında.
5
Cariyi kara listeye alır.
false
1: Satıcı, 2: Alıcı, 3: Satıcı ve alıcı. 0 gönderilirse 1 olarak kaydedilir.
2
Risk limiti tutarı. 0'dan küçük olamaz. 0, risk limiti yok demektir.
250000
Risk limitinin nasıl kontrol edileceği. 1: Mevcut bakiye, 2: Satış tutarı. RiskLimit 0'dan büyükse 1 ya da 2 olmalıdır.
1
Risk limiti aşıldığında ne olacağı. 0: Devam et, 1: Kullanıcıyı uyar, 2: İşlemi durdur.
1
Carinin e-fatura mükellefi olup olmadığı.
true
E-fatura senaryosu. EInvoiceUser true ise 1-9, değilse 0 olmalıdır. 1: Ticari, 2: Temel, 3: İhracat, 4: Kamu, 5: HKS, 6: Enerji, 7: İlaç/Tıbbi cihaz, 8: Yatırım teşvik, 9: IDIS.
1
GET /api/v1/definitions/shipment-definitions ile dönen bir sevkiyat tanımının ID'si.
Cariyi kimlerin görebileceğini sınırlayan paylaşım kodu. Boş bırakılırsa herkes görür; doldurulursa kullanıcının paylaşım kodlarından biri olmalıdır.
Notu tekliflerde göster.
false
Notu siparişlerde göster.
false
Notu irsaliyelerde göster.
true
Notu faturalarda göster.
false
Ek kimlik numaraları (ör. MERSISNO). Her SchemeID yalnızca bir kez gönderilebilir.
Show child attributes
Show child attributes
Yanıt
OK
İşlemin başarılı olup olmadığı.
true
Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors içinde listelenir.
"0000"
Show child attributes
Show child attributes
Success false olduğunda hata mesajı. Bütün hataların mesajları tek metinde birleştirilir.