In-Store Sales API

Managing cash register / in-store sales receipts — retrieval, saving, closing and document download

Base URL

https://{tenant}.logzi.com/api/cash_register/

Every request returns a JSON response. On success result.code == 1, on failure result.code == 0.

GET /api/cash_register/get

Retrieves a single in-store sales receipt by identifier, with the full line item list.

Query parameters

ParameterTypeRequiredDescription
idintUnique identifier of the receipt

Example request

GET /api/cash_register/get?id=101
X-API-KEY: {your_api_key}
GET /api/cash_register/list

Retrieves a paginated list of in-store sales receipts with filtering options.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_countintNumber of records per page
list_condition[identify]stringFilter by receipt number (LIKE)
list_condition[company_name]stringFilter by customer name (LIKE)
list_condition[status_id]intFilter by status
list_condition[date_create_from]dateCreation date — from (YYYY-MM-DD)
list_condition[date_create_to]dateCreation date — to (YYYY-MM-DD)

Example request

GET /api/cash_register/list?list_offset=0&list_condition[status_id]=1
X-API-KEY: {your_api_key}
POST /api/cash_register/save

Creates or updates an in-store sales receipt. For a new receipt use data[id] = 0.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new receipt, >0 = update
company_idintCompany identifier
company_user_idintID of the responsible employee
company_address_idintSite identifier
currency_idintCurrency identifier
paymod_idintPayment method identifier
partner_idintCustomer partner identifier
date_performdateFulfillment date (YYYY-MM-DD)
comment_topstringComment
itemarrayArray of line items (see below)

Line item fields — data[item][]

FieldTypeRequiredDescription
product_idintProduct identifier
quantityfloatQuantity
pricefloatGross unit price
tax_idintVAT rate identifier
store_idintWarehouse identifier
removeint1 = remove item during update

Example request

POST /api/cash_register/save
X-API-KEY: {your_api_key}
Content-Type: application/json

{
  "data": {
    "id": 0,
    "company_id": 1,
    "company_user_id": 3,
    "company_address_id": 1,
    "currency_id": 1,
    "paymod_id": 1,
    "item": [
      { "product_id": 5, "quantity": 2, "price": 3990, "tax_id": 2 }
    ]
  }
}
POST /api/cash_register/delete

Deletes an in-store sales receipt. Only a receipt with open status can be deleted.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the receipt to delete

Example request

POST /api/cash_register/delete
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "receipt_id": 101 } }
POST /api/cash_register/close

Closes an in-store sales receipt. Upon closing, the stock movement and financial entry take place. Only a receipt with open status (status_id=1) can be closed.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the receipt to close

Example request

POST /api/cash_register/close
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "receipt_id": 101 } }
GET /api/cash_register/download

Downloads the document of an in-store sales receipt in various formats (PDF, printable receipt).

Query parameters

ParameterTypeRequiredDescription
receipt_idintIdentifier of the receipt
file_typestringpdf, pdf-string, pdf-thermal, pos-thermal, stream
languagestringName of the template language folder
template_idintCustom print template ID

Example request

GET /api/cash_register/download?receipt_id=101&file_type=pdf
X-API-KEY: {your_api_key}

Get in touch with us

Interested in our software? Feel free to write to us!

Need help?

If you can't find the answer and need assistance

Create your account now,
pay later!

Try it free for 3 days, no risk, no obligation!