Base URL
https://{tenant}.logzi.com/api/ticket/
Every request returns a JSON response. On success result.code == 1, on error result.code == 0. The ticket API allows creating, validating, redeeming, and closing tickets and single-use coupon codes.
/api/ticket/get
Retrieve a single ticket record by ID.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int | Ticket ID |
Example request
GET /api/ticket/get?id=1
X-API-KEY: {your_api_key}
/api/ticket/get_validate
Check the validity of a ticket code before redemption.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Ticket code to validate |
Example request
GET /api/ticket/get_validate?code=TICKET-ABC123
X-API-KEY: {your_api_key}
/api/ticket/list
Paginated list of tickets.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
list_count | int | Maximum number of records returned | |
list_offset | int | Pagination offset (default: 0) | |
list_condition | object | Filter condition object |
Example request
GET /api/ticket/list?list_offset=0&list_count=50
X-API-KEY: {your_api_key}
/api/ticket/save
Create or modify a ticket.
POST fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Basic ticket data | |
params | array | Additional parameters |
Example request
POST /api/ticket/save
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
/api/ticket/save_validate
Redeem (validate) a ticket code.
POST fields — data object
Provide the code of the ticket to be redeemed in the data object.
Example request
POST /api/ticket/save_validate
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "code": "TICKET-ABC123" } }
/api/ticket/close
Close a ticket.
POST fields — data object
Provide the ID of the ticket to be closed in the data object.
Example request
POST /api/ticket/close
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
/api/ticket/delete
Delete a ticket.
POST fields — data object
Provide the data of the ticket to be deleted in the data object.
Example request
POST /api/ticket/delete
X-API-KEY: {your_api_key}
Content-Type: application/json
{ "data": { "id": 1 } }
Create your account now,
pay later!