Venue Manager shop API - Admittance
REST-interface for the Venue Manager shop platform.
This document describes the endpoints exposed by the admittance module.
Links to the other modules’ endpoints can be found at http://docs.api.venuemanager.net/.
Kiosk ¶
Functionality related to buying and redeeming products for eg drink and food stalls at sport venues.
Sellables ¶
SellablesGET/kiosk/sellables
Returns a list of sellables. That is all the “kiosk” products/packages from the shop administration.
Please see the /api/core/order endpoint for information about how to buy the sellables.
Example URI
200
Headers
Content-Type: application/json
Body
[
{
"id": 8,
"name": "Tuborg Pilsner 8 pack",
"priceInclVat": 49,
"vat": 9.8,
"currencyCode": "DKK",
"appData": {
"header": "Sellable header..",
"description": "Sellable description..",
"image": "https://lejfesttelt.dk/images/products_thumb/1440509131_plastikrus.png"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Redeem products ¶
Redeem productsPOST/kiosk/redeem
This endpoint is used when a customer wants to redeem products at a kiosk.
Example URI
Headers
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJkZXZlbG9wbWVudF9hZ2YiLCJpYXQiOjE0ODkwNzIyNjAsImp0aSI6Nn0.z-9FNz-3twoxqy_E06Q1ryQO_VHHxK5710Fe9ILH-5w
Accept: application/json
Body
{
"products": [
{
"id": 23,
"quantity": 5
}
],
"clientName": "VenueApp",
"clientOs": "iPhone"
}
Schema
{
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"quantity": {
"type": "number"
}
},
"required": [
"id",
"quantity"
]
}
},
"clientName": {
"type": "string",
"description": "Used by the server to identify the App in use"
},
"clientOs": {
"type": "string",
"description": "iOS - 12.0 (string, required) - Stored serverside to make it easier for the customer to distinguish his tokens in lists."
}
},
"required": [
"clientName"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
204
This is the expected response - the products were redeemed without errors. No content is returned.
400
One or more of the products could not be redeemed.
Headers
Content-Type: application/json
Body
{
"error": "Winston writes in his forbidden diary.",
"errorCode": 1984
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Textual description of the error."
},
"errorCode": {
"type": "number",
"description": "A code, often 0."
}
},
"required": [
"error"
]
}