Skip to main content
PATCH
Partially update price
Send only the fields you want to change; fields you do not send keep their current values. Rules and examples: partial update. Validation runs on the whole merged record: for example, sending only CustomerGroup without clearing an existing CustomerCode returns a scope conflict (2314).

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

Path Parameters

productId
string<uuid>
required

Product ID.

priceId
string<uuid>
required

Price ID.

Body

PriceType
integer<int32>

Required. 1: Purchase, 2: Sales.

Example:

2

Price
number<double>

Required. Must be greater than 0.

Example:

450

CurrencyCode
null | string

Required. Currency code from GET /api/v1/definitions/currencies.

Example:

"TRY"

IncludesVat
boolean

Whether Price includes VAT.

Example:

false

Discount
number<double>

Discount amount or percentage, depending on IsDiscountPercentage. Cannot be negative.

Example:

10

IsDiscountPercentage
boolean

Whether Discount is a percentage (0-100) rather than a fixed amount. Defaults to true.

Example:

true

UnitCode
null | string

Required. Unit code (the unit's universal code, for example C62, or its name when it has no universal code). It must be one of the product's own units: its main unit or, for products with a second/third unit, one of those.

Example:

"C62"

StartDate
null | string<date-time>

Required. Start of the validity period.

EndDate
null | string<date-time>

Required. End of the validity period. Must be after StartDate.

CustomerCode
null | string

Scope: applies only to the customer with this customer code. Cannot be combined with CustomerGroup or CustomerGroupDetail. Leave every scope field empty for a general price.

CustomerGroup
null | string

Scope: applies to every customer in this group (group name from GET /api/v1/customers/groups), unless CustomerGroupDetail narrows it to one detail. Cannot be combined with CustomerCode.

CustomerGroupDetail
null | string

Scope: narrows CustomerGroup to customers with this group detail (detail name). Requires CustomerGroup to be set.

Description
null | string

Description. At most 255 characters.

Response

OK

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
Message
null | string

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