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."
}
]
}Ürün oluştur
Ürünü ve alt kayıtlarını tek transaction’da oluşturur.
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’da döner.
Alan kuralları
Fiyatlar
Code,NameveUnitIdzorunludur; diğer alanlar isteğe bağlıdır.Codeyerine"Next"gönderilirse kod ÜRÜN seri tanımından üretilir.ParametersveCriticalStock, ilgili parametre ve kritik stok kayıtlarıyla aynı kuralları kullanır.Prices’taUnitIdyalnızca ürünün kendiUnitId’si olabilir; ürün henüz oluşturulmadığı için 2./3. birim yoktur.- İstenmeyen alt kayıt listesi için
[]gönderilir. Başarılı yanıt 201 Created döner;Locationheader’ı yeni ürünü gösterir.
Yetkilendirmeler
Access token obtained from the Noyax auth service with your API key.
Başlıklar
İsteğin adına yapıldığı Noyax kullanıcısının ID'si. Oluşturulan, güncellenen ve silinen kayıtların denetim alanlarına yazılır.
x >= 1Şirketin ID'si. Kullanıcı bu şirkete tanımlı olmalıdır. Bütün okuma ve yazma işlemleri bu şirketle sınırlıdır.
x >= 1Muhasebe döneminin ID'si. Cari endpoint'lerinde isteğe bağlıdır; gönderilirse oluşturulan kayıtlara yazılır.
x >= 1Gövde
Zorunlu. Ürün kodu, şirket içinde benzersiz olmalıdır. "Next" gönderilirse kod "ÜRÜN" seri tanımından üretilir (yalnızca oluştururken). En fazla 50 karakter.
"URN-0001"
Zorunlu. Ürün tanımı. En fazla 255 karakter.
"VİDA 5X40 GALVANİZ"
Zorunlu. GET /api/v1/definitions/units ile dönen ana birimin ID'si.
Ana birimin barkodu. En fazla 30 karakter.
"8690000000017"
Ürün tipi: 1 İlk madde, 2 Yarı mamül, 3 Mamül, 4 Ticari mal, 5 Hizmet. Varsayılan 4.
4
Stok tipi: 1 Stok tutma, 2 Stok tut, 3 Lot, 4 FIFO, 5 Seri, 6 LIFO, 7 FEFO. Varsayılan 1.
2
GET /api/v1/definitions/vat-rates ile dönen KDV oranının ID'si.
Ek vergi kodu 1. En fazla 15 karakter.
Yüzde olarak ek vergi oranı 1.
Ek vergi kodu 2. En fazla 15 karakter.
Yüzde olarak ek vergi oranı 2.
Ek vergi kodu 3. En fazla 15 karakter.
Yüzde olarak ek vergi oranı 3.
Ürünün kullanım dışı olup olmadığı. Kullanım dışı ürünler saklanır ama yeni kayıtlarda önerilmez.
false
Üretici kodu. En fazla 50 karakter.
Tedarikçi kodu. En fazla 50 karakter.
GET /api/v1/products/groups ile dönen 1. grup detayının ID'si. Grup 1 detaylarının üstü olmadığı için hepsi seçilebilir.
- grup detayının ID'si. Ya üstü boş olmalı ya da üstü GroupDetailId1 ile seçilen detay olmalıdır.
- grup detayının ID'si. Ya üstü boş olmalı ya da üstü GroupDetailId2 ile seçilen detay olmalıdır.
- grup detayının ID'si. Ya üstü boş olmalı ya da üstü GroupDetailId3 ile seçilen detay olmalıdır.
- grup detayının ID'si. Ya üstü boş olmalı ya da üstü GroupDetailId4 ile seçilen detay olmalıdır.
Raf numarası. En fazla 20 karakter.
"A-12"
Açıklama. En fazla 255 karakter.
Seri takibinde kullanılan seri no indeksi.
E-ticaret entegrasyonunun kullandığı ürün kodu. En fazla 50 karakter.
Ürünün favori olarak işaretlenip işaretlenmediği.
false
İhracat faturalarında kullanılan GTİP numarası. En fazla 20 karakter.
"7318159000"
İhracat faturalarında kullanılan teslim şekli kodu (Incoterms, ör. EXW, FCA, CIF). En fazla 10 karakter.
"EXW"
İhracat faturalarında kullanılan paketleme tipi kodu. En fazla 10 karakter.
"BX"
İhracat faturalarında kullanılan taşıma modu: 0 belirtilmemiş, 1 Denizyolu, 2 Demiryolu, 3 Karayolu, 4 Havayolu, 5 Posta, 6 Çok araçlı, 7 Sabit taşıma tesisleri, 8 İç su yolu. Bu liste, sevkiyat tanımındaki TransportMode listesinden farklıdır.
3
Marka. En fazla 100 karakter.
Model. En fazla 100 karakter.
İhracat faturalarında kullanılan menşei ülke kodu (ISO 3166-1 alpha-2). En fazla 10 karakter.
"TR"
Özel parametre değerleri.
Show child attributes
Show child attributes
Fiyatlar/indirimler. UnitId, ürünün kendi UnitId'si olmalıdır; oluşturma sırasında ürünün henüz 2./3. birimi yoktur.
Show child attributes
Show child attributes
Kritik stok tanımları, depo başına bir tane. StockType 1 (stok tutulmuyor) iken gönderilemez.
Show child attributes
Show child attributes
Yanıt
Created
İşlemin başarılı olup olmadığı.
true
Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors içinde listelenir.
"0000"
Response data. Null when Success is false.
Show child attributes
Show child attributes
Success false olduğunda hata mesajı. Bütün hataların mesajları tek metinde birleştirilir.