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 CustomerGroupId without clearing an existing CustomerId returns a scope conflict (2314).

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 for customer endpoints; 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

CurrencyId
null | string<uuid>

Required. ID of a currency from GET /api/v1/definitions/currencies.

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

UnitId
null | string<uuid>

Required. Must be one of the product's own units: its main unit (UnitId on the product) or, for products with a second/third unit, one of those.

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.

CustomerId
null | string<uuid>

Scope: applies only to this customer. Cannot be combined with CustomerGroupId or CustomerGroupDetailId. Leave every scope field empty for a general price.

CustomerGroupId
null | string<uuid>

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

CustomerGroupDetailId
null | string<uuid>

Scope: narrows CustomerGroupId to customers with this group detail. Requires CustomerGroupId 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.