EditChequeTemplate

[POST] .../v1/operatingcash/editchequetemplate

Updates a cash register receipt template. Selects validation by the stored template type: 1 for sale/precheck, 2 for X/Z reports, 3 for shift opening, 4 for cash-in/out. No type parameter is required. Requires operating cash edit permission. Returns row_affected; invalid templates, denied access and storage failures use HTTP 200 ErrorResult.

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 height in pixels, 1 through 600. Zero clears the height only when no logo remains. Omitted or null preserves the saved height.
logo_width Int32 Optional Logo width in pixels, 1 through 600. Zero clears the width only when no logo remains. Omitted or null preserves the saved width.
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
  }
}