Skip to main content
POST
Create product
The product and all sub-records are written in a single transaction: if any record is invalid, nothing is saved and all errors are returned in one Message.

Field rules

Required fields, type lists and group rules.

Prices

Price/discount rules and scope.
  • Code, Name and UnitCode are required; all other fields are optional.
  • Send "Next" as Code to generate the code from the ÜRÜN serial number definition.
  • Parameters and CriticalStock use the same rules as their own parameter and critical stock records. In Prices, UnitCode can only be the product’s own UnitCode, 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 the Location header points to the new product.

Minimal request

A request with only the required fields. Replace the codes and names with those of your own company.

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.

Authorizations

Authorization
string
header
required

Access token obtained from the Noyax auth service with your API key.

Headers

X-UserID
integer<int32>
required

ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.

Required range: x >= 1
X-CompanyID
integer<int32>
required

ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.

Required range: x >= 1
X-PeriodID
integer<int32>

ID of the accounting period. Optional; if sent, it is written to created records.

Required range: x >= 1

Body

Code
null | string
required

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.

Example:

"URN-0001"

Name
null | string
required

Required. Product name. At most 255 characters.

Example:

"VİDA 5X40 GALVANİZ"

UnitCode
null | string
required

Required. Code of the main unit from GET /api/v1/definitions/units: the unit's universal code (for example C62 for ADET) or, when the unit has no universal code, its name (for example KOLİ).

Example:

"C62"

Barcode
null | string

Barcode of the main unit. At most 30 characters.

Example:

"8690000000017"

ProductType
integer<int32>

Product type: 1 Raw material, 2 Semi-finished good, 3 Finished good, 4 Commercial good, 5 Service. Defaults to 4.

Example:

4

StockType
integer<int32>

Stock type: 1 No stock tracking, 2 Stock tracking, 3 Lot, 4 FIFO, 5 Serial, 6 LIFO, 7 FEFO. Defaults to 1.

Example:

2

VatRate
null | integer<int32>

VAT rate in percent, one of the rates from GET /api/v1/definitions/vat-rates.

Example:

20

AdditionalTaxes
object[]

Additional taxes of the product (e.g. ÖTV), at most 3 entries; stored in list order as the product's additional tax 1, 2 and 3. A tax code can be used only once. Leave empty when the product has none.

IsOutOfUse
boolean

Whether the product is out of use. Out of use products are kept but are not offered in new records.

Example:

false

ManufacturerCode
null | string

Manufacturer code. At most 50 characters.

SupplierCode
null | string

Supplier code. At most 50 characters.

Group1
null | string

Name 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.

Group2
null | string

Name of a group 2 detail. It must either have no parent or have the Group1 detail as its parent.

Group3
null | string

Name of a group 3 detail. It must either have no parent or have the Group2 detail as its parent.

Group4
null | string

Name of a group 4 detail. It must either have no parent or have the Group3 detail as its parent.

Group5
null | string

Name of a group 5 detail. It must either have no parent or have the Group4 detail as its parent.

ShelfNumber
null | string

Shelf number. At most 20 characters.

Example:

"A-12"

Description
null | string

Description. At most 255 characters.

SerialNumberIndex
integer<int32>

Serial number index used by serial tracking.

ECommerceProductCode
null | string

Product code used by the e-commerce integration. At most 50 characters.

IsFavourite
boolean

Whether the product is marked as a favourite.

Example:

false

Gtip
null | string

Customs tariff (GTIP) number, used on export invoices. At most 20 characters.

Example:

"7318159000"

DeliveryTerm
null | string

Delivery term code used on export invoices (Incoterms, e.g. EXW, FCA, CIF). At most 10 characters.

Example:

"EXW"

PackagingType
null | string

Packaging type code used on export invoices. At most 10 characters.

Example:

"BX"

TransportMode
integer<int32>

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.

Example:

3

Brand
null | string

Brand. At most 100 characters.

Model
null | string

Model. At most 100 characters.

OriginCountryCode
null | string

Country of origin code used on export invoices (ISO 3166-1 alpha-2). At most 10 characters.

Example:

"TR"

Parameters
object[]

Custom parameter values.

Prices
object[]

Prices/discounts. UnitId must be the product's own UnitId, since the product has no second/third unit yet on create.

CriticalStock
object[]

Critical stock definitions, one per warehouse. Cannot be sent when StockType is 1 (no stock tracking).

Response

Created

Success
boolean
required

Whether the operation succeeded.

Example:

true

ResultCode
string
required

"0000" on success. On failure, the code of the first error; all errors are listed in Errors.

Example:

"0000"

Data
object
required

Response data. Null when Success is false.

Message
null | string

Error message when Success is false. Messages of all errors are joined into a single text.