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
userId
price
-imageUrl
mediaUrl
orderTime
to
metadataAttributes
name
description
updateTicket- ticketId
nftId
imageUrl
mediaUrl
metadataAttributes
resoldTicketuserId
price
ticketId
nftId
orderTime
to
scannedTicket-ticketId
nftId
orderTime
checkedInTicket-ticketId
nftId
orderTime
claimedTicketto or userId
(both also accepted)
ticketId
nftId
orderTime
invalidatedTicket-ticketId
nftId
orderTime

Note: On resoldTicket actions, the userId should represent the user that has just bought the ticket. It must be a different user identifier from the user that held the ticket previous to the resale (sent in the previous soldTicket or resoldTicket action for that ticket)

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)
userIdstringup to 255 chars-no
nftIdstringvalid GETProtocol NFT Id (e.g. POLYGON-123-123)-no
imageUrlstringhttp/https url, up to 255 charsblank stringno
mediaUrlstringhttp/https url, up to 255 charsblank stringno
pricestringvalid price string represented-yes
orderTimeintegerunsigned integer 64now unix timestampyes
tostringblockchain wallet address-yes
metadataAttributesjsonOpensea metadata attributes standard-yes
namestringup to 128 chars{eventname}-{tokenid}yes
descriptionstringup to 10240 charsEvent Collectible #{tokenId} Issued for {eventname}{shopUrl}) by {intergratorName}. Powered by GET Protocol.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.

Data Field Details

data fielddetail
eventIdEvent ID reference, created by the api caller, to indicate how this event is referenced in all stream requests where it is required.

For example, if you send a newEvent request with the field eventId="test-event", then a soldTicket request with the field eventId="test-event will mint tickets on that newly created event. This field must be unique per api caller.
eventNameThe name of the event, created by the api caller. This name will be publicly available.
currencyThe main currency used to sell the tickets for this event. All price fields sent will be assumed to be in this currency.
shopUrlThe url for the main shop/page where tickets where sold from.
coverImageUrlThe main cover image url for the event. E.g. a .jpg url
coverMediaUrlThe main cover media url for the event. E.g. a youtube.com or .mp4 url
defaultNftImageUrlThe image url to use on all tickets minted for the event, if the ticket itself doesn't specify one.
defaultNftMediaUrlThe media url to use on all tickets minted for the event, if the ticket itself doesn't specify one.
latitudeThe latitude where the event will take place.
longitudeThe longitude where the event will take place.
startTimeThe unix timestamp of when the event will start.
endTimeThe unix timestamp of when the event will end.
callbackUrlThe url where GETProtocol should send callbacks to. This url must be publicly reachable without authentication and should return a 200 OK on successful processing of a callback. See Callbacks for more detail on the sent callbacks and their data.
ticketIdTicket ID reference, created by the api caller, to indicate how this ticket is referenced in all stream requests where it is required.

For example, if you send a soldTicket request with the field ticketId="test-ticket", then an invalidateTicket request with the field ticketId="test-ticket" will invalidate the newly created ticket. This field must be unique per api caller.
userIdUser Id reference, created by the api caller, to indicate to which user the ticket refers to.
nftIdGETProtocol generated NFT Id. This field can be used, as an alternative to ticketId, to identify the ticket the request refers to in the case that the api caller doesn't have the ticketId available. This field is generated by GETProtocol and is publicly available on the blockchain.
imageUrlThe main image url for the ticket. E.g. a .jpg url.
mediaUrlThe main media url for the ticket. E.g. a youtube.com or .mp4 url.
priceThe price the ticket was sold for.
orderTimeThe unix timestamp of when the ticket was sold.
toThe user owned custom wallet address. This field should only be used whenever the api caller knows the wallet address of the user the ticket was sold or resold to. In case the api caller wants to let the tickets be minted to a new user wallet, this field should not be sent.
metadataAttributesAdditional metadata attributes of the ticket. For more details on how these metadata attributes should be constructed for proper display in OpenSea, please check this page.
nameThe name of the ticket, created by the api caller. This name will be publicly available.
descriptionThe description of the event, created by the api caller. This name will be publicly available

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",
						"userId": "48d68f38-1376-4eb4-96a3-6bd65efce492",
            "name": "ticket abc",
            "description": "the description for ticket abc",
            "price": "136.91",
            "imageUrl": "http://placeimg.com/640/480",
          	"mediaUrl": "https://www.youtube.com/watch?v=cjXSeElvbss",
          	"metadataAttributes": "[{\"trait_type\":\"Ticket Type\", \"value\":\"Early bird\"},{\"display_type\":\"boost_number\", \"trait_type\":\"Ticket power\", \"value\":\"3\"}]"
        }
    },
    {
        "action": "soldTicket",
        "data": {
            "eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
            "ticketId": "719cf724-75c0-4fb4-ba4e-2f6cd67a328e",
            "price": "15.00"
        }
    },
    {
        "action": "soldTicket",
        "data": {
            "eventId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
            "ticketId": "4c5bb3f1-d281-4774-a08a-b34813126f03",
            "price": "10.00"
        }
    },
    {
        "action": "updateTicket",
        "data": {
            "ticketId": "10cd5d96-ecc1-43ae-b1bc-b248da171c92",
            "name": "ticket abc",
            "description": "the description for ticket abc",
            "imageUrl": "http://updated.image.com/",
          	"mediaUrl": "http://updated.video.com/",
          	"metadataAttributes": "[{\"trait_type\":\"Ticket Type\", \"value\":\"Early bird\"},{\"display_type\":\"boost_number\", \"trait_type\":\"Ticket power\", \"value\":\"4\"}]"          
        }
    },
    {
        "action": "resoldTicket",
        "data": {
            "nftId": "POLYGON-123-123",
	          "userId": "54c28708-9406-4bc6-b609-bee17e051173",
            "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"
        }
    },
    {
        "action": "claimedTicket",
        "data": {
            "ticketId": "719cf724-75c0-4fb4-ba4e-2f6cd67a328e",
            "userId": "138b694b-7d77-4117-a337-4c11f0723573"
        }
    },
    {
        "action": "claimedTicket",
        "data": {
            "ticketId": "1b15b541-7d60-4ae8-b41f-aca6b981a6e7",
            "userId": "25685833-604d-4b98-9f25-067aed6912fe",
            "to": "0x3d712EE26e407DC383a451466B7a93a42094dBA1"
        }
    }
]

📘

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
Authorization
Header
Click Try It! to start a request and see the response here!