[POST] .../v1/operatingcash/editchequetemplate
Edits template cheque. Use this method to update a retail cash register cheque template after retrieving the existing template with OperatingCash/GetChequeTemplate. It returns row_affected and validates id, template JSON length, optional logo dimensions, receipt layout fields, required variables, blocks, barcode dimensions and referenced template image. The caller must have operating cash edit permission; missing body, invalid template JSON, invalid layout values, denied access, missing records and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | System group ID. |
| logo | Int64 | Optional | Cheque template logo file ID. |
| logo_height | Int32 | Optional | Logo output height in pixels. Valid values are 1 through 600 when provided. |
| logo_width | Int32 | Optional | Logo output width in pixels. Valid values are 1 through 600 when provided. |
| template | String | Required | Cheque template as a JSON string. Maximum length is 65,535 characters. |
Request Example
{
"id": 21,
"logo": null,
"logo_width": 120,
"logo_height": 48,
"template": "{\u0022width\u0022:80,\u0022DPI\u0022:203,\u0022margin_left\u0022:0,\u0022margin_right\u0022:0,\u0022img_id\u0022:0,\u0022chars_per_line\u0022:42,\u0022show_storno_position\u0022:true,\u0022strikeout_storno_position\u0022:true,\u0022show_storno_payment\u0022:true,\u0022strikeout_storno_payment\u0022:true,\u0022variables\u0022:{\u0022change\u0022:\u0022Change\u0022,\u0022type_sale\u0022:\u0022Sale\u0022,\u0022type_return\u0022:\u0022Return\u0022,\u0022tax_without_vat\u0022:\u0022Without VAT\u0022},\u0022header\u0022:[{\u0022text\u0022:\u0022REGOS Market\u0022,\u0022interval\u0022:0,\u0022font\u0022:{\u0022name\u0022:\u0022Lucida Console\u0022,\u0022size\u0022:8},\u0022alignment\u0022:1}],\u0022positions\u0022:[{\u0022text\u0022:\u0022{item_name}\u0022,\u0022interval\u0022:0,\u0022font\u0022:{\u0022name\u0022:\u0022Lucida Console\u0022,\u0022size\u0022:8},\u0022alignment\u0022:0}],\u0022position_totals\u0022:[{\u0022text\u0022:\u0022Total: {total}\u0022,\u0022interval\u0022:0,\u0022font\u0022:{\u0022name\u0022:\u0022Lucida Console\u0022,\u0022size\u0022:8},\u0022alignment\u0022:2}],\u0022payments\u0022:[{\u0022text\u0022:\u0022{payment_type}: {amount}\u0022,\u0022interval\u0022:0,\u0022font\u0022:{\u0022name\u0022:\u0022Lucida Console\u0022,\u0022size\u0022:8},\u0022alignment\u0022:0}],\u0022payment_totals\u0022:[{\u0022text\u0022:\u0022Paid: {paid}\u0022,\u0022interval\u0022:0,\u0022font\u0022:{\u0022name\u0022:\u0022Lucida Console\u0022,\u0022size\u0022:8},\u0022alignment\u0022:2}],\u0022footer\u0022:[{\u0022text\u0022:\u0022Thank you\u0022,\u0022interval\u0022:0,\u0022font\u0022:{\u0022name\u0022:\u0022Lucida Console\u0022,\u0022size\u0022:8},\u0022alignment\u0022:1}]}"
}
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
}
}