Edit

[POST] .../v1/pricetype/edit

Edits a price type. Use this method to update an existing price type used by item prices, documents and discount checks. It returns row_affected and requires a positive id; when pricing fields are provided, markup must stay below 1000, round_to below 10000, max_discount not greater than 100 and name no longer than 150 characters. The caller must have price type edit permission; missing body, invalid id or field values, denied access, missing records, related-data restrictions and storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
currency_additional_id Int64 Optional Additional currency ID.
currency_id Int64 Optional Currency ID.
id Int64 Required Price type ID.
markup Decimal Optional Price type markup. The value must be less than 1000.
max_discount Decimal Optional Maximum discount. The value must not be greater than 100.
name String Optional Price type name.
round_to Decimal Optional Rounding increment. The value must be less than 10000.

Request Example

{
  "id": 4,
  "name": "Retail standard",
  "currency_id": 860,
  "currency_additional_id": 840,
  "round_to": 0.01,
  "markup": 20.00,
  "max_discount": 12.00
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}