Skip to main content

Terminalserver API

StuStaPay Terminal API (0.1.0)

Download OpenAPI specification:Download

License: AGPL-3.0

base

health check endpoint

Responses

Response samples

Content type
application/json
null

obtain the current terminal config

Authorizations:
OAuth2PasswordBearer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "description": "string",
  • "till": {
    },
  • "test_mode": true,
  • "test_mode_message": "string"
}

obtain the list of available cash register stockings

Authorizations:
OAuth2PasswordBearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

list all cash registers

Authorizations:
OAuth2PasswordBearer
query Parameters
hide_assigned
boolean (Hide Assigned)
Default: true

Responses

Response samples

Content type
application/json
[
  • {
    }
]

stock up a cash register

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
cashier_tag_uid
required
integer (Cashier Tag Uid)
cash_register_id
required
integer (Cash Register Id)
register_stocking_id
required
integer (Register Stocking Id)

Responses

Request samples

Content type
application/json
{
  • "cashier_tag_uid": 0,
  • "cash_register_id": 0,
  • "register_stocking_id": 0
}

Response samples

Content type
application/json
null

Obtain information about a user tag

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
user_tag_uid
required
integer (User Tag Uid)

Responses

Request samples

Content type
application/json
{
  • "user_tag_uid": 0
}

Response samples

Content type
application/json
{
  • "login": "string",
  • "display_name": "string",
  • "user_tag_pin": "string",
  • "user_tag_uid": 0,
  • "description": "string",
  • "node_id": 0,
  • "user_tag_id": 0,
  • "transport_account_id": 0,
  • "cashier_account_id": 0,
  • "id": 0,
  • "cash_register_id": 0,
  • "cash_register_name": "string",
  • "cash_drawer_balance": 0,
  • "transport_account_balance": 0,
  • "assigned_roles": [
    ],
  • "user_tag_uid_hex": "string"
}

order

list all orders

List all the order of the currently logged in Cashier

Authorizations:
OAuth2PasswordBearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

check if a sale is valid

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
Customer Tag Uid (integer) or Customer Tag Uid (null) (Customer Tag Uid)
payment_method
required
string (PaymentMethod)
Enum: "cash" "sumup" "tag" "sumup_online"
Used Vouchers (integer) or Used Vouchers (null) (Used Vouchers)
required
Array of objects (Buttons)

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tag_uid": 0,
  • "payment_method": "cash",
  • "used_vouchers": 0,
  • "buttons": [
    ]
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "old_balance": 0,
  • "new_balance": 0,
  • "old_voucher_balance": 0,
  • "new_voucher_balance": 0,
  • "customer_account_id": 0,
  • "payment_method": "cash",
  • "line_items": [
    ],
  • "buttons": [
    ],
  • "used_vouchers": 0,
  • "item_count": 0,
  • "total_price": 0
}

finish the sale and book the transactions

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
Customer Tag Uid (integer) or Customer Tag Uid (null) (Customer Tag Uid)
payment_method
required
string (PaymentMethod)
Enum: "cash" "sumup" "tag" "sumup_online"
Used Vouchers (integer) or Used Vouchers (null) (Used Vouchers)
required
Array of objects (Buttons)

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tag_uid": 0,
  • "payment_method": "cash",
  • "used_vouchers": 0,
  • "buttons": [
    ]
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "old_balance": 0,
  • "new_balance": 0,
  • "old_voucher_balance": 0,
  • "new_voucher_balance": 0,
  • "customer_account_id": 0,
  • "payment_method": "cash",
  • "line_items": [
    ],
  • "buttons": [
    ],
  • "id": 0,
  • "booked_at": "2019-08-24T14:15:22Z",
  • "cashier_id": 0,
  • "till_id": 0,
  • "bon_url": "string",
  • "used_vouchers": 0,
  • "item_count": 0,
  • "total_price": 0
}

