Tickets


Create a new ticket

Creates new ticket on the Valicit platform and persists it on the blockchain.

When a request to create a ticket is received, a new transaction to mint a token gets sent to the blockchain.

Because of the nature of blockchains the operation can take some time. For this reason, each request responds with a unique ticket uuid and has a "creating" status.

As soon as the actual blockchain transaction gets stored on the blockchain, the status of the ticket changes to "active" and is ready to be used. Usually, it takes up to 30 seconds to complete.

After the ticket becomes active, it becomes available to get validated and has populated values for the contractId, tokenId, ipfsUri and transactionHash properties.

When creating a ticket, a new user resource data is sent to create a new user and assign it to the ticket, or an existing user's uuid is sent.


List all tickets

Get a list of all tickets, optionally filtered by user's uuid.

By default, the response contains an object with a collection of all tickets with any status.


Get a ticket information

Gets the ticket information from Valicit platform

When a request to get a ticket information is received, the response object will contain all the information about the ticket and its current status.

This method should be used to periodically check if ticket status changed from "creating" to "active" although not mandatory.

If the actual ticket validation process happens hours or days after the purchase, you can safely assess that the ticket is already active and ready to be validated.


Validate a ticket

Makes a one-time validation operation, after which ticket becomes validated (or used).

When a request to validate a ticket is received, the status of the ticket resource changes to “validated”.

It is a one-time operation and should be used after the user, showing the QR code, is getting verified by the vendor app.


Delete a ticket

Deletes the ticket from the Valicit platform and from the blockchain.

When a request to delete a ticket is received, it gets deleted from the Valicid platform and a new transaction to burn a token gets sent to the blockchain.

The response object property status changes to “deleted”. The ticket becomes unavailable in the list of user’s tickets immediately and can’t be validated. The actual blockchain operation runs in the background and takes up to 30 seconds to complete.

This method can be used in cases of ticket refunds.

Was this helpful?