curl --request POST \
--url https://api.noyax.com/api/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"Code": "URN-0001",
"Name": "VİDA 5X40 GALVANİZ",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Barcode": "8690000000017",
"ProductType": 4,
"StockType": 2,
"VatRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"IsOutOfUse": false,
"ManufacturerCode": "<string>",
"SupplierCode": "<string>",
"GroupDetailId1": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId2": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId3": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId4": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId5": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShelfNumber": "A-12",
"Description": "<string>",
"SerialNumberIndex": 123,
"ECommerceProductCode": "<string>",
"IsFavourite": false,
"Gtip": "7318159000",
"DeliveryTerm": "EXW",
"PackagingType": "BX",
"TransportMode": 3,
"Brand": "<string>",
"Model": "<string>",
"OriginCountryCode": "TR",
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Galvaniz"
}
],
"Prices": [
{
"PriceType": 2,
"Price": 450,
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"IncludesVat": false,
"Discount": 10,
"IsDiscountPercentage": true,
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"CriticalStock": [
{
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"MinStock": 10,
"MaxStock": 500,
"MaxStockControl": 1,
"MinStockControl": 1,
"NegativeStockControl": 2
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/products");
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 \"Code\": \"URN-0001\",\n \"Name\": \"VİDA 5X40 GALVANİZ\",\n \"UnitId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Barcode\": \"8690000000017\",\n \"ProductType\": 4,\n \"StockType\": 2,\n \"VatRateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"AdditionalTaxCode1\": \"<string>\",\n \"AdditionalTaxRate1\": 123,\n \"AdditionalTaxCode2\": \"<string>\",\n \"AdditionalTaxRate2\": 123,\n \"AdditionalTaxCode3\": \"<string>\",\n \"AdditionalTaxRate3\": 123,\n \"IsOutOfUse\": false,\n \"ManufacturerCode\": \"<string>\",\n \"SupplierCode\": \"<string>\",\n \"GroupDetailId1\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId2\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId3\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId4\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId5\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ShelfNumber\": \"A-12\",\n \"Description\": \"<string>\",\n \"SerialNumberIndex\": 123,\n \"ECommerceProductCode\": \"<string>\",\n \"IsFavourite\": false,\n \"Gtip\": \"7318159000\",\n \"DeliveryTerm\": \"EXW\",\n \"PackagingType\": \"BX\",\n \"TransportMode\": 3,\n \"Brand\": \"<string>\",\n \"Model\": \"<string>\",\n \"OriginCountryCode\": \"TR\",\n \"Parameters\": [\n {\n \"ParameterDefinitionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Value\": \"Galvaniz\"\n }\n ],\n \"Prices\": [\n {\n \"PriceType\": 2,\n \"Price\": 450,\n \"CurrencyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"IncludesVat\": false,\n \"Discount\": 10,\n \"IsDiscountPercentage\": true,\n \"UnitId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"CustomerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"CustomerGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"CustomerGroupDetailId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Description\": \"<string>\"\n }\n ],\n \"CriticalStock\": [\n {\n \"WarehouseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"MinStock\": 10,\n \"MaxStock\": 500,\n \"MaxStockControl\": 1,\n \"MinStockControl\": 1,\n \"NegativeStockControl\": 2\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({
Code: 'URN-0001',
Name: 'VİDA 5X40 GALVANİZ',
UnitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Barcode: '8690000000017',
ProductType: 4,
StockType: 2,
VatRateId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
AdditionalTaxCode1: '<string>',
AdditionalTaxRate1: 123,
AdditionalTaxCode2: '<string>',
AdditionalTaxRate2: 123,
AdditionalTaxCode3: '<string>',
AdditionalTaxRate3: 123,
IsOutOfUse: false,
ManufacturerCode: '<string>',
SupplierCode: '<string>',
GroupDetailId1: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId2: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId3: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId4: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId5: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ShelfNumber: 'A-12',
Description: '<string>',
SerialNumberIndex: 123,
ECommerceProductCode: '<string>',
IsFavourite: false,
Gtip: '7318159000',
DeliveryTerm: 'EXW',
PackagingType: 'BX',
TransportMode: 3,
Brand: '<string>',
Model: '<string>',
OriginCountryCode: 'TR',
Parameters: [
{
ParameterDefinitionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Value: 'Galvaniz'
}
],
Prices: [
{
PriceType: 2,
Price: 450,
CurrencyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
IncludesVat: false,
Discount: 10,
IsDiscountPercentage: true,
UnitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
StartDate: '2023-11-07T05:31:56Z',
EndDate: '2023-11-07T05:31:56Z',
CustomerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
CustomerGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
CustomerGroupDetailId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Description: '<string>'
}
],
CriticalStock: [
{
WarehouseId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
MinStock: 10,
MaxStock: 500,
MaxStockControl: 1,
MinStockControl: 1,
NegativeStockControl: 2
}
]
})
};
fetch('https://api.noyax.com/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/products"
payload = {
"Code": "URN-0001",
"Name": "VİDA 5X40 GALVANİZ",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Barcode": "8690000000017",
"ProductType": 4,
"StockType": 2,
"VatRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"IsOutOfUse": False,
"ManufacturerCode": "<string>",
"SupplierCode": "<string>",
"GroupDetailId1": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId2": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId3": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId4": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId5": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShelfNumber": "A-12",
"Description": "<string>",
"SerialNumberIndex": 123,
"ECommerceProductCode": "<string>",
"IsFavourite": False,
"Gtip": "7318159000",
"DeliveryTerm": "EXW",
"PackagingType": "BX",
"TransportMode": 3,
"Brand": "<string>",
"Model": "<string>",
"OriginCountryCode": "TR",
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Galvaniz"
}
],
"Prices": [
{
"PriceType": 2,
"Price": 450,
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"IncludesVat": False,
"Discount": 10,
"IsDiscountPercentage": True,
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"CriticalStock": [
{
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"MinStock": 10,
"MaxStock": 500,
"MaxStockControl": 1,
"MinStockControl": 1,
"NegativeStockControl": 2
}
]
}
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",
"UnitName": "ADET",
"VatRate": 20,
"Code": "URN-0001",
"Name": "VİDA 5X40 GALVANİZ",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Barcode": "8690000000017",
"ProductType": 4,
"StockType": 2,
"VatRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"IsOutOfUse": false,
"ManufacturerCode": "<string>",
"SupplierCode": "<string>",
"GroupDetailId1": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId2": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId3": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId4": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId5": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShelfNumber": "A-12",
"Description": "<string>",
"SerialNumberIndex": 123,
"ECommerceProductCode": "<string>",
"IsFavourite": false,
"Gtip": "7318159000",
"DeliveryTerm": "EXW",
"PackagingType": "BX",
"TransportMode": 3,
"Brand": "<string>",
"Model": "<string>",
"OriginCountryCode": "TR",
"Parameters": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterName": "Malzeme",
"ParameterType": 123,
"Value": "<unknown>"
}
],
"Prices": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyCode": "TRY",
"UnitName": "<string>",
"CustomerName": "<string>",
"CustomerGroupName": "<string>",
"CustomerGroupDetailName": "<string>",
"PriceType": 2,
"Price": 450,
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"IncludesVat": false,
"Discount": 10,
"IsDiscountPercentage": true,
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"CriticalStock": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"WarehouseName": "A DEPO",
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"MinStock": 10,
"MaxStock": 500,
"MaxStockControl": 1,
"MinStockControl": 1,
"NegativeStockControl": 2
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "2005",
"Message": "UnitId is required.",
"Errors": [
{
"Code": "2005",
"Message": "UnitId 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 product
Creates a product and its sub-records in one transaction.
curl --request POST \
--url https://api.noyax.com/api/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"Code": "URN-0001",
"Name": "VİDA 5X40 GALVANİZ",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Barcode": "8690000000017",
"ProductType": 4,
"StockType": 2,
"VatRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"IsOutOfUse": false,
"ManufacturerCode": "<string>",
"SupplierCode": "<string>",
"GroupDetailId1": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId2": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId3": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId4": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId5": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShelfNumber": "A-12",
"Description": "<string>",
"SerialNumberIndex": 123,
"ECommerceProductCode": "<string>",
"IsFavourite": false,
"Gtip": "7318159000",
"DeliveryTerm": "EXW",
"PackagingType": "BX",
"TransportMode": 3,
"Brand": "<string>",
"Model": "<string>",
"OriginCountryCode": "TR",
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Galvaniz"
}
],
"Prices": [
{
"PriceType": 2,
"Price": 450,
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"IncludesVat": false,
"Discount": 10,
"IsDiscountPercentage": true,
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"CriticalStock": [
{
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"MinStock": 10,
"MaxStock": 500,
"MaxStockControl": 1,
"MinStockControl": 1,
"NegativeStockControl": 2
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://api.noyax.com/api/v1/products");
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 \"Code\": \"URN-0001\",\n \"Name\": \"VİDA 5X40 GALVANİZ\",\n \"UnitId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Barcode\": \"8690000000017\",\n \"ProductType\": 4,\n \"StockType\": 2,\n \"VatRateId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"AdditionalTaxCode1\": \"<string>\",\n \"AdditionalTaxRate1\": 123,\n \"AdditionalTaxCode2\": \"<string>\",\n \"AdditionalTaxRate2\": 123,\n \"AdditionalTaxCode3\": \"<string>\",\n \"AdditionalTaxRate3\": 123,\n \"IsOutOfUse\": false,\n \"ManufacturerCode\": \"<string>\",\n \"SupplierCode\": \"<string>\",\n \"GroupDetailId1\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId2\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId3\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId4\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"GroupDetailId5\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"ShelfNumber\": \"A-12\",\n \"Description\": \"<string>\",\n \"SerialNumberIndex\": 123,\n \"ECommerceProductCode\": \"<string>\",\n \"IsFavourite\": false,\n \"Gtip\": \"7318159000\",\n \"DeliveryTerm\": \"EXW\",\n \"PackagingType\": \"BX\",\n \"TransportMode\": 3,\n \"Brand\": \"<string>\",\n \"Model\": \"<string>\",\n \"OriginCountryCode\": \"TR\",\n \"Parameters\": [\n {\n \"ParameterDefinitionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Value\": \"Galvaniz\"\n }\n ],\n \"Prices\": [\n {\n \"PriceType\": 2,\n \"Price\": 450,\n \"CurrencyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"IncludesVat\": false,\n \"Discount\": 10,\n \"IsDiscountPercentage\": true,\n \"UnitId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"StartDate\": \"2023-11-07T05:31:56Z\",\n \"EndDate\": \"2023-11-07T05:31:56Z\",\n \"CustomerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"CustomerGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"CustomerGroupDetailId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"Description\": \"<string>\"\n }\n ],\n \"CriticalStock\": [\n {\n \"WarehouseId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"MinStock\": 10,\n \"MaxStock\": 500,\n \"MaxStockControl\": 1,\n \"MinStockControl\": 1,\n \"NegativeStockControl\": 2\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({
Code: 'URN-0001',
Name: 'VİDA 5X40 GALVANİZ',
UnitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Barcode: '8690000000017',
ProductType: 4,
StockType: 2,
VatRateId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
AdditionalTaxCode1: '<string>',
AdditionalTaxRate1: 123,
AdditionalTaxCode2: '<string>',
AdditionalTaxRate2: 123,
AdditionalTaxCode3: '<string>',
AdditionalTaxRate3: 123,
IsOutOfUse: false,
ManufacturerCode: '<string>',
SupplierCode: '<string>',
GroupDetailId1: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId2: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId3: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId4: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
GroupDetailId5: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ShelfNumber: 'A-12',
Description: '<string>',
SerialNumberIndex: 123,
ECommerceProductCode: '<string>',
IsFavourite: false,
Gtip: '7318159000',
DeliveryTerm: 'EXW',
PackagingType: 'BX',
TransportMode: 3,
Brand: '<string>',
Model: '<string>',
OriginCountryCode: 'TR',
Parameters: [
{
ParameterDefinitionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Value: 'Galvaniz'
}
],
Prices: [
{
PriceType: 2,
Price: 450,
CurrencyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
IncludesVat: false,
Discount: 10,
IsDiscountPercentage: true,
UnitId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
StartDate: '2023-11-07T05:31:56Z',
EndDate: '2023-11-07T05:31:56Z',
CustomerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
CustomerGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
CustomerGroupDetailId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
Description: '<string>'
}
],
CriticalStock: [
{
WarehouseId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
MinStock: 10,
MaxStock: 500,
MaxStockControl: 1,
MinStockControl: 1,
NegativeStockControl: 2
}
]
})
};
fetch('https://api.noyax.com/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.noyax.com/api/v1/products"
payload = {
"Code": "URN-0001",
"Name": "VİDA 5X40 GALVANİZ",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Barcode": "8690000000017",
"ProductType": 4,
"StockType": 2,
"VatRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"IsOutOfUse": False,
"ManufacturerCode": "<string>",
"SupplierCode": "<string>",
"GroupDetailId1": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId2": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId3": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId4": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId5": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShelfNumber": "A-12",
"Description": "<string>",
"SerialNumberIndex": 123,
"ECommerceProductCode": "<string>",
"IsFavourite": False,
"Gtip": "7318159000",
"DeliveryTerm": "EXW",
"PackagingType": "BX",
"TransportMode": 3,
"Brand": "<string>",
"Model": "<string>",
"OriginCountryCode": "TR",
"Parameters": [
{
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Value": "Galvaniz"
}
],
"Prices": [
{
"PriceType": 2,
"Price": 450,
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"IncludesVat": False,
"Discount": 10,
"IsDiscountPercentage": True,
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"CriticalStock": [
{
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"MinStock": 10,
"MaxStock": 500,
"MaxStockControl": 1,
"MinStockControl": 1,
"NegativeStockControl": 2
}
]
}
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",
"UnitName": "ADET",
"VatRate": 20,
"Code": "URN-0001",
"Name": "VİDA 5X40 GALVANİZ",
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Barcode": "8690000000017",
"ProductType": 4,
"StockType": 2,
"VatRateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"AdditionalTaxCode1": "<string>",
"AdditionalTaxRate1": 123,
"AdditionalTaxCode2": "<string>",
"AdditionalTaxRate2": 123,
"AdditionalTaxCode3": "<string>",
"AdditionalTaxRate3": 123,
"IsOutOfUse": false,
"ManufacturerCode": "<string>",
"SupplierCode": "<string>",
"GroupDetailId1": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId2": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId3": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId4": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"GroupDetailId5": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ShelfNumber": "A-12",
"Description": "<string>",
"SerialNumberIndex": 123,
"ECommerceProductCode": "<string>",
"IsFavourite": false,
"Gtip": "7318159000",
"DeliveryTerm": "EXW",
"PackagingType": "BX",
"TransportMode": 3,
"Brand": "<string>",
"Model": "<string>",
"OriginCountryCode": "TR",
"Parameters": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterDefinitionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ParameterName": "Malzeme",
"ParameterType": 123,
"Value": "<unknown>"
}
],
"Prices": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CurrencyCode": "TRY",
"UnitName": "<string>",
"CustomerName": "<string>",
"CustomerGroupName": "<string>",
"CustomerGroupDetailName": "<string>",
"PriceType": 2,
"Price": 450,
"CurrencyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"IncludesVat": false,
"Discount": 10,
"IsDiscountPercentage": true,
"UnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"StartDate": "2023-11-07T05:31:56Z",
"EndDate": "2023-11-07T05:31:56Z",
"CustomerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"CustomerGroupDetailId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Description": "<string>"
}
],
"CriticalStock": [
{
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ProductId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"WarehouseName": "A DEPO",
"WarehouseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"MinStock": 10,
"MaxStock": 500,
"MaxStockControl": 1,
"MinStockControl": 1,
"NegativeStockControl": 2
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "2005",
"Message": "UnitId is required.",
"Errors": [
{
"Code": "2005",
"Message": "UnitId is required."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Message.
Field rules
Prices
Code,NameandUnitIdare required; all other fields are optional.- Send
"Next"asCodeto generate the code from the ÜRÜN serial number definition. ParametersandCriticalStockuse the same rules as their own parameter and critical stock records. InPrices,UnitIdcan only be the product’s ownUnitId, since the product has no second/third unit yet on create.- Send an empty array (
[]) for sub-record lists you do not need. A successful response returns 201 Created and theLocationheader points to the new product.
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. Product code, unique within the company. Send "Next" to generate it from the "ÜRÜN" serial number definition (create only). At most 50 characters.
"URN-0001"
Required. Product name. At most 255 characters.
"VİDA 5X40 GALVANİZ"
Required. ID of the main unit from GET /api/v1/definitions/units.
Barcode of the main unit. At most 30 characters.
"8690000000017"
Product type: 1 Raw material, 2 Semi-finished good, 3 Finished good, 4 Commercial good, 5 Service. Defaults to 4.
4
Stock type: 1 No stock tracking, 2 Stock tracking, 3 Lot, 4 FIFO, 5 Serial, 6 LIFO, 7 FEFO. Defaults to 1.
2
ID of the VAT rate from GET /api/v1/definitions/vat-rates.
Additional tax code 1. At most 15 characters.
Additional tax rate 1, in percent.
Additional tax code 2. At most 15 characters.
Additional tax rate 2, in percent.
Additional tax code 3. At most 15 characters.
Additional tax rate 3, in percent.
Whether the product is out of use. Out of use products are kept but are not offered in new records.
false
Manufacturer code. At most 50 characters.
Supplier code. At most 50 characters.
ID of a group 1 detail from GET /api/v1/products/groups. Group 1 details never have a parent, so any of them can be selected.
ID of a group 2 detail. It must either have no parent or have GroupDetailId1 as its parent.
ID of a group 3 detail. It must either have no parent or have GroupDetailId2 as its parent.
ID of a group 4 detail. It must either have no parent or have GroupDetailId3 as its parent.
ID of a group 5 detail. It must either have no parent or have GroupDetailId4 as its parent.
Shelf number. At most 20 characters.
"A-12"
Description. At most 255 characters.
Serial number index used by serial tracking.
Product code used by the e-commerce integration. At most 50 characters.
Whether the product is marked as a favourite.
false
Customs tariff (GTIP) number, used on export invoices. At most 20 characters.
"7318159000"
Delivery term code used on export invoices (Incoterms, e.g. EXW, FCA, CIF). At most 10 characters.
"EXW"
Packaging type code used on export invoices. At most 10 characters.
"BX"
Transport mode used on export invoices: 0 none, 1 Maritime, 2 Rail, 3 Road, 4 Air, 5 Post, 6 Multimodal, 7 Fixed transport installation, 8 Inland waterway. This list is different from the TransportMode of shipment definitions.
3
Brand. At most 100 characters.
Model. At most 100 characters.
Country of origin code used on export invoices (ISO 3166-1 alpha-2). At most 10 characters.
"TR"
Custom parameter values.
Show child attributes
Show child attributes
Prices/discounts. UnitId must be the product's own UnitId, since the product has no second/third unit yet on create.
Show child attributes
Show child attributes
Critical stock definitions, one per warehouse. Cannot be sent when StockType is 1 (no stock tracking).
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.