curl --request POST \
--url https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"InvoiceNumber": "9446A4D834",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"CurrencyCode": "TRY",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 123,
"SubTotal": 123,
"VatTotal": 123,
"GrandTotal": 123,
"Consolidated": true,
"PrintDescription": true,
"Cancelled": true,
"AverageExchangeRate": 1,
"ApplyWithholding": true,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 123,
"AdditionalTaxTotal": 123,
"EInvoiceType": 1,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2023-11-07T05:31:56Z",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2023-11-07T05:31:56Z",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2023-11-07T05:31:56Z",
"EnergyPeriodStart": "2023-11-07T05:31:56Z",
"EnergyPeriodEnd": "2023-11-07T05:31:56Z",
"DeliveryInfo": [
{
"DeliveryTerm": "<string>",
"TransportModeCode": 123,
"Country": "<string>",
"CityName": "<string>",
"CitySubdivisionName": "<string>",
"StreetName": "<string>",
"BuildingName": "<string>",
"BuildingNumber": "<string>",
"PostalZone": "<string>",
"TransportMeans": "<string>",
"DeclaredForCarriageValueAmount": 123,
"DeliveryInsuranceValue": 123
}
],
"PaymentMeans": [
{
"PaymentMeansCode": "<string>",
"PayeeFinancialAccountID": "<string>",
"CurrencyCode": "<string>"
}
],
"ReferencedDespatches": [
{
"ID": "<string>",
"IssueDate": "2023-11-07T05:31:56Z"
}
],
"CustomerIdentitySchemes": [
{
"SchemeID": "<string>",
"Value": "<string>"
}
],
"PublicSectorSpendingUnit": {
"BCP_Name": "<string>",
"BCP_VKN": "<string>",
"BCP_Country": "<string>",
"BCP_CityName": "<string>",
"BCP_CitySubdivisionName": "<string>"
},
"SgkInfo": {
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"MukellefKodu": "<string>",
"MukellefAdi": "<string>",
"DosyaNo": "<string>",
"FaturaAltTipi": "<string>"
},
"Lines": [
{
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"DiscountRate": 123,
"DiscountAmount": 123,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": true,
"VatAmount": 123,
"AmountExcludingTax": 123,
"AmountIncludingTax": 123,
"VatBase": 123,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxAmount1": 123,
"AdditionalTaxBase1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxAmount2": 123,
"AdditionalTaxBase2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"AdditionalTaxAmount3": 123,
"AdditionalTaxBase3": 123,
"Lots": [
{
"LotNo": "<string>",
"Quantity": 123,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
],
"ExportInfo": {
"PackagingType": "<string>",
"DeliveryTerm": "<string>",
"TransportMode": 123,
"RequiredCustomsID": "<string>",
"DeliveryAddress_CityName": "<string>",
"DeliveryAddress_CitySubdivisionName": "<string>",
"DeliveryAddress_Country": "<string>",
"DeliveryAddress_StreetName": "<string>",
"DeliveryAddress_BuildingName": "<string>",
"DeliveryAddress_BuildingNumber": "<string>",
"DeliveryAddress_PostalCode": "<string>",
"TransportMeansID": "<string>",
"GrossWeightMeasure": 123,
"NetWeightMeasure": 123,
"PackageBrand": "<string>",
"PackageID": "<string>",
"PackageQuantity": 123
},
"MedicineDeviceInfo": {
"Ilaclar": [
{
"GTIN": "<string>",
"SN": "<string>",
"BN": "<string>",
"XD": "2023-11-07T05:31:56Z"
}
],
"TibbiCihazlar": [
{
"UNO": "<string>",
"LNO": "<string>",
"SNO": "<string>",
"URT": "2023-11-07T05:31:56Z"
}
]
},
"HalInfo": {
"KUNYENO": "<string>",
"MALSAHIBIVKNTCKN": "<string>",
"MALSAHIBIADSOYADUNVAN": "<string>"
},
"ProductInfo": {
"ModelName": "<string>",
"BrandName": "<string>",
"SellersItemIdentification": "<string>",
"BuyersItemIdentification": "<string>",
"ManufacturersItemIdentification": "<string>",
"OriginCountryCode": "<string>",
"OriginCountryName": "<string>",
"ProductTraceID": "<string>",
"CommodityClassification": "<string>"
}
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices");
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 \"InvoiceNumber\": \"9446A4D834\",\n \"DocumentNumber\": \"<string>\",\n \"Date\": \"2026-09-21T10:30:00\",\n \"Description\": \"<string>\",\n \"CustomerCode\": \"C-0001\",\n \"CurrencyCode\": \"TRY\",\n \"DueDays\": 123,\n \"SharingCode\": \"<string>\",\n \"ShipmentDefinitionCode\": \"<string>\",\n \"DiscountTotal\": 123,\n \"SubTotal\": 123,\n \"VatTotal\": 123,\n \"GrandTotal\": 123,\n \"Consolidated\": true,\n \"PrintDescription\": true,\n \"Cancelled\": true,\n \"AverageExchangeRate\": 1,\n \"ApplyWithholding\": true,\n \"WithholdingCode\": \"<string>\",\n \"WithholdingNumerator\": 123,\n \"WithholdingDenominator\": 123,\n \"WithholdingTotal\": 123,\n \"AdditionalTaxTotal\": 123,\n \"EInvoiceType\": 1,\n \"ProfileId\": \"<string>\",\n \"InvoiceTypeCode\": \"<string>\",\n \"WithholdingTaxRate\": 123,\n \"SocialSecurityRate\": 123,\n \"MarketRate\": 123,\n \"ReturnedInvoiceNumber\": \"<string>\",\n \"ReturnedInvoiceDate\": \"2023-11-07T05:31:56Z\",\n \"OrderReferenceNumber\": \"<string>\",\n \"OrderReferenceDate\": \"2023-11-07T05:31:56Z\",\n \"BranchNumber\": \"<string>\",\n \"BranchTitle\": \"<string>\",\n \"BranchAddress\": \"<string>\",\n \"InvestmentIncentiveDocumentNumber\": \"<string>\",\n \"InvestmentIncentiveDocumentDate\": \"2023-11-07T05:31:56Z\",\n \"EnergyPeriodStart\": \"2023-11-07T05:31:56Z\",\n \"EnergyPeriodEnd\": \"2023-11-07T05:31:56Z\",\n \"DeliveryInfo\": [\n {\n \"DeliveryTerm\": \"<string>\",\n \"TransportModeCode\": 123,\n \"Country\": \"<string>\",\n \"CityName\": \"<string>\",\n \"CitySubdivisionName\": \"<string>\",\n \"StreetName\": \"<string>\",\n \"BuildingName\": \"<string>\",\n \"BuildingNumber\": \"<string>\",\n \"PostalZone\": \"<string>\",\n \"TransportMeans\": \"<string>\",\n \"DeclaredForCarriageValueAmount\": 123,\n \"DeliveryInsuranceValue\": 123\n }\n ],\n \"PaymentMeans\": [\n {\n \"PaymentMeansCode\": \"<string>\",\n \"PayeeFinancialAccountID\": \"<string>\",\n \"CurrencyCode\": \"<string>\"\n }\n ],\n \"ReferencedDespatches\": [\n {\n \"ID\": \"<string>\",\n \"IssueDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"CustomerIdentitySchemes\": [\n {\n \"SchemeID\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ],\n \"PublicSectorSpendingUnit\": {\n \"BCP_Name\": \"<string>\",\n \"BCP_VKN\": \"<string>\",\n \"BCP_Country\": \"<string>\",\n \"BCP_CityName\": \"<string>\",\n \"BCP_CitySubdivisionName\": \"<string>\"\n },\n \"SgkInfo\": {\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"MukellefKodu\": \"<string>\",\n \"MukellefAdi\": \"<string>\",\n \"DosyaNo\": \"<string>\",\n \"FaturaAltTipi\": \"<string>\"\n },\n \"Lines\": [\n {\n \"ProductCode\": \"URN-0001\",\n \"UnitCode\": \"C62\",\n \"Quantity\": 10,\n \"UnitPrice\": 100,\n \"DiscountRate\": 123,\n \"DiscountAmount\": 123,\n \"Discounts\": [\n {\n \"Rate\": 10\n }\n ],\n \"VatRate\": 20,\n \"VatIncluded\": true,\n \"VatAmount\": 123,\n \"AmountExcludingTax\": 123,\n \"AmountIncludingTax\": 123,\n \"VatBase\": 123,\n \"VatExemptionCode\": \"<string>\",\n \"LineGroupName\": \"<string>\",\n \"WarehouseName\": \"Main Warehouse\",\n \"Description\": \"<string>\",\n \"Description2\": \"<string>\",\n \"WithholdingCode\": \"<string>\",\n \"WithholdingNumerator\": 123,\n \"WithholdingDenominator\": 123,\n \"WithheldVatAmount\": 123,\n \"AdditionalTaxCode1\": \"<string>\",\n \"AdditionalTaxRate1\": 123,\n \"AdditionalTaxAmount1\": 123,\n \"AdditionalTaxBase1\": 123,\n \"AdditionalTaxCode2\": \"<string>\",\n \"AdditionalTaxRate2\": 123,\n \"AdditionalTaxAmount2\": 123,\n \"AdditionalTaxBase2\": 123,\n \"AdditionalTaxCode3\": \"<string>\",\n \"AdditionalTaxRate3\": 123,\n \"AdditionalTaxAmount3\": 123,\n \"AdditionalTaxBase3\": 123,\n \"Lots\": [\n {\n \"LotNo\": \"<string>\",\n \"Quantity\": 123,\n \"UnitCode\": \"C62\",\n \"SupplierLotNo\": \"<string>\",\n \"ExpiryDate\": \"2023-11-07T05:31:56Z\",\n \"Description\": \"<string>\"\n }\n ],\n \"SerialNumbers\": [\n \"<string>\"\n ],\n \"ExportInfo\": {\n \"PackagingType\": \"<string>\",\n \"DeliveryTerm\": \"<string>\",\n \"TransportMode\": 123,\n \"RequiredCustomsID\": \"<string>\",\n \"DeliveryAddress_CityName\": \"<string>\",\n \"DeliveryAddress_CitySubdivisionName\": \"<string>\",\n \"DeliveryAddress_Country\": \"<string>\",\n \"DeliveryAddress_StreetName\": \"<string>\",\n \"DeliveryAddress_BuildingName\": \"<string>\",\n \"DeliveryAddress_BuildingNumber\": \"<string>\",\n \"DeliveryAddress_PostalCode\": \"<string>\",\n \"TransportMeansID\": \"<string>\",\n \"GrossWeightMeasure\": 123,\n \"NetWeightMeasure\": 123,\n \"PackageBrand\": \"<string>\",\n \"PackageID\": \"<string>\",\n \"PackageQuantity\": 123\n },\n \"MedicineDeviceInfo\": {\n \"Ilaclar\": [\n {\n \"GTIN\": \"<string>\",\n \"SN\": \"<string>\",\n \"BN\": \"<string>\",\n \"XD\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"TibbiCihazlar\": [\n {\n \"UNO\": \"<string>\",\n \"LNO\": \"<string>\",\n \"SNO\": \"<string>\",\n \"URT\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"HalInfo\": {\n \"KUNYENO\": \"<string>\",\n \"MALSAHIBIVKNTCKN\": \"<string>\",\n \"MALSAHIBIADSOYADUNVAN\": \"<string>\"\n },\n \"ProductInfo\": {\n \"ModelName\": \"<string>\",\n \"BrandName\": \"<string>\",\n \"SellersItemIdentification\": \"<string>\",\n \"BuyersItemIdentification\": \"<string>\",\n \"ManufacturersItemIdentification\": \"<string>\",\n \"OriginCountryCode\": \"<string>\",\n \"OriginCountryName\": \"<string>\",\n \"ProductTraceID\": \"<string>\",\n \"CommodityClassification\": \"<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({
InvoiceNumber: '9446A4D834',
DocumentNumber: '<string>',
Date: '2026-09-21T10:30:00',
Description: '<string>',
CustomerCode: 'C-0001',
CurrencyCode: 'TRY',
DueDays: 123,
SharingCode: '<string>',
ShipmentDefinitionCode: '<string>',
DiscountTotal: 123,
SubTotal: 123,
VatTotal: 123,
GrandTotal: 123,
Consolidated: true,
PrintDescription: true,
Cancelled: true,
AverageExchangeRate: 1,
ApplyWithholding: true,
WithholdingCode: '<string>',
WithholdingNumerator: 123,
WithholdingDenominator: 123,
WithholdingTotal: 123,
AdditionalTaxTotal: 123,
EInvoiceType: 1,
ProfileId: '<string>',
InvoiceTypeCode: '<string>',
WithholdingTaxRate: 123,
SocialSecurityRate: 123,
MarketRate: 123,
ReturnedInvoiceNumber: '<string>',
ReturnedInvoiceDate: '2023-11-07T05:31:56Z',
OrderReferenceNumber: '<string>',
OrderReferenceDate: '2023-11-07T05:31:56Z',
BranchNumber: '<string>',
BranchTitle: '<string>',
BranchAddress: '<string>',
InvestmentIncentiveDocumentNumber: '<string>',
InvestmentIncentiveDocumentDate: '2023-11-07T05:31:56Z',
EnergyPeriodStart: '2023-11-07T05:31:56Z',
EnergyPeriodEnd: '2023-11-07T05:31:56Z',
DeliveryInfo: [
{
DeliveryTerm: '<string>',
TransportModeCode: 123,
Country: '<string>',
CityName: '<string>',
CitySubdivisionName: '<string>',
StreetName: '<string>',
BuildingName: '<string>',
BuildingNumber: '<string>',
PostalZone: '<string>',
TransportMeans: '<string>',
DeclaredForCarriageValueAmount: 123,
DeliveryInsuranceValue: 123
}
],
PaymentMeans: [
{
PaymentMeansCode: '<string>',
PayeeFinancialAccountID: '<string>',
CurrencyCode: '<string>'
}
],
ReferencedDespatches: [{ID: '<string>', IssueDate: '2023-11-07T05:31:56Z'}],
CustomerIdentitySchemes: [{SchemeID: '<string>', Value: '<string>'}],
PublicSectorSpendingUnit: {
BCP_Name: '<string>',
BCP_VKN: '<string>',
BCP_Country: '<string>',
BCP_CityName: '<string>',
BCP_CitySubdivisionName: '<string>'
},
SgkInfo: {
StartDate: '2023-11-07T05:31:56Z',
EndDate: '2023-11-07T05:31:56Z',
MukellefKodu: '<string>',
MukellefAdi: '<string>',
DosyaNo: '<string>',
FaturaAltTipi: '<string>'
},
Lines: [
{
ProductCode: 'URN-0001',
UnitCode: 'C62',
Quantity: 10,
UnitPrice: 100,
DiscountRate: 123,
DiscountAmount: 123,
Discounts: [{Rate: 10}],
VatRate: 20,
VatIncluded: true,
VatAmount: 123,
AmountExcludingTax: 123,
AmountIncludingTax: 123,
VatBase: 123,
VatExemptionCode: '<string>',
LineGroupName: '<string>',
WarehouseName: 'Main Warehouse',
Description: '<string>',
Description2: '<string>',
WithholdingCode: '<string>',
WithholdingNumerator: 123,
WithholdingDenominator: 123,
WithheldVatAmount: 123,
AdditionalTaxCode1: '<string>',
AdditionalTaxRate1: 123,
AdditionalTaxAmount1: 123,
AdditionalTaxBase1: 123,
AdditionalTaxCode2: '<string>',
AdditionalTaxRate2: 123,
AdditionalTaxAmount2: 123,
AdditionalTaxBase2: 123,
AdditionalTaxCode3: '<string>',
AdditionalTaxRate3: 123,
AdditionalTaxAmount3: 123,
AdditionalTaxBase3: 123,
Lots: [
{
LotNo: '<string>',
Quantity: 123,
UnitCode: 'C62',
SupplierLotNo: '<string>',
ExpiryDate: '2023-11-07T05:31:56Z',
Description: '<string>'
}
],
SerialNumbers: ['<string>'],
ExportInfo: {
PackagingType: '<string>',
DeliveryTerm: '<string>',
TransportMode: 123,
RequiredCustomsID: '<string>',
DeliveryAddress_CityName: '<string>',
DeliveryAddress_CitySubdivisionName: '<string>',
DeliveryAddress_Country: '<string>',
DeliveryAddress_StreetName: '<string>',
DeliveryAddress_BuildingName: '<string>',
DeliveryAddress_BuildingNumber: '<string>',
DeliveryAddress_PostalCode: '<string>',
TransportMeansID: '<string>',
GrossWeightMeasure: 123,
NetWeightMeasure: 123,
PackageBrand: '<string>',
PackageID: '<string>',
PackageQuantity: 123
},
MedicineDeviceInfo: {
Ilaclar: [{GTIN: '<string>', SN: '<string>', BN: '<string>', XD: '2023-11-07T05:31:56Z'}],
TibbiCihazlar: [
{UNO: '<string>', LNO: '<string>', SNO: '<string>', URT: '2023-11-07T05:31:56Z'}
]
},
HalInfo: {
KUNYENO: '<string>',
MALSAHIBIVKNTCKN: '<string>',
MALSAHIBIADSOYADUNVAN: '<string>'
},
ProductInfo: {
ModelName: '<string>',
BrandName: '<string>',
SellersItemIdentification: '<string>',
BuyersItemIdentification: '<string>',
ManufacturersItemIdentification: '<string>',
OriginCountryCode: '<string>',
OriginCountryName: '<string>',
ProductTraceID: '<string>',
CommodityClassification: '<string>'
}
}
]
})
};
fetch('https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices"
payload = {
"InvoiceNumber": "9446A4D834",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"CurrencyCode": "TRY",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 123,
"SubTotal": 123,
"VatTotal": 123,
"GrandTotal": 123,
"Consolidated": True,
"PrintDescription": True,
"Cancelled": True,
"AverageExchangeRate": 1,
"ApplyWithholding": True,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 123,
"AdditionalTaxTotal": 123,
"EInvoiceType": 1,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2023-11-07T05:31:56Z",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2023-11-07T05:31:56Z",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2023-11-07T05:31:56Z",
"EnergyPeriodStart": "2023-11-07T05:31:56Z",
"EnergyPeriodEnd": "2023-11-07T05:31:56Z",
"DeliveryInfo": [
{
"DeliveryTerm": "<string>",
"TransportModeCode": 123,
"Country": "<string>",
"CityName": "<string>",
"CitySubdivisionName": "<string>",
"StreetName": "<string>",
"BuildingName": "<string>",
"BuildingNumber": "<string>",
"PostalZone": "<string>",
"TransportMeans": "<string>",
"DeclaredForCarriageValueAmount": 123,
"DeliveryInsuranceValue": 123
}
],
"PaymentMeans": [
{
"PaymentMeansCode": "<string>",
"PayeeFinancialAccountID": "<string>",
"CurrencyCode": "<string>"
}
],
"ReferencedDespatches": [
{
"ID": "<string>",
"IssueDate": "2023-11-07T05:31:56Z"
}
],
"CustomerIdentitySchemes": [
{
"SchemeID": "<string>",
"Value": "<string>"
}
],
"PublicSectorSpendingUnit": {
"BCP_Name": "<string>",
"BCP_VKN": "<string>",
"BCP_Country": "<string>",
"BCP_CityName": "<string>",
"BCP_CitySubdivisionName": "<string>"
},
"SgkInfo": {
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"MukellefKodu": "<string>",
"MukellefAdi": "<string>",
"DosyaNo": "<string>",
"FaturaAltTipi": "<string>"
},
"Lines": [
{
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"DiscountRate": 123,
"DiscountAmount": 123,
"Discounts": [{ "Rate": 10 }],
"VatRate": 20,
"VatIncluded": True,
"VatAmount": 123,
"AmountExcludingTax": 123,
"AmountIncludingTax": 123,
"VatBase": 123,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxAmount1": 123,
"AdditionalTaxBase1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxAmount2": 123,
"AdditionalTaxBase2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"AdditionalTaxAmount3": 123,
"AdditionalTaxBase3": 123,
"Lots": [
{
"LotNo": "<string>",
"Quantity": 123,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": ["<string>"],
"ExportInfo": {
"PackagingType": "<string>",
"DeliveryTerm": "<string>",
"TransportMode": 123,
"RequiredCustomsID": "<string>",
"DeliveryAddress_CityName": "<string>",
"DeliveryAddress_CitySubdivisionName": "<string>",
"DeliveryAddress_Country": "<string>",
"DeliveryAddress_StreetName": "<string>",
"DeliveryAddress_BuildingName": "<string>",
"DeliveryAddress_BuildingNumber": "<string>",
"DeliveryAddress_PostalCode": "<string>",
"TransportMeansID": "<string>",
"GrossWeightMeasure": 123,
"NetWeightMeasure": 123,
"PackageBrand": "<string>",
"PackageID": "<string>",
"PackageQuantity": 123
},
"MedicineDeviceInfo": {
"Ilaclar": [
{
"GTIN": "<string>",
"SN": "<string>",
"BN": "<string>",
"XD": "2023-11-07T05:31:56Z"
}
],
"TibbiCihazlar": [
{
"UNO": "<string>",
"LNO": "<string>",
"SNO": "<string>",
"URT": "2023-11-07T05:31:56Z"
}
]
},
"HalInfo": {
"KUNYENO": "<string>",
"MALSAHIBIVKNTCKN": "<string>",
"MALSAHIBIADSOYADUNVAN": "<string>"
},
"ProductInfo": {
"ModelName": "<string>",
"BrandName": "<string>",
"SellersItemIdentification": "<string>",
"BuyersItemIdentification": "<string>",
"ManufacturersItemIdentification": "<string>",
"OriginCountryCode": "<string>",
"OriginCountryName": "<string>",
"ProductTraceID": "<string>",
"CommodityClassification": "<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>",
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "<string>",
"CustomerTitle": "<string>",
"TaxNumber": "<string>",
"TaxOffice": "<string>",
"InvoiceNumber": "9446A4D834",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"CurrencyCode": "TRY",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 123,
"SubTotal": 123,
"VatTotal": 123,
"GrandTotal": 123,
"Consolidated": true,
"PrintDescription": true,
"Cancelled": true,
"AverageExchangeRate": 1,
"ApplyWithholding": true,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 123,
"AdditionalTaxTotal": 123,
"EInvoiceType": 1,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2023-11-07T05:31:56Z",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2023-11-07T05:31:56Z",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2023-11-07T05:31:56Z",
"EnergyPeriodStart": "2023-11-07T05:31:56Z",
"EnergyPeriodEnd": "2023-11-07T05:31:56Z",
"DeliveryInfo": [
{
"DeliveryTerm": "<string>",
"TransportModeCode": 123,
"Country": "<string>",
"CityName": "<string>",
"CitySubdivisionName": "<string>",
"StreetName": "<string>",
"BuildingName": "<string>",
"BuildingNumber": "<string>",
"PostalZone": "<string>",
"TransportMeans": "<string>",
"DeclaredForCarriageValueAmount": 123,
"DeliveryInsuranceValue": 123
}
],
"PaymentMeans": [
{
"PaymentMeansCode": "<string>",
"PayeeFinancialAccountID": "<string>",
"CurrencyCode": "<string>"
}
],
"ReferencedDespatches": [
{
"ID": "<string>",
"IssueDate": "2023-11-07T05:31:56Z"
}
],
"CustomerIdentitySchemes": [
{
"SchemeID": "<string>",
"Value": "<string>"
}
],
"PublicSectorSpendingUnit": {
"BCP_Name": "<string>",
"BCP_VKN": "<string>",
"BCP_Country": "<string>",
"BCP_CityName": "<string>",
"BCP_CitySubdivisionName": "<string>"
},
"SgkInfo": {
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"MukellefKodu": "<string>",
"MukellefAdi": "<string>",
"DosyaNo": "<string>",
"FaturaAltTipi": "<string>"
},
"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",
"LineGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductName": "<string>",
"UnitName": "ADET",
"MainUnitQuantity": 123,
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"DiscountRate": 123,
"DiscountAmount": 123,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": true,
"VatAmount": 123,
"AmountExcludingTax": 123,
"AmountIncludingTax": 123,
"VatBase": 123,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxAmount1": 123,
"AdditionalTaxBase1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxAmount2": 123,
"AdditionalTaxBase2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"AdditionalTaxAmount3": 123,
"AdditionalTaxBase3": 123,
"Lots": [
{
"LotNo": "<string>",
"Quantity": 123,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
],
"ExportInfo": {
"PackagingType": "<string>",
"DeliveryTerm": "<string>",
"TransportMode": 123,
"RequiredCustomsID": "<string>",
"DeliveryAddress_CityName": "<string>",
"DeliveryAddress_CitySubdivisionName": "<string>",
"DeliveryAddress_Country": "<string>",
"DeliveryAddress_StreetName": "<string>",
"DeliveryAddress_BuildingName": "<string>",
"DeliveryAddress_BuildingNumber": "<string>",
"DeliveryAddress_PostalCode": "<string>",
"TransportMeansID": "<string>",
"GrossWeightMeasure": 123,
"NetWeightMeasure": 123,
"PackageBrand": "<string>",
"PackageID": "<string>",
"PackageQuantity": 123
},
"MedicineDeviceInfo": {
"Ilaclar": [
{
"GTIN": "<string>",
"SN": "<string>",
"BN": "<string>",
"XD": "2023-11-07T05:31:56Z"
}
],
"TibbiCihazlar": [
{
"UNO": "<string>",
"LNO": "<string>",
"SNO": "<string>",
"URT": "2023-11-07T05:31:56Z"
}
]
},
"HalInfo": {
"KUNYENO": "<string>",
"MALSAHIBIVKNTCKN": "<string>",
"MALSAHIBIADSOYADUNVAN": "<string>"
},
"ProductInfo": {
"ModelName": "<string>",
"BrandName": "<string>",
"SellersItemIdentification": "<string>",
"BuyersItemIdentification": "<string>",
"ManufacturersItemIdentification": "<string>",
"OriginCountryCode": "<string>",
"OriginCountryName": "<string>",
"ProductTraceID": "<string>",
"CommodityClassification": "<string>"
}
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "3010",
"Message": "At least one line is required.",
"Errors": [
{
"Code": "3010",
"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 purchase return invoice
Creates the purchase return invoice and its lines in one transaction.
curl --request POST \
--url https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"InvoiceNumber": "9446A4D834",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"CurrencyCode": "TRY",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 123,
"SubTotal": 123,
"VatTotal": 123,
"GrandTotal": 123,
"Consolidated": true,
"PrintDescription": true,
"Cancelled": true,
"AverageExchangeRate": 1,
"ApplyWithholding": true,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 123,
"AdditionalTaxTotal": 123,
"EInvoiceType": 1,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2023-11-07T05:31:56Z",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2023-11-07T05:31:56Z",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2023-11-07T05:31:56Z",
"EnergyPeriodStart": "2023-11-07T05:31:56Z",
"EnergyPeriodEnd": "2023-11-07T05:31:56Z",
"DeliveryInfo": [
{
"DeliveryTerm": "<string>",
"TransportModeCode": 123,
"Country": "<string>",
"CityName": "<string>",
"CitySubdivisionName": "<string>",
"StreetName": "<string>",
"BuildingName": "<string>",
"BuildingNumber": "<string>",
"PostalZone": "<string>",
"TransportMeans": "<string>",
"DeclaredForCarriageValueAmount": 123,
"DeliveryInsuranceValue": 123
}
],
"PaymentMeans": [
{
"PaymentMeansCode": "<string>",
"PayeeFinancialAccountID": "<string>",
"CurrencyCode": "<string>"
}
],
"ReferencedDespatches": [
{
"ID": "<string>",
"IssueDate": "2023-11-07T05:31:56Z"
}
],
"CustomerIdentitySchemes": [
{
"SchemeID": "<string>",
"Value": "<string>"
}
],
"PublicSectorSpendingUnit": {
"BCP_Name": "<string>",
"BCP_VKN": "<string>",
"BCP_Country": "<string>",
"BCP_CityName": "<string>",
"BCP_CitySubdivisionName": "<string>"
},
"SgkInfo": {
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"MukellefKodu": "<string>",
"MukellefAdi": "<string>",
"DosyaNo": "<string>",
"FaturaAltTipi": "<string>"
},
"Lines": [
{
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"DiscountRate": 123,
"DiscountAmount": 123,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": true,
"VatAmount": 123,
"AmountExcludingTax": 123,
"AmountIncludingTax": 123,
"VatBase": 123,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxAmount1": 123,
"AdditionalTaxBase1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxAmount2": 123,
"AdditionalTaxBase2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"AdditionalTaxAmount3": 123,
"AdditionalTaxBase3": 123,
"Lots": [
{
"LotNo": "<string>",
"Quantity": 123,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
],
"ExportInfo": {
"PackagingType": "<string>",
"DeliveryTerm": "<string>",
"TransportMode": 123,
"RequiredCustomsID": "<string>",
"DeliveryAddress_CityName": "<string>",
"DeliveryAddress_CitySubdivisionName": "<string>",
"DeliveryAddress_Country": "<string>",
"DeliveryAddress_StreetName": "<string>",
"DeliveryAddress_BuildingName": "<string>",
"DeliveryAddress_BuildingNumber": "<string>",
"DeliveryAddress_PostalCode": "<string>",
"TransportMeansID": "<string>",
"GrossWeightMeasure": 123,
"NetWeightMeasure": 123,
"PackageBrand": "<string>",
"PackageID": "<string>",
"PackageQuantity": 123
},
"MedicineDeviceInfo": {
"Ilaclar": [
{
"GTIN": "<string>",
"SN": "<string>",
"BN": "<string>",
"XD": "2023-11-07T05:31:56Z"
}
],
"TibbiCihazlar": [
{
"UNO": "<string>",
"LNO": "<string>",
"SNO": "<string>",
"URT": "2023-11-07T05:31:56Z"
}
]
},
"HalInfo": {
"KUNYENO": "<string>",
"MALSAHIBIVKNTCKN": "<string>",
"MALSAHIBIADSOYADUNVAN": "<string>"
},
"ProductInfo": {
"ModelName": "<string>",
"BrandName": "<string>",
"SellersItemIdentification": "<string>",
"BuyersItemIdentification": "<string>",
"ManufacturersItemIdentification": "<string>",
"OriginCountryCode": "<string>",
"OriginCountryName": "<string>",
"ProductTraceID": "<string>",
"CommodityClassification": "<string>"
}
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices");
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 \"InvoiceNumber\": \"9446A4D834\",\n \"DocumentNumber\": \"<string>\",\n \"Date\": \"2026-09-21T10:30:00\",\n \"Description\": \"<string>\",\n \"CustomerCode\": \"C-0001\",\n \"CurrencyCode\": \"TRY\",\n \"DueDays\": 123,\n \"SharingCode\": \"<string>\",\n \"ShipmentDefinitionCode\": \"<string>\",\n \"DiscountTotal\": 123,\n \"SubTotal\": 123,\n \"VatTotal\": 123,\n \"GrandTotal\": 123,\n \"Consolidated\": true,\n \"PrintDescription\": true,\n \"Cancelled\": true,\n \"AverageExchangeRate\": 1,\n \"ApplyWithholding\": true,\n \"WithholdingCode\": \"<string>\",\n \"WithholdingNumerator\": 123,\n \"WithholdingDenominator\": 123,\n \"WithholdingTotal\": 123,\n \"AdditionalTaxTotal\": 123,\n \"EInvoiceType\": 1,\n \"ProfileId\": \"<string>\",\n \"InvoiceTypeCode\": \"<string>\",\n \"WithholdingTaxRate\": 123,\n \"SocialSecurityRate\": 123,\n \"MarketRate\": 123,\n \"ReturnedInvoiceNumber\": \"<string>\",\n \"ReturnedInvoiceDate\": \"2023-11-07T05:31:56Z\",\n \"OrderReferenceNumber\": \"<string>\",\n \"OrderReferenceDate\": \"2023-11-07T05:31:56Z\",\n \"BranchNumber\": \"<string>\",\n \"BranchTitle\": \"<string>\",\n \"BranchAddress\": \"<string>\",\n \"InvestmentIncentiveDocumentNumber\": \"<string>\",\n \"InvestmentIncentiveDocumentDate\": \"2023-11-07T05:31:56Z\",\n \"EnergyPeriodStart\": \"2023-11-07T05:31:56Z\",\n \"EnergyPeriodEnd\": \"2023-11-07T05:31:56Z\",\n \"DeliveryInfo\": [\n {\n \"DeliveryTerm\": \"<string>\",\n \"TransportModeCode\": 123,\n \"Country\": \"<string>\",\n \"CityName\": \"<string>\",\n \"CitySubdivisionName\": \"<string>\",\n \"StreetName\": \"<string>\",\n \"BuildingName\": \"<string>\",\n \"BuildingNumber\": \"<string>\",\n \"PostalZone\": \"<string>\",\n \"TransportMeans\": \"<string>\",\n \"DeclaredForCarriageValueAmount\": 123,\n \"DeliveryInsuranceValue\": 123\n }\n ],\n \"PaymentMeans\": [\n {\n \"PaymentMeansCode\": \"<string>\",\n \"PayeeFinancialAccountID\": \"<string>\",\n \"CurrencyCode\": \"<string>\"\n }\n ],\n \"ReferencedDespatches\": [\n {\n \"ID\": \"<string>\",\n \"IssueDate\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"CustomerIdentitySchemes\": [\n {\n \"SchemeID\": \"<string>\",\n \"Value\": \"<string>\"\n }\n ],\n \"PublicSectorSpendingUnit\": {\n \"BCP_Name\": \"<string>\",\n \"BCP_VKN\": \"<string>\",\n \"BCP_Country\": \"<string>\",\n \"BCP_CityName\": \"<string>\",\n \"BCP_CitySubdivisionName\": \"<string>\"\n },\n \"SgkInfo\": {\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"MukellefKodu\": \"<string>\",\n \"MukellefAdi\": \"<string>\",\n \"DosyaNo\": \"<string>\",\n \"FaturaAltTipi\": \"<string>\"\n },\n \"Lines\": [\n {\n \"ProductCode\": \"URN-0001\",\n \"UnitCode\": \"C62\",\n \"Quantity\": 10,\n \"UnitPrice\": 100,\n \"DiscountRate\": 123,\n \"DiscountAmount\": 123,\n \"Discounts\": [\n {\n \"Rate\": 10\n }\n ],\n \"VatRate\": 20,\n \"VatIncluded\": true,\n \"VatAmount\": 123,\n \"AmountExcludingTax\": 123,\n \"AmountIncludingTax\": 123,\n \"VatBase\": 123,\n \"VatExemptionCode\": \"<string>\",\n \"LineGroupName\": \"<string>\",\n \"WarehouseName\": \"Main Warehouse\",\n \"Description\": \"<string>\",\n \"Description2\": \"<string>\",\n \"WithholdingCode\": \"<string>\",\n \"WithholdingNumerator\": 123,\n \"WithholdingDenominator\": 123,\n \"WithheldVatAmount\": 123,\n \"AdditionalTaxCode1\": \"<string>\",\n \"AdditionalTaxRate1\": 123,\n \"AdditionalTaxAmount1\": 123,\n \"AdditionalTaxBase1\": 123,\n \"AdditionalTaxCode2\": \"<string>\",\n \"AdditionalTaxRate2\": 123,\n \"AdditionalTaxAmount2\": 123,\n \"AdditionalTaxBase2\": 123,\n \"AdditionalTaxCode3\": \"<string>\",\n \"AdditionalTaxRate3\": 123,\n \"AdditionalTaxAmount3\": 123,\n \"AdditionalTaxBase3\": 123,\n \"Lots\": [\n {\n \"LotNo\": \"<string>\",\n \"Quantity\": 123,\n \"UnitCode\": \"C62\",\n \"SupplierLotNo\": \"<string>\",\n \"ExpiryDate\": \"2023-11-07T05:31:56Z\",\n \"Description\": \"<string>\"\n }\n ],\n \"SerialNumbers\": [\n \"<string>\"\n ],\n \"ExportInfo\": {\n \"PackagingType\": \"<string>\",\n \"DeliveryTerm\": \"<string>\",\n \"TransportMode\": 123,\n \"RequiredCustomsID\": \"<string>\",\n \"DeliveryAddress_CityName\": \"<string>\",\n \"DeliveryAddress_CitySubdivisionName\": \"<string>\",\n \"DeliveryAddress_Country\": \"<string>\",\n \"DeliveryAddress_StreetName\": \"<string>\",\n \"DeliveryAddress_BuildingName\": \"<string>\",\n \"DeliveryAddress_BuildingNumber\": \"<string>\",\n \"DeliveryAddress_PostalCode\": \"<string>\",\n \"TransportMeansID\": \"<string>\",\n \"GrossWeightMeasure\": 123,\n \"NetWeightMeasure\": 123,\n \"PackageBrand\": \"<string>\",\n \"PackageID\": \"<string>\",\n \"PackageQuantity\": 123\n },\n \"MedicineDeviceInfo\": {\n \"Ilaclar\": [\n {\n \"GTIN\": \"<string>\",\n \"SN\": \"<string>\",\n \"BN\": \"<string>\",\n \"XD\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"TibbiCihazlar\": [\n {\n \"UNO\": \"<string>\",\n \"LNO\": \"<string>\",\n \"SNO\": \"<string>\",\n \"URT\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"HalInfo\": {\n \"KUNYENO\": \"<string>\",\n \"MALSAHIBIVKNTCKN\": \"<string>\",\n \"MALSAHIBIADSOYADUNVAN\": \"<string>\"\n },\n \"ProductInfo\": {\n \"ModelName\": \"<string>\",\n \"BrandName\": \"<string>\",\n \"SellersItemIdentification\": \"<string>\",\n \"BuyersItemIdentification\": \"<string>\",\n \"ManufacturersItemIdentification\": \"<string>\",\n \"OriginCountryCode\": \"<string>\",\n \"OriginCountryName\": \"<string>\",\n \"ProductTraceID\": \"<string>\",\n \"CommodityClassification\": \"<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({
InvoiceNumber: '9446A4D834',
DocumentNumber: '<string>',
Date: '2026-09-21T10:30:00',
Description: '<string>',
CustomerCode: 'C-0001',
CurrencyCode: 'TRY',
DueDays: 123,
SharingCode: '<string>',
ShipmentDefinitionCode: '<string>',
DiscountTotal: 123,
SubTotal: 123,
VatTotal: 123,
GrandTotal: 123,
Consolidated: true,
PrintDescription: true,
Cancelled: true,
AverageExchangeRate: 1,
ApplyWithholding: true,
WithholdingCode: '<string>',
WithholdingNumerator: 123,
WithholdingDenominator: 123,
WithholdingTotal: 123,
AdditionalTaxTotal: 123,
EInvoiceType: 1,
ProfileId: '<string>',
InvoiceTypeCode: '<string>',
WithholdingTaxRate: 123,
SocialSecurityRate: 123,
MarketRate: 123,
ReturnedInvoiceNumber: '<string>',
ReturnedInvoiceDate: '2023-11-07T05:31:56Z',
OrderReferenceNumber: '<string>',
OrderReferenceDate: '2023-11-07T05:31:56Z',
BranchNumber: '<string>',
BranchTitle: '<string>',
BranchAddress: '<string>',
InvestmentIncentiveDocumentNumber: '<string>',
InvestmentIncentiveDocumentDate: '2023-11-07T05:31:56Z',
EnergyPeriodStart: '2023-11-07T05:31:56Z',
EnergyPeriodEnd: '2023-11-07T05:31:56Z',
DeliveryInfo: [
{
DeliveryTerm: '<string>',
TransportModeCode: 123,
Country: '<string>',
CityName: '<string>',
CitySubdivisionName: '<string>',
StreetName: '<string>',
BuildingName: '<string>',
BuildingNumber: '<string>',
PostalZone: '<string>',
TransportMeans: '<string>',
DeclaredForCarriageValueAmount: 123,
DeliveryInsuranceValue: 123
}
],
PaymentMeans: [
{
PaymentMeansCode: '<string>',
PayeeFinancialAccountID: '<string>',
CurrencyCode: '<string>'
}
],
ReferencedDespatches: [{ID: '<string>', IssueDate: '2023-11-07T05:31:56Z'}],
CustomerIdentitySchemes: [{SchemeID: '<string>', Value: '<string>'}],
PublicSectorSpendingUnit: {
BCP_Name: '<string>',
BCP_VKN: '<string>',
BCP_Country: '<string>',
BCP_CityName: '<string>',
BCP_CitySubdivisionName: '<string>'
},
SgkInfo: {
StartDate: '2023-11-07T05:31:56Z',
EndDate: '2023-11-07T05:31:56Z',
MukellefKodu: '<string>',
MukellefAdi: '<string>',
DosyaNo: '<string>',
FaturaAltTipi: '<string>'
},
Lines: [
{
ProductCode: 'URN-0001',
UnitCode: 'C62',
Quantity: 10,
UnitPrice: 100,
DiscountRate: 123,
DiscountAmount: 123,
Discounts: [{Rate: 10}],
VatRate: 20,
VatIncluded: true,
VatAmount: 123,
AmountExcludingTax: 123,
AmountIncludingTax: 123,
VatBase: 123,
VatExemptionCode: '<string>',
LineGroupName: '<string>',
WarehouseName: 'Main Warehouse',
Description: '<string>',
Description2: '<string>',
WithholdingCode: '<string>',
WithholdingNumerator: 123,
WithholdingDenominator: 123,
WithheldVatAmount: 123,
AdditionalTaxCode1: '<string>',
AdditionalTaxRate1: 123,
AdditionalTaxAmount1: 123,
AdditionalTaxBase1: 123,
AdditionalTaxCode2: '<string>',
AdditionalTaxRate2: 123,
AdditionalTaxAmount2: 123,
AdditionalTaxBase2: 123,
AdditionalTaxCode3: '<string>',
AdditionalTaxRate3: 123,
AdditionalTaxAmount3: 123,
AdditionalTaxBase3: 123,
Lots: [
{
LotNo: '<string>',
Quantity: 123,
UnitCode: 'C62',
SupplierLotNo: '<string>',
ExpiryDate: '2023-11-07T05:31:56Z',
Description: '<string>'
}
],
SerialNumbers: ['<string>'],
ExportInfo: {
PackagingType: '<string>',
DeliveryTerm: '<string>',
TransportMode: 123,
RequiredCustomsID: '<string>',
DeliveryAddress_CityName: '<string>',
DeliveryAddress_CitySubdivisionName: '<string>',
DeliveryAddress_Country: '<string>',
DeliveryAddress_StreetName: '<string>',
DeliveryAddress_BuildingName: '<string>',
DeliveryAddress_BuildingNumber: '<string>',
DeliveryAddress_PostalCode: '<string>',
TransportMeansID: '<string>',
GrossWeightMeasure: 123,
NetWeightMeasure: 123,
PackageBrand: '<string>',
PackageID: '<string>',
PackageQuantity: 123
},
MedicineDeviceInfo: {
Ilaclar: [{GTIN: '<string>', SN: '<string>', BN: '<string>', XD: '2023-11-07T05:31:56Z'}],
TibbiCihazlar: [
{UNO: '<string>', LNO: '<string>', SNO: '<string>', URT: '2023-11-07T05:31:56Z'}
]
},
HalInfo: {
KUNYENO: '<string>',
MALSAHIBIVKNTCKN: '<string>',
MALSAHIBIADSOYADUNVAN: '<string>'
},
ProductInfo: {
ModelName: '<string>',
BrandName: '<string>',
SellersItemIdentification: '<string>',
BuyersItemIdentification: '<string>',
ManufacturersItemIdentification: '<string>',
OriginCountryCode: '<string>',
OriginCountryName: '<string>',
ProductTraceID: '<string>',
CommodityClassification: '<string>'
}
}
]
})
};
fetch('https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/purchase-return-invoices"
payload = {
"InvoiceNumber": "9446A4D834",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"CurrencyCode": "TRY",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 123,
"SubTotal": 123,
"VatTotal": 123,
"GrandTotal": 123,
"Consolidated": True,
"PrintDescription": True,
"Cancelled": True,
"AverageExchangeRate": 1,
"ApplyWithholding": True,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 123,
"AdditionalTaxTotal": 123,
"EInvoiceType": 1,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2023-11-07T05:31:56Z",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2023-11-07T05:31:56Z",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2023-11-07T05:31:56Z",
"EnergyPeriodStart": "2023-11-07T05:31:56Z",
"EnergyPeriodEnd": "2023-11-07T05:31:56Z",
"DeliveryInfo": [
{
"DeliveryTerm": "<string>",
"TransportModeCode": 123,
"Country": "<string>",
"CityName": "<string>",
"CitySubdivisionName": "<string>",
"StreetName": "<string>",
"BuildingName": "<string>",
"BuildingNumber": "<string>",
"PostalZone": "<string>",
"TransportMeans": "<string>",
"DeclaredForCarriageValueAmount": 123,
"DeliveryInsuranceValue": 123
}
],
"PaymentMeans": [
{
"PaymentMeansCode": "<string>",
"PayeeFinancialAccountID": "<string>",
"CurrencyCode": "<string>"
}
],
"ReferencedDespatches": [
{
"ID": "<string>",
"IssueDate": "2023-11-07T05:31:56Z"
}
],
"CustomerIdentitySchemes": [
{
"SchemeID": "<string>",
"Value": "<string>"
}
],
"PublicSectorSpendingUnit": {
"BCP_Name": "<string>",
"BCP_VKN": "<string>",
"BCP_Country": "<string>",
"BCP_CityName": "<string>",
"BCP_CitySubdivisionName": "<string>"
},
"SgkInfo": {
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"MukellefKodu": "<string>",
"MukellefAdi": "<string>",
"DosyaNo": "<string>",
"FaturaAltTipi": "<string>"
},
"Lines": [
{
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"DiscountRate": 123,
"DiscountAmount": 123,
"Discounts": [{ "Rate": 10 }],
"VatRate": 20,
"VatIncluded": True,
"VatAmount": 123,
"AmountExcludingTax": 123,
"AmountIncludingTax": 123,
"VatBase": 123,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxAmount1": 123,
"AdditionalTaxBase1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxAmount2": 123,
"AdditionalTaxBase2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"AdditionalTaxAmount3": 123,
"AdditionalTaxBase3": 123,
"Lots": [
{
"LotNo": "<string>",
"Quantity": 123,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": ["<string>"],
"ExportInfo": {
"PackagingType": "<string>",
"DeliveryTerm": "<string>",
"TransportMode": 123,
"RequiredCustomsID": "<string>",
"DeliveryAddress_CityName": "<string>",
"DeliveryAddress_CitySubdivisionName": "<string>",
"DeliveryAddress_Country": "<string>",
"DeliveryAddress_StreetName": "<string>",
"DeliveryAddress_BuildingName": "<string>",
"DeliveryAddress_BuildingNumber": "<string>",
"DeliveryAddress_PostalCode": "<string>",
"TransportMeansID": "<string>",
"GrossWeightMeasure": 123,
"NetWeightMeasure": 123,
"PackageBrand": "<string>",
"PackageID": "<string>",
"PackageQuantity": 123
},
"MedicineDeviceInfo": {
"Ilaclar": [
{
"GTIN": "<string>",
"SN": "<string>",
"BN": "<string>",
"XD": "2023-11-07T05:31:56Z"
}
],
"TibbiCihazlar": [
{
"UNO": "<string>",
"LNO": "<string>",
"SNO": "<string>",
"URT": "2023-11-07T05:31:56Z"
}
]
},
"HalInfo": {
"KUNYENO": "<string>",
"MALSAHIBIVKNTCKN": "<string>",
"MALSAHIBIADSOYADUNVAN": "<string>"
},
"ProductInfo": {
"ModelName": "<string>",
"BrandName": "<string>",
"SellersItemIdentification": "<string>",
"BuyersItemIdentification": "<string>",
"ManufacturersItemIdentification": "<string>",
"OriginCountryCode": "<string>",
"OriginCountryName": "<string>",
"ProductTraceID": "<string>",
"CommodityClassification": "<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>",
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "<string>",
"CustomerTitle": "<string>",
"TaxNumber": "<string>",
"TaxOffice": "<string>",
"InvoiceNumber": "9446A4D834",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"CurrencyCode": "TRY",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 123,
"SubTotal": 123,
"VatTotal": 123,
"GrandTotal": 123,
"Consolidated": true,
"PrintDescription": true,
"Cancelled": true,
"AverageExchangeRate": 1,
"ApplyWithholding": true,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 123,
"AdditionalTaxTotal": 123,
"EInvoiceType": 1,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2023-11-07T05:31:56Z",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2023-11-07T05:31:56Z",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2023-11-07T05:31:56Z",
"EnergyPeriodStart": "2023-11-07T05:31:56Z",
"EnergyPeriodEnd": "2023-11-07T05:31:56Z",
"DeliveryInfo": [
{
"DeliveryTerm": "<string>",
"TransportModeCode": 123,
"Country": "<string>",
"CityName": "<string>",
"CitySubdivisionName": "<string>",
"StreetName": "<string>",
"BuildingName": "<string>",
"BuildingNumber": "<string>",
"PostalZone": "<string>",
"TransportMeans": "<string>",
"DeclaredForCarriageValueAmount": 123,
"DeliveryInsuranceValue": 123
}
],
"PaymentMeans": [
{
"PaymentMeansCode": "<string>",
"PayeeFinancialAccountID": "<string>",
"CurrencyCode": "<string>"
}
],
"ReferencedDespatches": [
{
"ID": "<string>",
"IssueDate": "2023-11-07T05:31:56Z"
}
],
"CustomerIdentitySchemes": [
{
"SchemeID": "<string>",
"Value": "<string>"
}
],
"PublicSectorSpendingUnit": {
"BCP_Name": "<string>",
"BCP_VKN": "<string>",
"BCP_Country": "<string>",
"BCP_CityName": "<string>",
"BCP_CitySubdivisionName": "<string>"
},
"SgkInfo": {
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"MukellefKodu": "<string>",
"MukellefAdi": "<string>",
"DosyaNo": "<string>",
"FaturaAltTipi": "<string>"
},
"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",
"LineGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductName": "<string>",
"UnitName": "ADET",
"MainUnitQuantity": 123,
"ProductCode": "URN-0001",
"UnitCode": "C62",
"Quantity": 10,
"UnitPrice": 100,
"DiscountRate": 123,
"DiscountAmount": 123,
"Discounts": [
{
"Rate": 10
}
],
"VatRate": 20,
"VatIncluded": true,
"VatAmount": 123,
"AmountExcludingTax": 123,
"AmountIncludingTax": 123,
"VatBase": 123,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxAmount1": 123,
"AdditionalTaxBase1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxAmount2": 123,
"AdditionalTaxBase2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"AdditionalTaxAmount3": 123,
"AdditionalTaxBase3": 123,
"Lots": [
{
"LotNo": "<string>",
"Quantity": 123,
"UnitCode": "C62",
"SupplierLotNo": "<string>",
"ExpiryDate": "2023-11-07T05:31:56Z",
"Description": "<string>"
}
],
"SerialNumbers": [
"<string>"
],
"ExportInfo": {
"PackagingType": "<string>",
"DeliveryTerm": "<string>",
"TransportMode": 123,
"RequiredCustomsID": "<string>",
"DeliveryAddress_CityName": "<string>",
"DeliveryAddress_CitySubdivisionName": "<string>",
"DeliveryAddress_Country": "<string>",
"DeliveryAddress_StreetName": "<string>",
"DeliveryAddress_BuildingName": "<string>",
"DeliveryAddress_BuildingNumber": "<string>",
"DeliveryAddress_PostalCode": "<string>",
"TransportMeansID": "<string>",
"GrossWeightMeasure": 123,
"NetWeightMeasure": 123,
"PackageBrand": "<string>",
"PackageID": "<string>",
"PackageQuantity": 123
},
"MedicineDeviceInfo": {
"Ilaclar": [
{
"GTIN": "<string>",
"SN": "<string>",
"BN": "<string>",
"XD": "2023-11-07T05:31:56Z"
}
],
"TibbiCihazlar": [
{
"UNO": "<string>",
"LNO": "<string>",
"SNO": "<string>",
"URT": "2023-11-07T05:31:56Z"
}
]
},
"HalInfo": {
"KUNYENO": "<string>",
"MALSAHIBIVKNTCKN": "<string>",
"MALSAHIBIADSOYADUNVAN": "<string>"
},
"ProductInfo": {
"ModelName": "<string>",
"BrandName": "<string>",
"SellersItemIdentification": "<string>",
"BuyersItemIdentification": "<string>",
"ManufacturersItemIdentification": "<string>",
"OriginCountryCode": "<string>",
"OriginCountryName": "<string>",
"ProductTraceID": "<string>",
"CommodityClassification": "<string>"
}
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "3010",
"Message": "At least one line is required.",
"Errors": [
{
"Code": "3010",
"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
- This invoice type has no plain number series: send
"Next"withEInvoiceType1or2to generate the number from the company’s e-Invoice numbering — see numbering. - The customer’s address, title, tax number and tax office are copied from
CustomerCodeand are not accepted in the request. - The invoice always records a customer ledger entry (a debit).
- A successful response is 201 Created; the
Locationheader points to the new invoice.
Error codes
Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, daily limit) are not repeated here.| Code | HTTP | Meaning |
|---|---|---|
0002 | 400 | Request body could not be read (malformed JSON, wrong field type) |
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) |
3001 | 400 | InvoiceNumber is required |
3002 | 400 | The invoice number is already used in the company for this invoice type |
3003 | 400 | InvoiceNumber cannot be Next on update |
3004 | 400 | Date is required |
3005 | 400 | CustomerCode is required |
3006 | 400 | Customer not found or not visible to the user |
3007 | 400 | CurrencyCode is required |
3008 | 400 | Currency not found in the company |
3009 | 400 | SharingCode is not one of the user’s sharing codes |
3010 | 400 | At least one line is required |
3011 | 400 | DueDays cannot be less than 0 |
3013 | 400 | ShipmentDefinitionCode was not found in the company |
3014 | 400 | EInvoiceType must be between 0 and 5 |
3080 | 400 | The company has no number series for this invoice type/EInvoiceType combination (or no default e-Invoice numbering definition) |
3081 | 400 | The series has no parts |
3082 | 400 | The series has a part type the API cannot generate |
3083 | 400 | The generated number exceeds the series maximum length |
3084 | 400 | The generated number is already used in the company |
3085 | 400 | No unused number could be generated after several attempts |
3101 | 400 | ProductCode is required |
3102 | 400 | Product not found in the company |
3103 | 400 | UnitCode is required |
3104 | 400 | UnitCode is not one of the product’s own units (Unit1/Unit2/Unit3) |
3105 | 400 | Quantity must be greater than 0 |
3106 | 400 | UnitPrice cannot be negative |
3107 | 400 | DiscountRate must be between 0 and 100 |
3108 | 400 | VatRate must be between 0 and 100 |
3109 | 400 | Line group not found in the company |
3110 | 400 | WarehouseName was not found in the company |
3111 | 400 | The product defines no conversion quantity for the line’s unit, so the main unit quantity cannot be calculated |
3112 | 400 | WarehouseName is required |
3113 | 400 | The invoice line exceeds the quantity of the order line it is linked to |
3114 | 400 | The invoice line exceeds the quantity of the despatch line it is linked to |
3115 | 400 | The sum of the Lot/serial number entries does not match the line’s Quantity |
3116 | 400 | Lots/SerialNumbers were not sent as required for the product’s stock type |
3201 | 400 | The Rate of a discount must be between 0 and 100 |
3301 | 400 | LotNo is required |
3302 | 400 | LotNo is already used in the company |
3303 | 400 | Lot not found |
3305 | 400 | Not enough Lot stock for this product and warehouse |
3401 | 400 | SerialNumbers contains an empty value |
3402 | 400 | The serial number has already been registered and has not been dispatched yet |
3403 | 400 | Serial number not found |
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. Invoice number, unique within the company for this invoice type. Send "Next" on create to generate it automatically from the relevant number series or, when applicable, from the e-Invoice numbering. At most 20 characters.
"9446A4D834"
Document number (free text). At most 100 characters.
Required. Invoice date. The date part is stored as the invoice date; if a time is sent it is stored as the invoice time, otherwise the current time is used.
"2026-09-21T10:30:00"
Description. At most 1000 characters.
Required. Customer code (the customer's CustomerCode from GET /api/v1/customers). The invoice's address, title and tax fields are copied from the customer at the moment it is saved and are not accepted in the request.
"C-0001"
Required. Currency code from GET /api/v1/definitions/currencies.
"TRY"
Payment term in days. Cannot be less than 0.
Sharing code that limits who can see the invoice. Empty means visible to everyone; otherwise it must be one of the user's sharing codes.
Shipment definition code from GET /api/v1/definitions/shipment-definitions.
Total discount amount. Sent by the integrator, not calculated by the API.
Subtotal (sum of the line amounts excluding taxes). Sent by the integrator, not calculated by the API.
Total VAT amount. Sent by the integrator, not calculated by the API.
Grand total. Sent by the integrator, not calculated by the API.
Whether the invoice consolidates several despatches/orders. Free-form flag, not validated by the API.
Whether the description should be printed on the invoice document.
Whether the invoice has been cancelled.
Weighted average exchange rate of the lines. Sent by the integrator, not calculated by the API. Use 1 when everything is in the company's default currency.
1
Whether withholding (tevkifat) applies to this invoice.
Withholding (tevkifat) code. At most 10 characters.
Numerator of the withholding share (e.g. 9 in 9/10).
Denominator of the withholding share (e.g. 10 in 9/10).
Total withheld VAT amount. Calculated by the API as the sum of the lines' withheld VAT.
Total additional tax amount. Sent by the integrator, not calculated by the API.
e-Invoice classification of this specific invoice record: 0 not an e-document, 1 e-Invoice, 2 e-Archive, 3 e-Archive (internet), 4 incoming e-Invoice, 5 e-Producer-receipt. Provided by the integrator; the API only range-checks it and, for a sales/purchase-return invoice, uses it to pick the e-Invoice numbering series when InvoiceNumber is "Next".
1
UBL profile ID of the e-document (e.g. "TEMELFATURA", "TICARIFATURA"). Stored as sent; not validated or acted on.
UBL invoice type code of the e-document (e.g. "SATIS", "IADE"). Stored as sent; not validated or acted on.
Withholding tax rate (stopaj), used for self-employment/producer-receipt style invoices. Stored as sent.
Social security (Bağ-Kur) rate, used for self-employment/producer-receipt style invoices. Stored as sent.
Market (borsa) rate, used for producer-receipt style invoices. Stored as sent.
Number of the invoice this one returns goods against (Alış/Satış İade). Free text, not validated against an existing invoice.
Date of the invoice this one returns goods against.
Reference order number (free text, informational only).
Date of the reference order.
Branch number (informational).
Branch title (informational).
Branch address (informational).
Investment incentive certificate number.
Investment incentive certificate date.
Energy period start date/time, for energy sector invoices.
Energy period end date/time, for energy sector invoices.
Export delivery information. Stored and returned as sent, not validated.
Show child attributes
Show child attributes
Payment methods. Stored and returned as sent, not validated.
Show child attributes
Show child attributes
Referenced despatches. Stored and returned as sent, not validated.
Show child attributes
Show child attributes
Customer identity schemes. Stored and returned as sent, not validated.
Show child attributes
Show child attributes
Public sector (Kamu) payer spending unit. Stored and returned as sent, not validated.
Show child attributes
Show child attributes
SGK (social security) invoice information. Stored and returned as sent, not validated.
Show child attributes
Show child attributes
Required, at least one line. On update, the order in which lines are sent determines their identity, the same way as for despatches: the line at the same position as an existing line is treated as that line (its generated warehouse movement, Lot/serial number and linked-order/despatch records move with it).
Show child attributes
Show child attributes
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.