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 Fields: all specified must be sent
  • Exclusive Fields: 1 required but no more than 1 accepted
  • Optional Fields: all can be omitted, defaults will be used (see Data Field Types table for defaults)
actionrequired fieldsexclusive fieldsoptional fields
newEventeventId
currency
-eventName
shopUrl
coverImageUrl
coverMediaUrl
defaultNftImageUrl
defaultNftMediaUrl
latitude
longitude
startTime
endTime
callbackUrl
updateEventeventId -eventName
currency
shopUrl
coverImageUrl
coverMediaUrl
defaultNftImageUrl
defaultNftMediaUrl
latitude
longitude
startTime
endTime
callbackUrl
soldTicketeventId
ticketId
price
-imageUrl
mediaUrl
orderTime
to
updateTicket- ticketId
nftId
imageUrl
mediaUrl
resoldTicketpriceticketId
nftId
orderTime
to
scannedTicket-ticketId
nftId
orderTime
checkedInTicket-ticketId
nftId
orderTime
claimedTickettoticketId
nftId
orderTime
invalidatedTicket-ticketId
nftId
orderTime

Data field types:

data fieldtypevalidationdefault valueon blockchain?
eventIdstringup to 255 chars-no
eventNamestringup to 255 charsblank stringyes
currencystringISO 4217, exactly 3 chars - see supported currencies-yes
shopUrlstringhttp/https url, up to 255 charsblank stringyes
coverImageUrlstringhttp/https url, up to 255 charsblank stringyes
coverMediaUrlstringhttp/https url, up to 255 charsblank stringno
defaultNftImageUrlstringhttp/https url, up to 255 charsblank stringno
defaultNftMediaUrlstringhttp/https url, up to 255 charsblank stringno
latitudefloatlatitude0.0yes
longitudefloatlongitude0.0yes
startTimeintegerunsigned integer 640yes
endTimeintegerunsigned integer 640yes
callbackUrlstringhttp/https url, up to 255 chars-no
ticketIdstringup to 255 chars-yes, sha256(ticketId)
nftIdstringvalid GETProtocol NFT Id (e.g. POLYGON-123-123)-no
imageUrlstringhttp/https url, up to 255 charsblank stringno
pricestringvalid price string represented-yes
orderTimeintegerunsigned integer 64now unix timestampyes
tostringblockchain wallet address-yes

📘

Null vs Empty

On event and tickets updates with eventUpdate or ticketUpdate actions respectively, you can send the default value from the table above on non required fields to have them cleared.

You can also send the json null value i.e. "imageUrl": null or completely omit fields that are not intended to be updated.

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",
            "coverImageUrl": "https://placeimg.com/640/480/nature",
            "coverMediaUrl": "",
            "defaultNftImageUrl": "https://images.get-blockchain.io/get-protocol-default-nftimage.png",
            "defaultNftMediaUrl": "https://www.youtube.com/watch?v=cjXSeElvbss",
            "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",
            "imageUrl": "http://placeimg.com/640/480",
            "mediaUrl": "https://www.youtube.com/watch?v=cjXSeElvbss",
        }
    },
    {
        "action": "updateTicket",
        "data": {
            "ticketId": "10cd5d96-ecc1-43ae-b1bc-b248da171c92",
            "imageUrl": "http://updated.image.com/",
            "mediaUrl": "http://updated.video.com/"
        }
    },
    {
        "action": "resoldTicket",
        "data": {
            "nftId": "POLYGON-123-123",
            "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",
            "defaultNftImageUrl": "https://images.get-blockchain.io/get-protocol-default-nftimage.png"
        }
    },
    {
        "action": "checkedInTicket",
        "data": {
            "nftId": "POLYGON-123-123",
        }
    },
    {
        "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",
            "nftId": "POLYGON-123-123",
            "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",
            "nftId": "POLYGON-123-123",
            "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.

Language
Authentication
Header
Click Try It! to start a request and see the response here!