Order API

Manage customer orders — retrieval, creation, modification, closing, marking as fulfilled, and document download

Base URL

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

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

GET /api/order_in/get

Retrieve a single customer order by identifier, with full details.

Query parameters

ParameterTypeRequiredDescription
idintUnique identifier of the order

Example request

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

Paginated retrieval of the customer order list with filtering and sorting options.

Query parameters

ParameterTypeRequiredDescription
list_offsetintPagination offset (default: 0)
list_countintNumber of records per page
list_sort[field]stringName of the field to sort by
list_sort[sort]stringSort direction: ASC or DESC
list_condition[identify]stringFilter by identifier (LIKE)
list_condition[company_name]stringFilter by partner 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)
list_condition[partner_id]intFilter by partner identifier

Example request

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

Create or update a customer order. Use data[id] = 0 for a new record.

POST fields — data object

FieldTypeRequiredDescription
idint0 = new order, >0 = update
company_idintCompany identifier
company_user_idintResponsible employee ID
company_address_idintCompany site ID
currency_idintCurrency identifier
partner_idintPartner/customer identifier
partner_shipping_idintPartner shipping address ID
date_performdatePerformance date (YYYY-MM-DD)
comment_topstringComment visible to the customer
comment_bottomstringInternal comment
jobnumber_idintJob number identifier
project_idintProject identifier
itemarrayArray of items (see below)

Item fields — data[item][]

FieldTypeRequiredDescription
product_idintProduct identifier
quantityfloatQuantity
pricefloatNet unit price
tax_idintVAT rate identifier
price_discountfloatDiscount percentage
removeint1 = delete the item on update

POST fields — params object (optional)

FieldTypeRequiredDescription
closeint1 = automatically close after saving
downloadint1 = generate PDF after saving

Example request

POST /api/order_in/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,
    "partner_id": 12,
    "date_perform": "2024-07-15",
    "comment_top": "Kérjük sürgős kezelést.",
    "item": [
      { "product_id": 5, "quantity": 10, "price": 8000, "tax_id": 2 }
    ]
  },
  "params": { "close": 0, "download": 0 }
}
POST /api/order_in/delete

Delete a customer order. Only an order with open status can be deleted.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the order to delete

Example request

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

{ "data": { "receipt_id": 45 } }
POST /api/order_in/close

Close a customer order. Only an order that is open (status_id = 1) can be closed.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the order to close

Example request

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

{ "data": { "receipt_id": 45 } }
POST /api/order_in/success

Mark a closed customer order as fulfilled. Can only be called on an order with closed status.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the order to fulfill (closed status only)

Example request

POST /api/order_in/success
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "receipt_id": 45 } }
GET /api/order_in/download

Download the customer order document in various formats.

Query parameters

ParameterTypeRequiredDescription
receipt_idintIdentifier of the order
file_typestringpdf, pdf-string, pdf-string-sample, stream
languagestringTemplate language folder name
template_idintCustom print template ID

Example request

GET /api/order_in/download?receipt_id=45&file_type=pdf
X-API-KEY: {your_api_key}
POST /api/order_in/change_customer_status

Change the customer status of a customer order. An integration webhook is triggered automatically unless disabled.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the order
customer_status_idintIdentifier of the new customer status
no_integration_eventint1 = do not trigger the integration webhook event

Example request

POST /api/order_in/change_customer_status
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "receipt_id": 45, "customer_status_id": 3 } }
POST /api/order_in/save_shipping

Change an order's shipping method and payment method. Optionally also updates the shipping address details if partner_address_id is provided.

POST fields — data object

FieldTypeRequiredDescription
receipt_idintIdentifier of the order
shipping_idintIdentifier of the new shipping method (db_shipping.id)
paymod_idintIdentifier of the new payment method
partner_address_idintIf > 0, updates the partner address record with the address fields below
country_idintCountry identifier
zipstringPostal code
citystringCity
addressstringStreet name
address_numberstringHouse number — dots are automatically removed
address_buildingstringBuilding — dots are automatically removed
address_floorstringFloor — dots are automatically removed
address_doorstringDoor — dots are automatically removed
address_stairwellstringStairwell — dots are automatically removed
districtstringDistrict — dots are automatically removed
address_user_namestringName of the address owner
address_commentstringAddress comment

Example request — shipping and payment method change only

POST /api/order_in/save_shipping
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "receipt_id": 45, "shipping_id": 3, "paymod_id": 2 } }

Example request — shipping method change + address update

POST /api/order_in/save_shipping
X-API-KEY: {your_api_key}
Content-Type: application/json

{ "data": { "receipt_id": 45, "shipping_id": 3, "paymod_id": 2, "partner_address_id": 12, "country_id": 1, "zip": "1051", "city": "Budapest", "address": "Vörösmarty tér", "address_number": "7", "district": "V" } }

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!