Receipt.ValidatePosition
Validates an item's data before it is added to a receipt.
Use this method for preliminary validation of the ICPS code, packaging, barcode, and marking code.
When a marking code is validated externally, the response is reused for 30 minutes for requests with the same data. Sales (is_sale = true) and refunds (is_sale = false) are cached separately. Service availability errors are not cached; the cache is cleared when REGOS: VCR restarts.
Input parameters
| Name | Data type | Required | Parameter description |
|---|---|---|---|
| icps | string | Required | Item's ICPS code. Length: 17 characters |
| package_code | string | Optional | Item's packaging code. If omitted, REGOS: VCR attempts to determine the packaging code from the ICPS code |
| label | string | Optional / required for products subject to marking | Mandatory marking code |
| barcode | string | Required | Item's barcode |
| is_sale | bool | Optional | true: validate for a sale; false: validate for a refund. Default: true |
Request example
{
"id": 1,
"method": "Receipt.ValidatePosition",
"params": {
"icps": "02202002001010036",
"package_code": "1218868",
"label": "010544900000099621TEST00193ABCD",
"barcode": "5449000000996",
"is_sale": true
},
"auth": "a2Fzc2E6a2FzNjU0MzIx",
"jsonrpc": "2.0"
}
Output parameters
The method returns true if validation succeeds.
Response example: the item is valid
{
"id": 1,
"ok": true,
"result": true,
"jsonrpc": "2.0"
}
On error, ok = false, and result contains the error code and description.
Response example: error
{
"id": 1,
"ok": false,
"result": {
"error": 701003,
"description": "Некорректные входные данные (params.icps not specified)"
},
"jsonrpc": "2.0"
}
Local marking code control
When is_sale = true, REGOS: VCR also checks the marking code against the local sales records. It returns 704043 for a unit already sold and 704044 for an unfinished operation with an unconfirmed result. The check runs independently of external marking code validation and does not reserve the product.
When is_sale = false, the method validates the item data for a refund but does not identify the original receipt or release the marking code. These actions occur when the refund receipt is successfully registered. Validating a single item does not guarantee that the subsequent receipt will be processed successfully.
Local marking records accumulate only for sales registered after upgrading to version 2026-10-30. Earlier receipts are not used to initialize these records.