check if a top up is valid

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
payment_method
required
string (PaymentMethod)
Enum: "cash" "sumup" "tag" "sumup_online"
amount
required
number (Amount)
customer_tag_uid
required
integer (Customer Tag Uid)

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "payment_method": "cash",
  • "amount": 0,
  • "customer_tag_uid": 0
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "payment_method": "cash",
  • "amount": 0,
  • "customer_tag_uid": 0,
  • "customer_account_id": 0,
  • "old_balance": 0,
  • "new_balance": 0
}

finish the top up and book the transactions

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
payment_method
required
string (PaymentMethod)
Enum: "cash" "sumup" "tag" "sumup_online"
amount
required
number (Amount)
customer_tag_uid
required
integer (Customer Tag Uid)

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "payment_method": "cash",
  • "amount": 0,
  • "customer_tag_uid": 0
}

Response samples

Content type
application/json
{
  • "payment_method": "cash",
  • "customer_tag_uid": 0,
  • "customer_account_id": 0,
  • "amount": 0,
  • "old_balance": 0,
  • "new_balance": 0,
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "booked_at": "2019-08-24T14:15:22Z",
  • "cashier_id": 0,
  • "till_id": 0
}

check if a ticket sale is valid

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
required
Array of objects (Customer Tags)
Array
tag_uid
required
integer (Tag Uid)
tag_pin
required
string (Tag Pin)

Responses

Request samples

Content type
application/json
{
  • "customer_tags": [
    ]
}

Response samples

Content type
application/json
{
  • "scanned_tickets": [
    ]
}

check if a ticket sale is valid

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
required
Array of objects (Customer Tags)
required
PaymentMethod (string) or null

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tags": [
    ],
  • "payment_method": "cash"
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "payment_method": "cash",
  • "line_items": [
    ],
  • "scanned_tickets": [
    ],
  • "item_count": 0,
  • "total_price": 0
}

finish a ticket sale and book the transactions

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
required
Array of objects (Customer Tags)
required
PaymentMethod (string) or null

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tags": [
    ],
  • "payment_method": "cash"
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "payment_method": "cash",
  • "line_items": [
    ],
  • "scanned_tickets": [
    ],
  • "id": 0,
  • "booked_at": "2019-08-24T14:15:22Z",
  • "customer_account_id": 0,
  • "cashier_id": 0,
  • "till_id": 0,
  • "item_count": 0,
  • "total_price": 0
}

check if a pay out is valid

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
customer_tag_uid
required
integer (Customer Tag Uid)
Amount (number) or Amount (null) (Amount)

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tag_uid": 0,
  • "amount": 0
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tag_uid": 0,
  • "amount": 0,
  • "customer_account_id": 0,
  • "old_balance": 0,
  • "new_balance": 0
}

finish the pay out and book the transactions

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uuid
required
string <uuid> (Uuid)
customer_tag_uid
required
integer (Customer Tag Uid)
Amount (number) or Amount (null) (Amount)

Responses

Request samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tag_uid": 0,
  • "amount": 0
}

Response samples

Content type
application/json
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "customer_tag_uid": 0,
  • "amount": 0,
  • "customer_account_id": 0,
  • "old_balance": 0,
  • "new_balance": 0,
  • "booked_at": "2019-08-24T14:15:22Z",
  • "cashier_id": 0,
  • "till_id": 0
}

cancel information about an order

Authorizations:
OAuth2PasswordBearer
path Parameters
order_id
required
integer (Order Id)

Responses

Response samples

Content type
application/json
null

get information about an order

Authorizations:
OAuth2PasswordBearer
path Parameters
order_id
required
integer (Order Id)

Responses

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "total_price": 0,
  • "total_tax": 0,
  • "total_no_tax": 0,
  • "cancels_order": 0,
  • "booked_at": "2019-08-24T14:15:22Z",
  • "payment_method": "cash",
  • "order_type": "sale",
  • "cashier_id": 0,
  • "till_id": 0,
  • "customer_account_id": 0,
  • "customer_tag_uid": 0,
  • "customer_tag_id": 0,
  • "line_items": [
    ],
  • "customer_tag_uid_hex": "string"
}

