1. MiniPOS Invoice API
UCS MiniPOS API - PUBLIC
  • MIDserver
    • MiniPOS Invoice API
      • ValidateInvoice
        POST
      • New Sales Invoice - Basic
        POST
      • New Refund Invoice - Basic
        POST
      • New Sales Invoice - Advanced
        POST
      • New Sales Invoice + Slip after payment
        POST
      • New Non fiscal slip
        POST
      • Get Invoice List
        GET
      • Get Invoice by ID
        GET
  • CRMserver
    • MiniPOS Products API
      • GET Products List
      • GET Product by ID
      • DELETE Product by ID
      • Change Product by ID
      • Create new Product Basic
      • Create new Product Advanced
    • MiniPOS Categories API
      • Create new Category
    • MiniPOS Shift Data API
      • GET shifts
      • GET receipts
  1. MiniPOS Invoice API

New Sales Invoice + Slip after payment

POST
/api/invoice/new

Request

Body Params application/json

Examples

Responses

🟢200
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
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
        }
    ]
}'
Response Response Example
{
    "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": []
}
Modified at 2026-04-15 12:52:15
Previous
New Sales Invoice - Advanced
Next
New Non fiscal slip
Built with