Ticket API

Managing tickets and coupon codes

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.

GET /api/ticket/get

Retrieve a single ticket record by ID.

Query parameters

ParameterTypeRequiredDescription
idintTicket ID

Example request

GET /api/ticket/get?id=1
X-API-KEY: {your_api_key}
GET /api/ticket/get_validate

Check the validity of a ticket code before redemption.

Query parameters

ParameterTypeRequiredDescription
codestringTicket code to validate

Example request

GET /api/ticket/get_validate?code=TICKET-ABC123
X-API-KEY: {your_api_key}
GET /api/ticket/list

Paginated list of tickets.

Query parameters

ParameterTypeRequiredDescription
list_countintMaximum number of records returned
list_offsetintPagination offset (default: 0)
list_conditionobjectFilter condition object

Example request

GET /api/ticket/list?list_offset=0&list_count=50
X-API-KEY: {your_api_key}
POST /api/ticket/save

Create or modify a ticket.

POST fields

FieldTypeRequiredDescription
dataobjectBasic ticket data
paramsarrayAdditional parameters

Example request

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

{ "data": { "id": 1 } }
POST /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" } }
POST /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 } }
POST /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 } }

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!