auth

Register a new Terminal

Request Body schema: application/json
required
registration_uuid
required
string (Registration Uuid)

Responses

Request samples

Content type
application/json
{
  • "registration_uuid": "string"
}

Response samples

Content type
application/json
{
  • "terminal": {
    },
  • "token": "string"
}

Log out this Terminal

Authorizations:
OAuth2PasswordBearer

Responses

user

Get the currently logged in User

Authorizations:
OAuth2PasswordBearer

Responses

Response samples

Content type
application/json
Example
{
  • "node_id": 0,
  • "id": 0,
  • "login": "string",
  • "display_name": "string",
  • "active_role_id": 0,
  • "active_role_name": "string",
  • "privileges": [
    ],
  • "description": "string",
  • "user_tag_id": 0,
  • "user_tag_uid": 0,
  • "transport_account_id": 0,
  • "cashier_account_id": 0,
  • "cash_register_id": 0
}

Check if a user can login to the terminal and return his roles

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
uid
required
integer (Uid)

Responses

Request samples

Content type
application/json
{
  • "uid": 0
}

Response samples

Content type
application/json
{
  • "user_tag": {
    },
  • "roles": [
    ]
}

Login User

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
required
object (UserTag)
user_role_id
required
integer (User Role Id)

Responses

Request samples

Content type
application/json
{
  • "user_tag": {
    },
  • "user_role_id": 0
}

Response samples

Content type
application/json
{
  • "node_id": 0,
  • "id": 0,
  • "login": "string",
  • "display_name": "string",
  • "active_role_id": 0,
  • "active_role_name": "string",
  • "privileges": [
    ],
  • "description": "string",
  • "user_tag_id": 0,
  • "user_tag_uid": 0,
  • "transport_account_id": 0,
  • "cashier_account_id": 0,
  • "cash_register_id": 0
}

Logout the current user

Authorizations:
OAuth2PasswordBearer

Responses

Create a new user with the given roles

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
login
required
string (Login)
display_name
required
string (Display Name)
User Tag Pin (string) or User Tag Pin (null) (User Tag Pin)
User Tag Uid (integer) or User Tag Uid (null) (User Tag Uid)
Description (string) or Description (null) (Description)
role_ids
required
Array of integers (Role Ids)

Responses

Request samples

Content type
application/json
{
  • "login": "string",
  • "display_name": "string",
  • "user_tag_pin": "string",
  • "user_tag_uid": 0,
  • "description": "string",
  • "role_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "login": "string",
  • "display_name": "string",
  • "user_tag_pin": "string",
  • "user_tag_uid": 0,
  • "description": "string",
  • "node_id": 0,
  • "user_tag_id": 0,
  • "transport_account_id": 0,
  • "cashier_account_id": 0,
  • "id": 0,
  • "user_tag_uid_hex": "string"
}

Update the roles of a given user

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
user_tag_uid
required
integer (User Tag Uid)
role_ids
required
Array of integers (Role Ids)

Responses

Request samples

Content type
application/json
{
  • "user_tag_uid": 0,
  • "role_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "login": "string",
  • "display_name": "string",
  • "user_tag_pin": "string",
  • "user_tag_uid": 0,
  • "description": "string",
  • "node_id": 0,
  • "user_tag_id": 0,
  • "transport_account_id": 0,
  • "cashier_account_id": 0,
  • "id": 0,
  • "user_tag_uid_hex": "string"
}

grant a free ticket, e.g. to a volunteer

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
user_tag_pin
required
string (User Tag Pin)
user_tag_uid
required
integer (User Tag Uid)
initial_voucher_amount
integer (Initial Voucher Amount)
Default: 0

Responses

Request samples

Content type
application/json
{
  • "user_tag_pin": "string",
  • "user_tag_uid": 0,
  • "initial_voucher_amount": 0
}

Response samples

