The POST /stream
endpoint allows you to register actions on your events/tickets alongside all of their relevant metadata within GET Protocol and propagate this data to the blockchain.
The accepted actions are:
newEvent
updateEvent
soldTicket
updateTicket
resoldTicket
scannedTicket
checkedInTicket
claimedTicket
invalidatedTicket
An event must first be registered before any ticket action be accepted within that event.
Per action, the following fields are accepted:
*
required
action | data fields |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data field types:
data field | type | validation | default value | on blockchain? |
---|---|---|---|---|
| string | up to 255 chars | no | |
| string | up to 255 chars | blank string | yes |
| string | ISO 4217, exactly 3 chars | yes | |
| string | url, up to 255 chars | blank string | yes |
| string | url, up to 255 chars | blank string | yes |
| float | latitude | 0.0 | yes |
| float | longitude | 0.0 | yes |
| integer | unsigned integer 64 | 0 | yes |
| integer | unsigned integer 64 | 0 | yes |
| string | url, up to 255 chars | no | |
| string | up to 255 chars | yes, sha256( | |
| string | uri, up to 255 chars | blank string | no |
| string | valid price string represented | yes | |
| integer | unsigned integer 64 | now unix timestamp | yes |
| string | blockchain wallet address | yes |
Next you can find an example payload for an event with a single ticket that went through all the possible states until being claimed by/to a ticket buyer account:
[
{
"action": "newEvent",
"data": {
"eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"eventName": "porro ut autem",
"currency": "EUR",
"shopUrl": "http://roberto.net",
"imageUrl": "https://placeimg.com/640/480/nature",
"startTime": 1652285087,
"endTime": 1652285087,
"latitude": -24.2066,
"longitude": -159.3224,
"callbackUrl": "http://callback.url/callback"
}
},
{
"action": "soldTicket",
"data": {
"eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"ticketId": "10cd5d96-ecc1-43ae-b1bc-b248da171c92",
"price": "136.91",
"uri": "http://placeimg.com/640/480"
}
},
{
"action": "updateTicket",
"data": {
"ticketId": "10cd5d96-ecc1-43ae-b1bc-b248da171c92",
"uri": "http://updated.image.com/"
}
},
{
"action": "resoldTicket",
"data": {
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"price": "466.25"
}
},
{
"action": "scannedTicket",
"data": {
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
}
},
{
"action": "updateEvent",
"data": {
"eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"imageUrl": "https://placeimg.com/640/480/tech"
}
},
{
"action": "checkedInTicket",
"data": {
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
}
},
{
"action": "claimedTicket",
"data": {
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"to": "0x72e5c6e078001644b15c3b8d56a019c8f551adc4"
}
}
]
Limits & Ordering
Each request can include up to 5000 actions. Actions are processed and their result returned in the order they are sent in the request.
A request with the previous payload should yield a response similar to:
{
"status": "success",
"data": [
{
"status": "success",
"action": "newEvent",
"eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"actionPromise": "a58b6a0c-2e59-4bb0-8b19-9a3f77c934b3"
},
{
"status": "success",
"action": "soldTicket",
"eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"ticketId": "10cd5d96-ecc1-43ae-b1bc-b248da171c92",
"actionPromise": "22709bf7-59a8-4751-82f1-06184b9dcf22"
},
{
"status": "success",
"action": "updateTicket",
"ticketId": "10cd5d96-ecc1-43ae-b1bc-b248da171c92",
"actionPromise": "3280fc95-d8fa-4b77-a375-9216f27f1df3"
},
{
"status": "success",
"action": "resoldTicket",
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"actionPromise": "d31dc1c8-641c-4c3b-a2d1-78963f9c8590"
},
{
"status": "success",
"action": "scannedTicket",
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"actionPromise": "c9d73b07-8a85-4198-af4d-f6e3fd7a4b8f"
},
{
"status": "success",
"action": "updateEvent",
"eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"actionPromise": "a487b584-03a9-45fc-995e-badb42250c25"
},
{
"status": "success",
"action": "checkedInTicket",
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"actionPromise": "c545e395-e13e-4969-9b50-52c14ed782f6"
},
{
"status": "success",
"action": "claimedTicket",
"ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
"actionPromise": "c2e8df23-6411-46e0-8ec2-61cb0a29f6af"
}
]
}
Save the promise
Each successful action request will return you an
actionPromise
. Save it on your data model such that you can use it later to query for each action request status.