curl --location --request POST '/api/invoice/new' \
--header 'Content-Type: application/json' \
--data-raw '{
"invoice_no": "XXX-01-257",
"mode": 1,
"pos_id": null,
"discount": 1.00,
"discount_type": "amount",
"comment": "SOMECOMPANYNAME\nREG.NR 4000000000\nStreetname 1, SomeCity, LV1000",
"print_paper_receipt": null,
"keep_drawer_closed": false,
"is_auto_open": true,
"info": {
"header": [
{
"kind": "text",
"content": "Header info1"
},
{
"kind": "barcode",
"code": "1234567890123",
"type": 2,
"align": 0,
"height": 40,
"width": 2,
"text_position": 2
},
{
"kind": "text",
"content": "Header info2"
}
],
"footer": [
{
"kind": "barcode",
"code": "0000000000003",
"type": 2
}
],
"slip": [
{
"kind": "escpos",
"content": ["1D2122", "1D4201", "1D4201"]
},
{
"kind": "text",
"content": " COUPON "
},
{
"kind": "escpos",
"content": ["1B40"]
},
{
"kind": "text",
"content": "The text line should not be wider than the"
},
{
"kind": "text",
"content": "maximum character width of the printer"
},
{
"kind": "barcode",
"code": "1234567890123",
"type": 2
}
],
"customer": {
"phone": "+37199999999",
"email": "somename@somedomain.com"
}
},
"rows": [
{
"code": "0001",
"text": "Item name 1",
"quantity": 3,
"price": 2.34,
"tax": 0,
"fiscal_section": 1,
"discount": 5,
"discount_type": "percent",
"is_free_price": true,
"is_weight": true,
"payload": "Some test information for payload here..",
"info": {
"blocks": [
{
"kind": "text",
"content": "Some text here1"
},
{
"kind": "barcode",
"type": 101,
"code": "1234567890123"
},
{
"kind": "text",
"content": "Some text here2"
}
]
}
},
{
"code": "02abc",
"text": "Item name abc 2",
"quantity": 5,
"init_quantity": 0,
"price": 2.1,
"tax": 5,
"fiscal_section": 20,
"discount": 0,
"discount_type": "amount"
}
],
"payments": [
{
"method_id": 3,
"method_name": "Custom payment name",
"amount": null
},
{
"method_id": 1,
"amount": 5
}
]
}'{
"id": 48,
"mode": 1,
"station": null,
"invoice_no": "XXX-01-257",
"discount": 1,
"discount_type": "amount",
"created_at": "2026-02-17T16:01:13.304529",
"updated_at": "2026-02-17T16:01:13.304529",
"printed_at": null,
"print_station": null,
"print_pos_id": null,
"print_chassis_id": null,
"check_num": null,
"total_sum": 0,
"changed_sum": 0,
"status": 10,
"comment": "SOMECOMPANYNAME\nREG.NR 4000000000\nStreetname 1, SomeCity, LV1000",
"keep_drawer_closed": false,
"print_paper_receipt": null,
"is_auto_open": true,
"report": null,
"common_id": null,
"synchronized_at": null,
"info": {
"header": [
{
"kind": "text",
"content": "Header info1"
},
{
"kind": "barcode",
"code": "1234567890123",
"type": 2,
"align": 0,
"height": 40,
"width": 2,
"text_position": 2
},
{
"kind": "text",
"content": "Header info2"
}
],
"footer": [
{
"kind": "barcode",
"code": "0000000000003",
"type": 2
}
],
"slip": [
{
"kind": "escpos",
"content": [
"1D2122",
"1D4201",
"1D4201"
]
},
{
"kind": "text",
"content": " COUPON "
},
{
"kind": "escpos",
"content": [
"1B40"
]
},
{
"kind": "text",
"content": "The text line should not be wider than the"
},
{
"kind": "text",
"content": "maximum character width of the printer"
},
{
"kind": "barcode",
"code": "1234567890123",
"type": 2
}
],
"customer": {
"phone": "+37199999999",
"email": "somename@somedomain.com"
}
},
"status_name": "New",
"station_group": "1",
"rows": [
{
"id": 365,
"invoice": 48,
"code": "0001",
"text": "Item name 1",
"quantity": 3,
"maxquantity": 0,
"init_quantity": 3,
"price": 2.34,
"is_free_price": true,
"is_weight": true,
"tax": 0,
"fiscal_section": 1,
"fiscal_section_name": "Nodaļa 1",
"discount": 5,
"discount_type": "percent",
"payload": "Some test information for payload here..",
"info": {
"blocks": [
{
"kind": "text",
"content": "Some text here1"
},
{
"kind": "barcode",
"type": 101,
"code": "1234567890123"
},
{
"kind": "text",
"content": "Some text here2"
}
]
},
"tax_rate": 21
},
{
"id": 366,
"invoice": 48,
"code": "02abc",
"text": "Item name abc 2",
"quantity": 5,
"maxquantity": 0,
"init_quantity": 5,
"price": 2.1,
"is_free_price": false,
"is_weight": false,
"tax": 5,
"fiscal_section": 20,
"fiscal_section_name": "Nodaļa 20",
"discount": 0,
"discount_type": "amount",
"payload": null,
"info": {},
"tax_rate": 0
}
],
"payments": [
{
"id": 76,
"invoice": 48,
"method": 3,
"specific_method_name": "Custom payment name",
"amount": null,
"registered_at": null
},
{
"id": 77,
"invoice": 48,
"method": 1,
"specific_method_name": null,
"amount": 5,
"registered_at": null
}
],
"receipts": []
}