Content type
application/json
{
  • "node_id": 0,
  • "id": 0,
  • "type": "private",
  • "name": "string",
  • "comment": "string",
  • "balance": 0,
  • "vouchers": 0,
  • "user_tag_id": 0,
  • "user_tag_uid": 0,
  • "user_tag_comment": "string",
  • "restriction": "under_16",
  • "tag_history": [
    ],
  • "user_tag_uid_hex": "string"
}

grant vouchers to a customer

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
vouchers
required
integer (Vouchers)
user_tag_uid
required
integer (User Tag Uid)

Responses

Request samples

Content type
application/json
{
  • "vouchers": 0,
  • "user_tag_uid": 0
}

Response samples

Content type
application/json
{
  • "node_id": 0,
  • "id": 0,
  • "type": "private",
  • "name": "string",
  • "comment": "string",
  • "balance": 0,
  • "vouchers": 0,
  • "user_tag_id": 0,
  • "user_tag_uid": 0,
  • "user_tag_comment": "string",
  • "restriction": "under_16",
  • "tag_history": [
    ],
  • "user_tag_uid_hex": "string"
}

customer

Switch Tag

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
old_user_tag_pin
required
string (Old User Tag Pin)
new_user_tag_uid
required
integer (New User Tag Uid)
new_user_tag_pin
required
string (New User Tag Pin)
comment
required
string (Comment)

Responses

Request samples

Content type
application/json
{
  • "old_user_tag_pin": "string",
  • "new_user_tag_uid": 0,
  • "new_user_tag_pin": "string",
  • "comment": "string"
}

Response samples

Content type
application/json
null

Obtain a customer by tag uid

Authorizations:
OAuth2PasswordBearer
path Parameters
customer_tag_uid
required
integer (Customer Tag Uid)

Responses

Response samples

Content type
application/json
{
  • "node_id": 0,
  • "id": 0,
  • "type": "private",
  • "name": "string",
  • "comment": "string",
  • "balance": 0,
  • "vouchers": 0,
  • "user_tag_id": 0,
  • "user_tag_uid": 0,
  • "user_tag_comment": "string",
  • "restriction": "under_16",
  • "tag_history": [
    ],
  • "user_tag_uid_hex": "string"
}

Obtain all orders of a customer by tag uid

Authorizations:
OAuth2PasswordBearer
path Parameters
customer_tag_uid
required
integer (Customer Tag Uid)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

cashier

update the balance of a cash register by transferring money from / to a orga transport account

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
cashier_tag_uid
required
integer (Cashier Tag Uid)
amount
required
number (Amount)

Responses

Request samples

Content type
application/json
{
  • "cashier_tag_uid": 0,
  • "amount": 0
}

Response samples

Content type
application/json
null

update the balance of a transport account by transferring money from / to the cash vault

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
orga_tag_uid
required
integer (Orga Tag Uid)
amount
required
number (Amount)

Responses

Request samples

Content type
application/json
{
  • "orga_tag_uid": 0,
  • "amount": 0
}

Response samples

Content type
application/json
null

transfer a cash register between two cashiers

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
source_cashier_tag_uid
required
integer (Source Cashier Tag Uid)
target_cashier_tag_uid
required
integer (Target Cashier Tag Uid)

Responses

Request samples

Content type
application/json
{
  • "source_cashier_tag_uid": 0,
  • "target_cashier_tag_uid": 0
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "node_id": 0,
  • "id": 0,
  • "current_cashier_id": 0,
  • "current_till_id": 0,
  • "current_balance": 0
}

mgmt

Get revenue statistics for the current node

Authorizations:
OAuth2PasswordBearer
Request Body schema: application/json
required
required
From Time (string) or From Time (null) (From Time)
required
To Time (string) or To Time (null) (To Time)

Responses

Request samples

Content type
application/json
{
  • "from_time": "2019-08-24T14:15:22Z",
  • "to_time": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "from_time": "2019-08-24T14:15:22Z",
  • "to_time": "2019-08-24T14:15:22Z",
  • "daily_intervals": [
    ],
  • "hourly_intervals": [
    ]
}