Ticbolt API Integration
  • Introduction
  • ✨GET STARTED
    • Create Account
    • Create API project
    • Access control
  • 🎯API ENDPOINTS
    • POST - createEvent
    • GET - eventInfo
    • POST - buyTickets
    • GET - userPortfolio
    • POST - userSignedMessage
  • 🧳Webhooks
    • Webhook - createEventStatus
    • Webhook - buyTicketStatus
Powered by GitBook
On this page
  1. API ENDPOINTS

POST - buyTickets

Users can buy the ticket using buyTickets API.

PreviousGET - eventInfoNextGET - userPortfolio

Last updated 1 year ago

The API is an asynchronous call, the status and details of the NFT tickets created at block chain will only obtained using the webhook .

Http method

POST

URL endpoint

https://api.ticbolt.com/v1/buyTickets

Request header

API token - The token can be easily copied from the partner dashboard for the project created.

Request body

Json object with the details of the event to be created.

Example structure :

{
    "usersAddress": "[email protected]",
    "contractAddress": "0xabcde12345...",
    "ticketTypes": ["ticketType1", "ticketType2", ...],
    "amount": [2, 3, ...],
    "seatNumber": ["A1", "B2", ...]
}

Parameter description :

  • userEmailAddress (String): The email address of the user making the purchase.

  • ticketTypes (Array of Strings): An array containing the types of tickets the user wishes to purchase.

  • amount (Array of Integers): An array specifying the amount for each ticket type. It should align with the ticketTypes array. For instance, if "Type1" corresponds to 2 tickets, "Type2" corresponds to 3 tickets, the array would look like [2, 3].

  • seatNumber (Array of Strings): An array that indicates the seat numbers for each ticket type, if applicable. This is required if the ticketType is seated.

Response:

The API will respond with a JSON payload. Depending on the outcome of the request, the structure will differ:

Successful Response:

{
    "status": "success",
    "ticketTransactionHash": "0xabcdef12345..."
}

Parameter description :

Failed Response:

{
    "status": "fail",
    "message": "Descriptive error message"
}

Error Response:

{
    "status": "error",
    "message": "Exception or error message"
}

contractAddress (String): The contract address of the event received after request.

ticketTransactionHash : On a successful request placed on to the blockchain, the server returns a transaction hash. The actual details, if ticket created successfully, will only be notified using the API.

🎯
buyTicketStatus
createEvent
buyTicketStatus