Get

[POST] .../v1/pricetype/get

Returns price type information. Use this method to retrieve price types for item pricing, sales documents, discount validation and price-list selectors. The response returns paged PriceType records with next_offset and total and supports filters, sort_orders, search, limit and offset for ids, currency ids, names, markup, rounding, discount and update-date selection. The caller must have price type select permission; missing body, denied access, invalid filters or sorting and persistent storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
filters Array of Filter Optional Optional filters by fields available for this API method.
limit Int32 Optional Number of result items returned by the request.
offset Int32 Optional Offset from the beginning of the result set.
search String Optional Search string for the name field.
sort_orders Array of PriceType_SortOrder Optional Output parameter sorting.

Filterable Fields

Field Type Description
currency_id int Currency ID.
id int Price type IDs.
name string

Sortable Fields

Field
id
last_update
markup
max_discount
name
round_to

Request Example

{
  "filters": [
    {
      "Field": "name",
      "Operator": "Like",
      "Value": "Retail"
    }
  ],
  "sort_orders": [
    {
      "column": "name",
      "direction": "ASC"
    }
  ],
  "limit": 50,
  "offset": 0
}

Response Parameters

Name Type Description
next_offset Int32 Offset for the next data page.
ok Boolean Indicates whether the request completed successfully.
result Array of PriceType Result array.
total Int64 Total number of result items.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 4,
      "name": "Retail",
      "round_to": 0.01,
      "markup": 25.00,
      "max_discount": 10.00,
      "currency": {
        "id": 860,
        "code_num": 860,
        "code_chr": "UZS",
        "name": "Uzbek sum",
        "exchange_rate": 1.00000000,
        "is_base": true,
        "deleted": false,
        "last_update": 1712345600
      },
      "currency_additional": {
        "id": 840,
        "code_num": 840,
        "code_chr": "USD",
        "name": "US dollar",
        "exchange_rate": 12600.25000000,
        "is_base": false,
        "deleted": false,
        "last_update": 1712345600
      },
      "last_update": 1712345600
    }
  ],
  "next_offset": 0,
  "total": 1
}