WAAMSorters API

Backend API for the WAAMSorters application to manage sorters, users, shops and game developers

Sorters 6

Sorters CRUD funcionality

Description

Create new sorter in database - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "name": "WAAM 2",
    "description": "Sorter ",
    "address": "Strzelecka 3 Rybnik 44200 Poland",
    "averageCommision": 5,
    "petContainer": 0,
    "aluContainer": 0,
    "glassContainer": 0,
    "glassDContainer": 0,
    "breakDownHead": "Working",
    "breakDownConveyor": "Working",
    "breakDownElectronic": "Working"
}
Description

Fetch all sorters from data base - Public

Description

Fetch single sorter by ID - Public

Description

Get list of location of sorters using zipcode and distance - Public

Description

Update single sorter with unique ID - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Description

Delete single sorter with unique ID - Admin

Authentication 9

ROutes for user authentication including register, reset password, login etc

Description

Register user with encrypted password for - Public

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "name": "test 3",
    "email": "x@gmail.com",
    "password": "Password12"
}
Description

Login user with e-mail and password - Public

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "email": "x@gmail.com",
    "password": "Password12"
}
Description

Generate password token and send email - Public

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "email": "MyEmail@gmail.com"
}
Description

Get logged information - Only for account owner and Admin.

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "email": "artur.czachor@gmail.com",
    "password": "wamowski19"
}
Description

Cleare token cookie of user account. - Only for account owner.

Description

Confirmation of user registration. You received on email link for confirmation. - Only for account owner.

Description

Reset password for user with token . - Only for account owner.

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "password": "ResetPassword"
}
Description

Update name and email adress on user account. - Only for account owner and Admin.

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "name": "My Profile After Update"
}
Description

Update user password, send in the body currentPassword and newPassword. - Only for account owner.

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "currentPassword": "Password12",
    "newPassword": "Password1234567"
}

Users CRUD For Admin 5

CRUD functionlaity for users only availeble to admins

Description

Create new usser with password, name and email - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "name": "CRUD New User",
    "email": "user@gmail.com",
    "password": "user1234"
}
Description

Get full list of all users - Admin

Description

Get user with ID - access only for Admin

Description

Find by ID and update user account - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "name": "Change Name"
}
Description

Delete user with ID - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "name": "CRUD New User",
    "email": "user@gmail.com",
    "password": "user1234"
}

Products 6

Description

Create new product game in data base . - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "title": "WAAMskot x",
    "category": "game",
    "distributor": "studio",
    "description": "Gra dla najmnieszych dzieci",
    "pointCost": 300
}
Description

Get list of all available products - Public

Description

Get info of single product with ID - Public

Description

Upload photo for product with ID - Admin

Body
Key Value Description
file
Description

Update information of single product - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "title": "WAAMskot 5"
}
Description

Delete product form database. - Admin

Charity Events 6

Methods for get, update, post etc charity events in WAAM Aplication

Description

Create new charity event, need put organization and category. - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "title": "Zbudujmy razem boisko",
    "category": "pomoc szkołom",
    "organization": "helpSchool",
    "description": "zbiórka na boisko",
    "colectedAmount": 10
}
Description

Get all charity events - Public

Description

Upload photo for charity event with ID - Admin

Body
Key Value Description
file
Description

Update info of single charity event - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "title": "Zbudujmy razem 3 boisko",
    "category": "pomoc szkołom",
    "organization": "helpSchool",
    "description": "zbiórka na boisko",
    "colectedAmount": 10
}

Education 6

Education products such us e-course also ebooks and audio-books

Description

Create new education product such as e-course/ebook/audiobook. - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "title": "Nauka JS",
    "category": "ebook",
    "distributor": "Helion",
    "description": "ebook do nauki JS",
    "pointCost": 300
}
Description

StartFragment

Get all education products - Public

EndFragment

Description

Upload photo for education product with ID. - Admin

Body
Key Value Description
file
Description

Update education product, you can change description. - Admin

Headers
Key Value Description
Content-Type application/json

JSON Type

Body
{
    "title": "Twój JS Podstawy"
}