curl --request POST \
--url https://api.noyax.com/api/v1/customers \
--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"
}
],
"Addresses": [
{
"DistrictId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "Caferağa Mah. Moda Cad. No: 10",
"PostalCode": "34710",
"IsInvoiceAddress": true,
"CoordinateX": 40.9877,
"CoordinateY": 29.0254
}
],
"Telephones": [
{
"Number": "02165550000",
"NumberType": 1,
"Extension": "101",
"Description": "Accounting"
}
],
"Links": [
{
"Value": "[email protected]",
"LinkType": 1,
"Description": "Invoices"
}
],
"Representatives": [
{
"FullName": "Ayşe Yılmaz",
"Position": "Purchasing Manager",
"Gsm": "05325550000",
"Email": "[email protected]",
"Phone": "02165550000",
"Extension": "105",
"Link": "https://www.linkedin.com/in/example",
"Description": "<string>"
}
],
"BankAccounts": [
{
"BankName": "Example Bank",
"Branch": "Kadıköy",
"AccountNumber": "12345678",
"Iban": "TR330006100519786457841326",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"GroupMembers": [
{
"GroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Priority"
}
],
"QueryEInvoiceLabels": true
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/customers");
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 \"Addresses\": [\n {\n \"DistrictId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Address\": \"Caferağa Mah. Moda Cad. No: 10\",\n \"PostalCode\": \"34710\",\n \"IsInvoiceAddress\": true,\n \"CoordinateX\": 40.9877,\n \"CoordinateY\": 29.0254\n }\n ],\n \"Telephones\": [\n {\n \"Number\": \"02165550000\",\n \"NumberType\": 1,\n \"Extension\": \"101\",\n \"Description\": \"Accounting\"\n }\n ],\n \"Links\": [\n {\n \"Value\": \"[email protected]\",\n \"LinkType\": 1,\n \"Description\": \"Invoices\"\n }\n ],\n \"Representatives\": [\n {\n \"FullName\": \"Ayşe Yılmaz\",\n \"Position\": \"Purchasing Manager\",\n \"Gsm\": \"05325550000\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"02165550000\",\n \"Extension\": \"105\",\n \"Link\": \"https://www.linkedin.com/in/example\",\n \"Description\": \"<string>\"\n }\n ],\n \"BankAccounts\": [\n {\n \"BankName\": \"Example Bank\",\n \"Branch\": \"Kadıköy\",\n \"AccountNumber\": \"12345678\",\n \"Iban\": \"TR330006100519786457841326\",\n \"CurrencyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Description\": \"<string>\"\n }\n ],\n \"GroupMembers\": [\n {\n \"GroupDetailId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"Parameters\": [\n {\n \"ParameterDefinitionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Value\": \"Priority\"\n }\n ],\n \"QueryEInvoiceLabels\": true\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'POST',
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'}],
Addresses: [
{
DistrictId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Address: 'Caferağa Mah. Moda Cad. No: 10',
PostalCode: '34710',
IsInvoiceAddress: true,
CoordinateX: 40.9877,
CoordinateY: 29.0254
}
],
Telephones: [
{
Number: '02165550000',
NumberType: 1,
Extension: '101',
Description: 'Accounting'
}
],
Links: [{Value: '[email protected]', LinkType: 1, Description: 'Invoices'}],
Representatives: [
{
FullName: 'Ayşe Yılmaz',
Position: 'Purchasing Manager',
Gsm: '05325550000',
Email: '[email protected]',
Phone: '02165550000',
Extension: '105',
Link: 'https://www.linkedin.com/in/example',
Description: '<string>'
}
],
BankAccounts: [
{
BankName: 'Example Bank',
Branch: 'Kadıköy',
AccountNumber: '12345678',
Iban: 'TR330006100519786457841326',
CurrencyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Description: '<string>'
}
],
GroupMembers: [{GroupDetailId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
Parameters: [
{
ParameterDefinitionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Value: 'Priority'
}
],
QueryEInvoiceLabels: true
})
};
fetch('https://api.noyax.com/api/v1/customers', 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"
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"
}
],
"Addresses": [
{
"DistrictId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "Caferağa Mah. Moda Cad. No: 10",
"PostalCode": "34710",
"IsInvoiceAddress": True,
"CoordinateX": 40.9877,
"CoordinateY": 29.0254
}
],
"Telephones": [
{
"Number": "02165550000",
"NumberType": 1,
"Extension": "101",
"Description": "Accounting"
}
],
"Links": [
{
"Value": "[email protected]",
"LinkType": 1,
"Description": "Invoices"
}
],
"Representatives": [
{
"FullName": "Ayşe Yılmaz",
"Position": "Purchasing Manager",
"Gsm": "05325550000",
"Email": "[email protected]",
"Phone": "02165550000",
"Extension": "105",
"Link": "https://www.linkedin.com/in/example",
"Description": "<string>"
}
],
"BankAccounts": [
{
"BankName": "Example Bank",
"Branch": "Kadıköy",
"AccountNumber": "12345678",
"Iban": "TR330006100519786457841326",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"GroupMembers": [{ "GroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Priority"
}
],
"QueryEInvoiceLabels": True
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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",
"Addresses": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"DistrictId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"DistrictName": "Kadıköy",
"CityName": "İstanbul",
"CountryName": "Türkiye",
"Address": "Caferağa Mah. Moda Cad. No: 10",
"FullAddress": "<string>",
"PostalCode": "34710",
"IsInvoiceAddress": true,
"CoordinateX": 40.9877,
"CoordinateY": 29.0254
}
],
"Telephones": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Number": "02165550000",
"NumberType": 1,
"Extension": "101",
"Description": "Accounting"
}
],
"Links": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "[email protected]",
"LinkType": 1,
"Description": "Invoices"
}
],
"Representatives": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"FullName": "Ayşe Yılmaz",
"Position": "Purchasing Manager",
"Gsm": "05325550000",
"Email": "[email protected]",
"Phone": "02165550000",
"Extension": "105",
"Link": "https://www.linkedin.com/in/example",
"Description": "<string>"
}
],
"BankAccounts": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyName": "TL",
"BankName": "Example Bank",
"Branch": "Kadıköy",
"AccountNumber": "12345678",
"Iban": "TR330006100519786457841326",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"GroupMembers": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailName": "Marmara",
"GroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupName": "Region"
}
],
"Parameters": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterName": "Segment",
"ParameterType": 0,
"Value": "Priority"
}
],
"EInvoiceLabels": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Label": "urn:mail:[email protected]",
"Description": "ÖRNEK TİCARET A.Ş.",
"Type": 0,
"IsDefault": true
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "1004",
"Message": "Name is required.",
"Errors": [
{
"Code": "1004",
"Message": "Name is required."
}
]
}{
"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": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Create customer
Creates a customer and its sub-records in one transaction.
curl --request POST \
--url https://api.noyax.com/api/v1/customers \
--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"
}
],
"Addresses": [
{
"DistrictId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "Caferağa Mah. Moda Cad. No: 10",
"PostalCode": "34710",
"IsInvoiceAddress": true,
"CoordinateX": 40.9877,
"CoordinateY": 29.0254
}
],
"Telephones": [
{
"Number": "02165550000",
"NumberType": 1,
"Extension": "101",
"Description": "Accounting"
}
],
"Links": [
{
"Value": "[email protected]",
"LinkType": 1,
"Description": "Invoices"
}
],
"Representatives": [
{
"FullName": "Ayşe Yılmaz",
"Position": "Purchasing Manager",
"Gsm": "05325550000",
"Email": "[email protected]",
"Phone": "02165550000",
"Extension": "105",
"Link": "https://www.linkedin.com/in/example",
"Description": "<string>"
}
],
"BankAccounts": [
{
"BankName": "Example Bank",
"Branch": "Kadıköy",
"AccountNumber": "12345678",
"Iban": "TR330006100519786457841326",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"GroupMembers": [
{
"GroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Priority"
}
],
"QueryEInvoiceLabels": true
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/customers");
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 \"Addresses\": [\n {\n \"DistrictId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Address\": \"Caferağa Mah. Moda Cad. No: 10\",\n \"PostalCode\": \"34710\",\n \"IsInvoiceAddress\": true,\n \"CoordinateX\": 40.9877,\n \"CoordinateY\": 29.0254\n }\n ],\n \"Telephones\": [\n {\n \"Number\": \"02165550000\",\n \"NumberType\": 1,\n \"Extension\": \"101\",\n \"Description\": \"Accounting\"\n }\n ],\n \"Links\": [\n {\n \"Value\": \"[email protected]\",\n \"LinkType\": 1,\n \"Description\": \"Invoices\"\n }\n ],\n \"Representatives\": [\n {\n \"FullName\": \"Ayşe Yılmaz\",\n \"Position\": \"Purchasing Manager\",\n \"Gsm\": \"05325550000\",\n \"Email\": \"[email protected]\",\n \"Phone\": \"02165550000\",\n \"Extension\": \"105\",\n \"Link\": \"https://www.linkedin.com/in/example\",\n \"Description\": \"<string>\"\n }\n ],\n \"BankAccounts\": [\n {\n \"BankName\": \"Example Bank\",\n \"Branch\": \"Kadıköy\",\n \"AccountNumber\": \"12345678\",\n \"Iban\": \"TR330006100519786457841326\",\n \"CurrencyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Description\": \"<string>\"\n }\n ],\n \"GroupMembers\": [\n {\n \"GroupDetailId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"Parameters\": [\n {\n \"ParameterDefinitionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Value\": \"Priority\"\n }\n ],\n \"QueryEInvoiceLabels\": true\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'POST',
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'}],
Addresses: [
{
DistrictId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Address: 'Caferağa Mah. Moda Cad. No: 10',
PostalCode: '34710',
IsInvoiceAddress: true,
CoordinateX: 40.9877,
CoordinateY: 29.0254
}
],
Telephones: [
{
Number: '02165550000',
NumberType: 1,
Extension: '101',
Description: 'Accounting'
}
],
Links: [{Value: '[email protected]', LinkType: 1, Description: 'Invoices'}],
Representatives: [
{
FullName: 'Ayşe Yılmaz',
Position: 'Purchasing Manager',
Gsm: '05325550000',
Email: '[email protected]',
Phone: '02165550000',
Extension: '105',
Link: 'https://www.linkedin.com/in/example',
Description: '<string>'
}
],
BankAccounts: [
{
BankName: 'Example Bank',
Branch: 'Kadıköy',
AccountNumber: '12345678',
Iban: 'TR330006100519786457841326',
CurrencyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Description: '<string>'
}
],
GroupMembers: [{GroupDetailId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}],
Parameters: [
{
ParameterDefinitionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Value: 'Priority'
}
],
QueryEInvoiceLabels: true
})
};
fetch('https://api.noyax.com/api/v1/customers', 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"
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"
}
],
"Addresses": [
{
"DistrictId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "Caferağa Mah. Moda Cad. No: 10",
"PostalCode": "34710",
"IsInvoiceAddress": True,
"CoordinateX": 40.9877,
"CoordinateY": 29.0254
}
],
"Telephones": [
{
"Number": "02165550000",
"NumberType": 1,
"Extension": "101",
"Description": "Accounting"
}
],
"Links": [
{
"Value": "[email protected]",
"LinkType": 1,
"Description": "Invoices"
}
],
"Representatives": [
{
"FullName": "Ayşe Yılmaz",
"Position": "Purchasing Manager",
"Gsm": "05325550000",
"Email": "[email protected]",
"Phone": "02165550000",
"Extension": "105",
"Link": "https://www.linkedin.com/in/example",
"Description": "<string>"
}
],
"BankAccounts": [
{
"BankName": "Example Bank",
"Branch": "Kadıköy",
"AccountNumber": "12345678",
"Iban": "TR330006100519786457841326",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"GroupMembers": [{ "GroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }],
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Priority"
}
],
"QueryEInvoiceLabels": True
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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",
"Addresses": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"DistrictId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"DistrictName": "Kadıköy",
"CityName": "İstanbul",
"CountryName": "Türkiye",
"Address": "Caferağa Mah. Moda Cad. No: 10",
"FullAddress": "<string>",
"PostalCode": "34710",
"IsInvoiceAddress": true,
"CoordinateX": 40.9877,
"CoordinateY": 29.0254
}
],
"Telephones": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Number": "02165550000",
"NumberType": 1,
"Extension": "101",
"Description": "Accounting"
}
],
"Links": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "[email protected]",
"LinkType": 1,
"Description": "Invoices"
}
],
"Representatives": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"FullName": "Ayşe Yılmaz",
"Position": "Purchasing Manager",
"Gsm": "05325550000",
"Email": "[email protected]",
"Phone": "02165550000",
"Extension": "105",
"Link": "https://www.linkedin.com/in/example",
"Description": "<string>"
}
],
"BankAccounts": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyName": "TL",
"BankName": "Example Bank",
"Branch": "Kadıköy",
"AccountNumber": "12345678",
"Iban": "TR330006100519786457841326",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"GroupMembers": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailName": "Marmara",
"GroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupName": "Region"
}
],
"Parameters": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterName": "Segment",
"ParameterType": 0,
"Value": "Priority"
}
],
"EInvoiceLabels": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Label": "urn:mail:[email protected]",
"Description": "ÖRNEK TİCARET A.Ş.",
"Type": 0,
"IsDefault": true
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "1004",
"Message": "Name is required.",
"Errors": [
{
"Code": "1004",
"Message": "Name is required."
}
]
}{
"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": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Message.
Field rules
Sub-records
"Next" as CustomerCode to generate the code from the company’s customer number series. See Customer code generation.[]) for sub-record lists you do not need. A successful response returns 201 Created and the Location header points to the new customer.Authorizations
Access token obtained from the Noyax auth service with your API key.
Headers
ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.
x >= 1ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.
x >= 1ID of the accounting period. Optional for customer endpoints; if sent, it is written to created records.
x >= 1Body
Required. Unique within the company. Send "Next" on create to generate the code from the company's customer number series.
"0000382026"
Required. Customer name.
"Örnek Ticaret A.Ş."
Required. Digits only: 10 digits for a tax number (VKN) or 11 digits for a national ID number (TCKN).
"1234567890"
Tax office name.
"Kadıköy"
Title used on invoices. If empty, Name is used.
"Örnek Ticaret Anonim Şirketi"
Free text note. Required when any ShowNoteOn* field is true.
"Deliveries on weekdays only."
Payment term in days. Cannot be less than 0.
30
Default discount rate (%) between 0 and 100.
5
Marks the customer as blacklisted.
false
1: Supplier, 2: Buyer, 3: Supplier and buyer. 0 is saved as 1.
2
Risk limit amount. Cannot be less than 0. 0 means no risk limit.
250000
How the risk limit is checked. 1: Current balance, 2: Sales amount. Must be 1 or 2 when RiskLimit is greater than 0.
1
What happens when the risk limit is exceeded. 0: Continue, 1: Warn the user, 2: Stop the operation.
1
Whether the customer is a registered e-invoice user.
true
E-invoice scenario. Must be 1-9 when EInvoiceUser is true, 0 otherwise. 1: Commercial, 2: Basic, 3: Export, 4: Public, 5: HKS, 6: Energy, 7: Pharmaceutical/Medical device, 8: Investment incentive, 9: IDIS.
1
ID of a shipment definition from GET /api/v1/definitions/shipment-definitions.
Sharing code that limits who can see the customer. Empty means visible to everyone; otherwise it must be one of the user's sharing codes.
Show the note on quotes.
false
Show the note on orders.
false
Show the note on waybills.
true
Show the note on invoices.
false
Additional identifiers (e.g. MERSISNO). Each SchemeID can be sent only once.
Show child attributes
Show child attributes
Addresses. If more than one is sent, exactly one must be the invoice address. A single address is always the invoice address.
Show child attributes
Show child attributes
Telephone numbers.
Show child attributes
Show child attributes
E-mail addresses, websites and social media links.
Show child attributes
Show child attributes
Contact persons.
Show child attributes
Show child attributes
Bank accounts.
Show child attributes
Show child attributes
Group memberships. At least one detail must be sent from every mandatory group.
Show child attributes
Show child attributes
Custom parameter values.
Show child attributes
Show child attributes
If true, e-invoice labels are queried from the e-invoice integrator after the customer is saved. If the query fails, the customer is still created.
true
Response
Created
Whether the operation succeeded.
true
"0000" on success. On failure, the code of the first error; all errors are listed in Errors.
"0000"
Response data. Null when Success is false.
Show child attributes
Show child attributes
Error message when Success is false. Messages of all errors are joined into a single text.