Get purchase return invoice
curl --request GET \
--url https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'GET',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, 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>",
"Cancelled": true,
"CurrencyCode": "TRY",
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "<string>",
"CustomerTitle": "<string>",
"TaxNumber": "<string>",
"TaxOffice": "<string>",
"EInvoiceType": 2,
"InvoiceNumber": "FAT2026000125",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 100,
"SubTotal": 900,
"VatTotal": 225,
"GrandTotal": 1350,
"Consolidated": true,
"PrintDescription": true,
"ApplyWithholding": true,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 0,
"AdditionalTaxTotal": 225,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2026-10-15",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2026-10-15",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2026-10-15",
"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>"
},
"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": true,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"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": "0201",
"Message": "X-UserID header is required.",
"Errors": [
{
"Code": "0201",
"Message": "X-UserID header 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": "3000",
"Message": "Invoice not found.",
"Errors": [
{
"Code": "3000",
"Message": "Invoice not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Purchase Return Invoices
Get purchase return invoice
Returns the purchase return invoice with its lines.
GET
/
api
/
v1
/
purchase-return-invoices
/
{invoiceId}
Get purchase return invoice
curl --request GET \
--url https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId} \
--header 'Authorization: Bearer <token>' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'GET',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/purchase-return-invoices/{invoiceId}"
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, 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>",
"Cancelled": true,
"CurrencyCode": "TRY",
"ShipmentDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Address": "<string>",
"CustomerTitle": "<string>",
"TaxNumber": "<string>",
"TaxOffice": "<string>",
"EInvoiceType": 2,
"InvoiceNumber": "FAT2026000125",
"DocumentNumber": "<string>",
"Date": "2026-09-21T10:30:00",
"Description": "<string>",
"CustomerCode": "C-0001",
"DueDays": 123,
"SharingCode": "<string>",
"ShipmentDefinitionCode": "<string>",
"DiscountTotal": 100,
"SubTotal": 900,
"VatTotal": 225,
"GrandTotal": 1350,
"Consolidated": true,
"PrintDescription": true,
"ApplyWithholding": true,
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithholdingTotal": 0,
"AdditionalTaxTotal": 225,
"ProfileId": "<string>",
"InvoiceTypeCode": "<string>",
"WithholdingTaxRate": 123,
"SocialSecurityRate": 123,
"MarketRate": 123,
"ReturnedInvoiceNumber": "<string>",
"ReturnedInvoiceDate": "2026-10-15",
"OrderReferenceNumber": "<string>",
"OrderReferenceDate": "2026-10-15",
"BranchNumber": "<string>",
"BranchTitle": "<string>",
"BranchAddress": "<string>",
"InvestmentIncentiveDocumentNumber": "<string>",
"InvestmentIncentiveDocumentDate": "2026-10-15",
"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>"
},
"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": true,
"VatAmount": 225,
"AmountExcludingTax": 900,
"AmountIncludingTax": 1350,
"VatBase": 1125,
"VatExemptionCode": "<string>",
"LineGroupName": "<string>",
"WarehouseName": "Main Warehouse",
"Description": "<string>",
"Description2": "<string>",
"WithholdingCode": "<string>",
"WithholdingNumerator": 123,
"WithholdingDenominator": 123,
"WithheldVatAmount": 123,
"AdditionalTaxes": [
{
"Code": "0071",
"Rate": 25,
"Amount": 225,
"Base": 900
}
],
"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": "0201",
"Message": "X-UserID header is required.",
"Errors": [
{
"Code": "0201",
"Message": "X-UserID header 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": "3000",
"Message": "Invoice not found.",
"Errors": [
{
"Code": "3000",
"Message": "Invoice not found."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Returns the invoice with its lines (in line order), the discounts of each line, and, for a line with a stock movement, its main unit quantity and Lot/serial number entries. Invoices the user cannot see because of their sharing codes return 404.
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 |
|---|---|---|
3000 | 404 | Invoice not found |
Authorizations
Headers
Response
OK