curl --request POST \
--url https://api.noyax.com/api/v1/despatches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"DespatchType": -2,
"DespatchNumber": "IRS2026000125",
"Date": "2026-09-21T10:30:00",
"CustomerCode": "C-0001",
"Lines": [
{
"UnitCode": "C62",
"CurrencyCode": "TRY",
"WarehouseName": "Main Warehouse",
"ProductCode": "URN-0001",
"ECommerceProductCode": null,
"Quantity": 10,
"UnitPrice": 100,
"GrossAmount": 1000,
"ExchangeRate": 1,
"DiscountRate": 10,
"DiscountAmount": 100,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": false,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"Description": "<string>",
"Description2": "<string>",
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"Lots": [
{
"LotNo": "LOT-2026-015",
"Quantity": 10,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
]
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/despatches");
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 \"DespatchType\": -2,\n \"DespatchNumber\": \"IRS2026000125\",\n \"Date\": \"2026-09-21T10:30:00\",\n \"CustomerCode\": \"C-0001\",\n \"Lines\": [\n {\n \"UnitCode\": \"C62\",\n \"CurrencyCode\": \"TRY\",\n \"WarehouseName\": \"Main Warehouse\",\n \"ProductCode\": \"URN-0001\",\n \"ECommerceProductCode\": null,\n \"Quantity\": 10,\n \"UnitPrice\": 100,\n \"GrossAmount\": 1000,\n \"ExchangeRate\": 1,\n \"DiscountRate\": 10,\n \"DiscountAmount\": 100,\n \"Discounts\": [\n {\n \"Rate\": 10\n }\n ],\n \"VatRate\": 20,\n \"VatIncluded\": false,\n \"VatAmount\": 225,\n \"AmountExcludingTax\": 900,\n \"AmountIncludingTax\": 1350,\n \"VatBase\": 1125,\n \"VatExemptionCode\": \"<string>\",\n \"LineGroupName\": \"<string>\",\n \"Description\": \"<string>\",\n \"Description2\": \"<string>\",\n \"AdditionalTaxes\": [\n {\n \"Code\": \"0071\",\n \"Rate\": 25,\n \"Amount\": 225,\n \"Base\": 900\n }\n ],\n \"WithholdingCode\": \"<string>\",\n \"WithholdingNumerator\": 123,\n \"WithholdingDenominator\": 123,\n \"WithheldVatAmount\": 123,\n \"Lots\": [\n {\n \"LotNo\": \"LOT-2026-015\",\n \"Quantity\": 10,\n \"UnitCode\": \"C62\",\n \"SupplierLotNo\": \"<string>\",\n \"ExpiryDate\": \"2023-11-07T05:31:56Z\",\n \"Description\": \"<string>\"\n }\n ],\n \"SerialNumbers\": [\n \"<string>\"\n ]\n }\n ]\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({
DespatchType: -2,
DespatchNumber: 'IRS2026000125',
Date: '2026-09-21T10:30:00',
CustomerCode: 'C-0001',
Lines: [
{
UnitCode: 'C62',
CurrencyCode: 'TRY',
WarehouseName: 'Main Warehouse',
ProductCode: 'URN-0001',
ECommerceProductCode: null,
Quantity: 10,
UnitPrice: 100,
GrossAmount: 1000,
ExchangeRate: 1,
DiscountRate: 10,
DiscountAmount: 100,
Discounts: [{Rate: 10}],
VatRate: 20,
VatIncluded: false,
VatAmount: 225,
AmountExcludingTax: 900,
AmountIncludingTax: 1350,
VatBase: 1125,
VatExemptionCode: '<string>',
LineGroupName: '<string>',
Description: '<string>',
Description2: '<string>',
AdditionalTaxes: [{Code: '0071', Rate: 25, Amount: 225, Base: 900}],
WithholdingCode: '<string>',
WithholdingNumerator: 123,
WithholdingDenominator: 123,
WithheldVatAmount: 123,
Lots: [
{
LotNo: 'LOT-2026-015',
Quantity: 10,
UnitCode: 'C62',
SupplierLotNo: '<string>',
ExpiryDate: '2023-11-07T05:31:56Z',
Description: '<string>'
}
],
SerialNumbers: ['<string>']
}
]
})
};
fetch('https://api.noyax.com/api/v1/despatches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/despatches"
payload = {
"DespatchType": -2,
"DespatchNumber": "IRS2026000125",
"Date": "2026-09-21T10:30:00",
"CustomerCode": "C-0001",
"Lines": [
{
"UnitCode": "C62",
"CurrencyCode": "TRY",
"WarehouseName": "Main Warehouse",
"ProductCode": "URN-0001",
"ECommerceProductCode": None,
"Quantity": 10,
"UnitPrice": 100,
"GrossAmount": 1000,
"ExchangeRate": 1,
"DiscountRate": 10,
"DiscountAmount": 100,
"Discounts": [{ "Rate": 10 }],
"VatRate": 20,
"VatIncluded": False,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"Description": "<string>",
"Description2": "<string>",
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"Lots": [
{
"LotNo": "LOT-2026-015",
"Quantity": 10,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": ["<string>"]
}
]
}
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",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerName": "<string>",
"CurrencyCode": "TRY",
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "<string>",
"CustomerTitle": "<string>",
"TaxNumber": "<string>",
"TaxOffice": "<string>",
"DespatchType": -2,
"DespatchNumber": "IRS2026000125",
"DocumentNumber": "2026-15",
"Date": "2026-09-21T10:30:00",
"ActualDispatchDate": "2026-10-15",
"Description": "<string>",
"CustomerCode": "C-0001",
"DueDays": 30,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 100,
"SubTotal": 900,
"VatTotal": 225,
"AdditionalTaxTotal": 225,
"WithholdingTotal": 0,
"GrandTotal": 1350,
"AverageExchangeRate": 1,
"CreateDate": "2023-11-07T05:31:56Z",
"ModifyDate": "2023-11-07T05:31:56Z",
"Lines": [
{
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"LineGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductName": "<string>",
"UnitName": "ADET",
"MainUnitQuantity": 10,
"ProductCode": "URN-0001",
"ECommerceProductCode": null,
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"GrossAmount": 1000,
"CurrencyCode": "TRY",
"ExchangeRate": 1,
"DiscountRate": 10,
"DiscountAmount": 100,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": false,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"Lots": [
{
"LotNo": "LOT-2026-015",
"Quantity": 10,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
]
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "7012",
"Message": "At least one line is required.",
"Errors": [
{
"Code": "7012",
"Message": "At least one line 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 despatch
Creates the despatch and its lines in one transaction.
curl --request POST \
--url https://api.noyax.com/api/v1/despatches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"DespatchType": -2,
"DespatchNumber": "IRS2026000125",
"Date": "2026-09-21T10:30:00",
"CustomerCode": "C-0001",
"Lines": [
{
"UnitCode": "C62",
"CurrencyCode": "TRY",
"WarehouseName": "Main Warehouse",
"ProductCode": "URN-0001",
"ECommerceProductCode": null,
"Quantity": 10,
"UnitPrice": 100,
"GrossAmount": 1000,
"ExchangeRate": 1,
"DiscountRate": 10,
"DiscountAmount": 100,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": false,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"Description": "<string>",
"Description2": "<string>",
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"Lots": [
{
"LotNo": "LOT-2026-015",
"Quantity": 10,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
]
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/despatches");
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 \"DespatchType\": -2,\n \"DespatchNumber\": \"IRS2026000125\",\n \"Date\": \"2026-09-21T10:30:00\",\n \"CustomerCode\": \"C-0001\",\n \"Lines\": [\n {\n \"UnitCode\": \"C62\",\n \"CurrencyCode\": \"TRY\",\n \"WarehouseName\": \"Main Warehouse\",\n \"ProductCode\": \"URN-0001\",\n \"ECommerceProductCode\": null,\n \"Quantity\": 10,\n \"UnitPrice\": 100,\n \"GrossAmount\": 1000,\n \"ExchangeRate\": 1,\n \"DiscountRate\": 10,\n \"DiscountAmount\": 100,\n \"Discounts\": [\n {\n \"Rate\": 10\n }\n ],\n \"VatRate\": 20,\n \"VatIncluded\": false,\n \"VatAmount\": 225,\n \"AmountExcludingTax\": 900,\n \"AmountIncludingTax\": 1350,\n \"VatBase\": 1125,\n \"VatExemptionCode\": \"<string>\",\n \"LineGroupName\": \"<string>\",\n \"Description\": \"<string>\",\n \"Description2\": \"<string>\",\n \"AdditionalTaxes\": [\n {\n \"Code\": \"0071\",\n \"Rate\": 25,\n \"Amount\": 225,\n \"Base\": 900\n }\n ],\n \"WithholdingCode\": \"<string>\",\n \"WithholdingNumerator\": 123,\n \"WithholdingDenominator\": 123,\n \"WithheldVatAmount\": 123,\n \"Lots\": [\n {\n \"LotNo\": \"LOT-2026-015\",\n \"Quantity\": 10,\n \"UnitCode\": \"C62\",\n \"SupplierLotNo\": \"<string>\",\n \"ExpiryDate\": \"2023-11-07T05:31:56Z\",\n \"Description\": \"<string>\"\n }\n ],\n \"SerialNumbers\": [\n \"<string>\"\n ]\n }\n ]\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({
DespatchType: -2,
DespatchNumber: 'IRS2026000125',
Date: '2026-09-21T10:30:00',
CustomerCode: 'C-0001',
Lines: [
{
UnitCode: 'C62',
CurrencyCode: 'TRY',
WarehouseName: 'Main Warehouse',
ProductCode: 'URN-0001',
ECommerceProductCode: null,
Quantity: 10,
UnitPrice: 100,
GrossAmount: 1000,
ExchangeRate: 1,
DiscountRate: 10,
DiscountAmount: 100,
Discounts: [{Rate: 10}],
VatRate: 20,
VatIncluded: false,
VatAmount: 225,
AmountExcludingTax: 900,
AmountIncludingTax: 1350,
VatBase: 1125,
VatExemptionCode: '<string>',
LineGroupName: '<string>',
Description: '<string>',
Description2: '<string>',
AdditionalTaxes: [{Code: '0071', Rate: 25, Amount: 225, Base: 900}],
WithholdingCode: '<string>',
WithholdingNumerator: 123,
WithholdingDenominator: 123,
WithheldVatAmount: 123,
Lots: [
{
LotNo: 'LOT-2026-015',
Quantity: 10,
UnitCode: 'C62',
SupplierLotNo: '<string>',
ExpiryDate: '2023-11-07T05:31:56Z',
Description: '<string>'
}
],
SerialNumbers: ['<string>']
}
]
})
};
fetch('https://api.noyax.com/api/v1/despatches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/despatches"
payload = {
"DespatchType": -2,
"DespatchNumber": "IRS2026000125",
"Date": "2026-09-21T10:30:00",
"CustomerCode": "C-0001",
"Lines": [
{
"UnitCode": "C62",
"CurrencyCode": "TRY",
"WarehouseName": "Main Warehouse",
"ProductCode": "URN-0001",
"ECommerceProductCode": None,
"Quantity": 10,
"UnitPrice": 100,
"GrossAmount": 1000,
"ExchangeRate": 1,
"DiscountRate": 10,
"DiscountAmount": 100,
"Discounts": [{ "Rate": 10 }],
"VatRate": 20,
"VatIncluded": False,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"Description": "<string>",
"Description2": "<string>",
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"Lots": [
{
"LotNo": "LOT-2026-015",
"Quantity": 10,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": ["<string>"]
}
]
}
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",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerName": "<string>",
"CurrencyCode": "TRY",
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "<string>",
"CustomerTitle": "<string>",
"TaxNumber": "<string>",
"TaxOffice": "<string>",
"DespatchType": -2,
"DespatchNumber": "IRS2026000125",
"DocumentNumber": "2026-15",
"Date": "2026-09-21T10:30:00",
"ActualDispatchDate": "2026-10-15",
"Description": "<string>",
"CustomerCode": "C-0001",
"DueDays": 30,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 100,
"SubTotal": 900,
"VatTotal": 225,
"AdditionalTaxTotal": 225,
"WithholdingTotal": 0,
"GrandTotal": 1350,
"AverageExchangeRate": 1,
"CreateDate": "2023-11-07T05:31:56Z",
"ModifyDate": "2023-11-07T05:31:56Z",
"Lines": [
{
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"LineGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductName": "<string>",
"UnitName": "ADET",
"MainUnitQuantity": 10,
"ProductCode": "URN-0001",
"ECommerceProductCode": null,
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"GrossAmount": 1000,
"CurrencyCode": "TRY",
"ExchangeRate": 1,
"DiscountRate": 10,
"DiscountAmount": 100,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": false,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"Lots": [
{
"LotNo": "LOT-2026-015",
"Quantity": 10,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
]
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "7012",
"Message": "At least one line is required.",
"Errors": [
{
"Code": "7012",
"Message": "At least one line 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. Line errors start with the line number, for example Line 2: Quantity must be greater than 0.
Field rules
Calculations
7124); see calculations. The despatch totals and AverageExchangeRate are filled from the lines, the main unit quantity of each line is calculated by the API, and the sum of a line’s Lot/serial number entries must equal its Quantity. Send UnitPrice excluding VAT.- If you send
"Next"instead ofDespatchNumber, the number is generated automatically: the inbound (ALİRSNO) or outbound (SATİRSNO) series, or, for an outbound despatch when the company uses e-Despatch, the company’s e-Despatch numbering. - The customer’s address, title, tax number and tax office are copied from
CustomerCodeand are not accepted in the request. - A successful response is 201 Created; the
Locationheader points to the new despatch.
Minimal request
A request with only the required fields; the line amounts add up (the API checks them) and the header totals are filled from the lines. Replace the codes and names with those of your own company. For a Lot- or serial-tracked product the line must also carryLots or SerialNumbers.
{
"DespatchType": -2,
"DespatchNumber": "Next",
"Date": "2026-09-29T10:30:00",
"CustomerCode": "C-0001",
"Lines": [
{
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 2,
"UnitPrice": 100,
"CurrencyCode": "TRY",
"ExchangeRate": 1,
"VatRate": 20,
"AmountExcludingTax": 200,
"VatBase": 200,
"VatAmount": 40,
"AmountIncludingTax": 240,
"WarehouseName": "Merkez Depo"
}
]
}
Error codes
Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, request limits) are not repeated here.| Code | HTTP | Meaning |
|---|---|---|
0002 | 400 | Request body could not be read (malformed JSON, wrong field type), or it contains a field the endpoint does not have |
0003 | 400 | A field exceeds its maximum length (the message names the field and the limit) |
0580 | 400 | A value given as text (a code or a name) matches more than one record; add the detail that tells them apart (for example City for a district, Country for a city) |
4401 | 400 | The operation would drop the stock below the product’s minimum stock in that warehouse (critical stock set to stop the operation) |
4402 | 400 | The operation would make the product’s stock negative in that warehouse (critical stock set to stop the operation) |
4403 | 400 | The operation would raise the stock above the product’s maximum stock in that warehouse (critical stock set to stop the operation) |
7001 | 400 | DespatchNumber is required |
7002 | 400 | The despatch number is already used in the company for this despatch type; the response carries the existing record’s ID as ExistingId |
7004 | 400 | DespatchType must be 2 (inbound) or -2 (outbound) |
7005 | 400 | Date is required |
7006 | 400 | CustomerCode is required |
7007 | 400 | Customer not found or not visible to the user |
7010 | 400 | Currency not found in the company |
7011 | 400 | SharingCode is not one of the user’s sharing codes |
7012 | 400 | At least one line is required |
7013 | 400 | DueDays cannot be less than 0 |
7015 | 400 | ShipmentDefinitionCode was not found in the company |
7080 | 400 | The company has no number series for this despatch type (or no default e-Despatch numbering definition) |
7081 | 400 | The series has no parts |
7082 | 400 | The series has a part type the API cannot generate |
7083 | 400 | The generated number exceeds the series maximum length |
7084 | 400 | The generated number is already used in the company |
7085 | 400 | No unused number could be generated after several attempts |
7101 | 400 | ProductCode or ECommerceProductCode is required |
7102 | 400 | Product not found in the company |
7103 | 400 | UnitCode is required |
7104 | 400 | UnitCode is not one of the product’s own units (Unit1/Unit2/Unit3) |
7105 | 400 | Quantity must be greater than 0 |
7106 | 400 | UnitPrice cannot be negative |
7107 | 400 | DiscountRate must be between 0 and 100 |
7108 | 400 | Currency of the line not found in the company |
7109 | 400 | VatRate must be between 0 and 100 |
7110 | 400 | Line group not found in the company |
7111 | 400 | ExchangeRate must be 1 for the default currency, and greater than 0 for any other currency |
7112 | 400 | WarehouseName was not found in the company |
7113 | 400 | The product defines no conversion quantity for the line’s unit, so the main unit quantity cannot be calculated |
7114 | 400 | WarehouseName is required |
7116 | 400 | The sum of the Lot/serial number entries does not match the line’s Quantity |
7117 | 400 | Lots/SerialNumbers were not sent as required for the product’s stock type |
7118 | 400 | CurrencyCode is required on every line |
7119 | 400 | A line’s AdditionalTaxes can contain at most 3 additional taxes |
7120 | 400 | Code is required for every additional tax of a line |
7121 | 400 | DiscountRate does not match the cumulative rate of the line’s Discounts list |
7122 | 400 | An AdditionalTaxes Code of the line is not one of the valid additional tax codes |
7123 | 400 | The same additional tax code is used more than once on the line |
7124 | 400 | The line amounts do not add up (for example VatAmount is not VatBase × VatRate / 100); the message names the field and the expected value |
7201 | 400 | The Rate of a discount must be between 0 and 100 |
7301 | 400 | LotNo is required |
7302 | 400 | LotNo is already used in the company |
7303 | 400 | Lot not found |
7305 | 400 | Not enough Lot stock for this product and warehouse |
7401 | 400 | SerialNumbers contains an empty value |
7402 | 400 | The serial number has already been registered and has not been dispatched yet |
7403 | 400 | Serial number not found |
Authorizations
Headers
Body
Required. Despatch number, unique within the company for the same DespatchType. Send "Next" on create to generate it automatically: from the company's despatch number series for the type, or, for an outbound despatch when the company uses e-Despatch, from the e-Despatch numbering. At most 20 characters.
"IRS2026000125"
Required. Customer code (the customer's CustomerCode from GET /api/v1/customers). The despatch's address, title and tax fields are copied from the customer at the moment it is saved (the invoice address when the customer has one, otherwise the first address) and are not accepted in the request.
"C-0001"
Weighted average exchange rate: when every line has the same currency, Σ(AmountExcludingTax × ExchangeRate) / Σ AmountExcludingTax; when the lines have different currencies, 1, and the totals are converted to the default currency with each line's ExchangeRate. Filled from the lines; a value sent in the request is ignored.
1
Response
Created