Adminserver: Ticket API
| Endpoint | Method | Description |
|---|---|---|
| /jsonRpc/ticket.createPurchasableTicket | jsonRpc | Create purchasable ticket |
| /jsonRpc/ticket.deletePurchasableTicket | jsonRpc | Delete purchasable ticket |
| /jsonRpc/ticket.updatePurchasableTicket | jsonRpc | Update purchasable ticket |
| /jsonRpc/ticket.getPurchasableTickets | jsonRpc | Get purchasable tickets |
Create purchasable ticket
Method: jsonRpc
HTTP Method: POST
Path: /jsonRpc/ticket.createPurchasableTicket
Permissions:
network.manage /networkId
Request:
{
"ticket": {
"productId": string // unique product identifier
"eventName": string // name of related event
"eventStartDate": timestamp // start date of related event
"eventEndDate": timestamp // end date of related event
"ticketType": string // single/days:1of3/days:2of3
"ticketName": string // name of ticket that is shown to client
"ticketDescription": string // description of ticket that is shown to client
"price": float // price in USD
"thumbnailId": string // resource id of thumbnail
"discount": string // marketing discount, no actual effects on price
"grants": [{ // rewards granted by ticket
"grantType": string // userRole
"grantTarget": string // roleId:roleTarget
}]
}
}
Response:
{
"data": {
"ticket": {
"productId": string // unique product identifier
"eventName": string // name of related event
"eventStartDate": timestamp // start date of related event
"eventEndDate": timestamp // end date of related event
"ticketType": string // single/days:1of3/days:2of3
"ticketName": string // name of ticket that is shown to client
"ticketDescription": string // description of ticket that is shown to client
"price": float // price in USD
"thumbnailId": string // resource id of thumbnail
"discount": string // marketing discount, no actual effects on price
"grants": [{ // rewards granted by ticket
"grantType": string // userRole
"grantTarget": string // roleId:roleTarget
}]
}
}
"error": { "status": bool, "code": int, "message": string }
}
Delete purchasable ticket
Method: jsonRpc
HTTP Method: POST
Path: /jsonRpc/ticket.deletePurchasableTicket
Permissions:
network.manage /networkId
Request:
{
"productId": string
}
Response:
{ empty }
Update purchasable ticket
Method: jsonRpc
HTTP Method: POST
Path: /jsonRpc/ticket.updatePurchasableTicket
Permissions:
network.manage /networkId
Request:
{
"ticket": {
"productId": string // unique product identifier
"eventName": string // name of related event
"eventStartDate": timestamp // start date of related event
"eventEndDate": timestamp // end date of related event
"ticketType": string // single/days:1of3/days:2of3
"ticketName": string // name of ticket that is shown to client
"ticketDescription": string // description of ticket that is shown to client
"price": float // price in USD
"thumbnailId": string // resource id of thumbnail
"discount": string // marketing discount, no actual effects on price
"grants": [{ // rewards granted by ticket
"grantType": string // userRole
"grantTarget": string // roleId:roleTarget
}]
}
}
Response:
{
"data": {
"ticket": {
"productId": string // unique product identifier
"eventName": string // name of related event
"eventStartDate": timestamp // start date of related event
"eventEndDate": timestamp // end date of related event
"ticketType": string // single/days:1of3/days:2of3
"ticketName": string // name of ticket that is shown to client
"ticketDescription": string // description of ticket that is shown to client
"price": float // price in USD
"thumbnailId": string // resource id of thumbnail
"discount": string // marketing discount, no actual effects on price
"grants": [{ // rewards granted by ticket
"grantType": string // userRole
"grantTarget": string // roleId:roleTarget
}]
}
}
"error": { "status": bool, "code": int, "message": string }
}
Get purchasable tickets
Method: jsonRpc
HTTP Method: POST
Path: /jsonRpc/ticket.getPurchasableTickets
Permissions:
network.manage /networkId
Request:
{ empty }
Response:
{
"data": {
"tickets": [{
"productId": string // unique product identifier
"eventName": string // name of related event
"eventStartDate": timestamp // start date of related event
"eventEndDate": timestamp // end date of related event
"ticketType": string // single/days:1of3/days:2of3
"ticketName": string // name of ticket that is shown to client
"ticketDescription": string // description of ticket that is shown to client
"price": float // price in USD
"thumbnailId": string // resource id of thumbnail
"discount": string // marketing discount, no actual effects on price
"grants": [{ // rewards granted by ticket
"grantType": string // userRole
"grantTarget": string // roleId:roleTarget
}]
}]
}
"error": { "status": bool, "code": int, "message": string }
}