Add

[POST] .../v1/docsetprice/add

Creates a new document setting prices. Use this method to create a price setting document that will later receive item price rows through SetPriceOperation/Add, SetPriceOperation/CopyOperationsFromDocPurchase or related fill methods. The request body must contain price_type_id; description is optional and limited to 300 characters and attached_user_id is optional because the persistent layer writes it only when a positive value is provided. The response returns new_id for the created document and the current request user must have price setting document add permission. Missing body, invalid price_type_id, denied access, unavailable tariff, foreign-key failures, database failures or webhook failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
attached_user_id Int64 Optional Responsible user ID. If omitted or 0, the API leaves the responsible user unset.
description String Optional Additional description. Maximum length is 300 characters.
price_type_id Int64 Required Price type ID in the price setting document.

Request Example

{
  "price_type_id": 3,
  "description": "January retail price update"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Insert Created record result.

Response Example

{
  "ok": true,
  "result": {
    "new_id": 6101
  }
}