Backend of ecommerce website
Login with a users credentials, send token with credentials, will be attached to the account if successfully logged in
{
username: [string],
password: [string],
token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Validates a users session is still authorized
{
token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Update a users password
{
old_password: [string],
new_password: [string],
token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Get the balance for the users account
{
token: [string],
}
Status Code: 200
{
balance: [int]
}
Status Code: 400+
{
error: [string]
}
Buy a particular item from the store
{
token: [string],
item_id: [int],
}
Status Code: 200
{
transaction_id: [int]
}
Status Code: 400+
{
error: [string]
}
Expire a session for a user
{
token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Update a users session from and old token to a new one
{
old_token: [string],
new_token: [string],
}
Status Code: 200
{
success: [string]
}
Status Code: 400+
{
error: [string]
}
Return a list of the transactions made on their account
{
token: [string]
}
Status Code: 200
{
transactions: [array[strings]]
}
Status Code: 400+
{
error: [string]
}
Return a list of the items to be bought from whiteteam store
{
token: [string]
}
Status Code: 200
{
items: [array[dicts]]
}
Status Code: 400+
{
error: [string]
}
Transfer money from one team to another
{
token: [string],
recipient: [int],
amount: [int]
}
Status Code: 200
{
transaction_id: [int]
}
Status Code: 400+
{
error: [string]
}