- /api
- /auth
- /sign_up
- POST /
- /sign_in
- POST /
- /sign_up
- /v1
- /user
- GET /
- /attendee
- GET /
- /badges
- GET /
- GET /:id
- /attendees
- GET /
- GET /:id
- POST /:id
- DELETE /:id
- /company
- GET /
- /companies
- GET /
- GET /:id
- /referrals
- GET /:id
- /redeems
- POST /
- /leaderboard
- GET /
- GET /:date
- /association
- GET /:discord_id
- POST /
- /store
- GET /
- GET /:id
- POST /buy
- /roulette
- POST
- /roulette/prizes
- GET /
- GET /:id
- /roulette/latestwins
- GET /
- /give_bonus
- POST /:id
- /spotlight
- POST
- /user
- /auth
- /api
- /auth
- /sign_up
- POST /
- /sign_in
- POST /
- /v1
- /user
- GET /
- /attendee
- GET /
- /badges
- GET /
- GET /:id
- /attendees
- GET /
- GET /:id
- POST /:id
- DELETE /:id
- /companies
- GET /
- GET /:id
- /referrals
- GET /:id
- /store
- GET /
- GET /:id
- POST /buy
- /leaderboard
- GET /
- GET /:date
- /roulette
- POST
- /roulette/prizes
- GET /
- GET /:id
- /user
- /auth
- /api
- /auth
- /sign_in
- POST /
- /v1
- /user
- GET /
- /badges
- GET /
- GET /:id
- /attendees
- GET /
- GET /:id
- POST /:id
- DELETE /:id
- /company
- GET /
- /attendees
- GET /:id
- /companies
- GET /
- GET /:id
- /redeems
- POST /
- /give_bonus
- POST /:id
- /spotlight
- POST
- /user
- /auth
- /api
- /auth
- /user
- GET /
- /sign_up
- POST /
- /sign_in
- POST /
- /user
- /v1
- /redeems
- POST /
- /association
- GET /:discord_id
- POST /
- /store
- POST /redeem
- /redeems
- /auth
{
"user": {
"email": "foo@bar.com",
"password": "somePassword",
"password_confirmation": "somePassword",
"attendee": {
"id": "adaa8aab4e-7549-494b-91f0-52e9c9a8cf5d",
"nickname": "foobar",
"name": "Foo Bar"
}
}
}
{
"discord_association_code": "733405df-0b7b-4dc3-9666-3038fde44698",
"jwt": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJzYWZpcmEiLCJl..."
}
- Invalid email, email already taken, password doesn't match, username already taken
{
"error": "Invalid register data"
}
- UUID taken
{
"error": "Already registered"
}
- UUID Incorrect
{
"errors": {
"detail": "Bad Request"
}
}
{
"email": "foo@bar.com",
"password": "somePassword"
}
{
"jwt": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJzYWZpcmEiLCJle..."
}
- Invalid username or password
{
"error": "Login error"
}
When you are autheticated you get a jwt token.
This token is used as a bearer token to service any calls to the api that need to be authenticated.
{
"error": "unauthenticated"
}
{
"error": "invalid_token"
}
Fetches all badges depending in the type of user that is consulting them.
{
"data": [
{
"name": "Dia 1",
"id": 1,
"end": "2018-07-31T15:59:51.746577Z",
"description": "coisa",
"begin": "2018-07-31T15:59:51.742630Z",
"avatar": "/images/default/badge-missing.png",
"tokens": 1,
"type": 3
}
]
}
Fetches a single badge.
{
"data": {
"attendees": [ ... ],
"name": "Dia 1",
"id": 1,
"end": "2018-07-31T15:59:51.746577Z",
"description": "coisa",
"begin": "2018-07-31T15:59:51.742630Z",
"avatar": "/images/default/badge-missing.png",
"tokens": 1,
"type": 3
}
}
{
"errors": {
"detail": "Endpoint Not Found"
}
}
Fetches the nick, uuid, email and avatar of the logged in attendee.
{
"nick": "qwrqasd",
"id": "43ffc4f5-3b12-4243-a157-e4e9e90d35dc",
"email": "fooo@bar.com",
"name": "Name LastName",
"avatar": "/images/default/attendee-missing.png"
}
Lists all attendees.
{
"data": [
{
"avatar": "/images/attendee-missing.png",
"badge_count": 1,
"badges": [
{
"avatar": "https://teste.amazonaws.com/uploads/badge/avatars/179/original.png?v=63731919919",
"begin": "2019-02-05T00:00:00Z",
"description": "Estiveste presente na talk do Celso Martinho",
"end": "2019-02-06T00:00:00Z",
"id": 179,
"name": "Talk Celso Martinho",
"tokens": 1,
"type": 3
}
],
"entries": 0,
"id": "eae3333d-51a6-4142-b35d-0154e431ff60",
"name": "user1",
"nickname": "user1",
"token_balance": 10,
"volunteer": false
},
{
"avatar": "/images/attendee-missing.png",
"badge_count": 0,
"badges": [],
"entries": 0,
"id": "87656cdb-5615-4118-b981-a76f5ee4352a",
"name": "user3",
"nickname": "user3",
"token_balance": 10,
"volunteer": false
}
]
}
Shows an attendee.
{
"data": {
"avatar": "/images/attendee-missing.png",
"badge_count": 1,
"badges": [{
"avatar": "https://teste.amazonaws.com/uploads/badge/avatars/179/original.png?v=63731919919",
"begin": "2019-02-05T00:00:00Z",
"description": "Estiveste presente na talk do Celso Martinho",
"end": "2019-02-06T00:00:00Z",
"id": 179,
"name": "Talk Celso Martinho",
"type": 3
}],
"entries": 0,
"id": "eae3333d-51a6-4142-b35d-0154e431ff60",
"name": "user1",
"nickname": "user1",
"prizes": [{
"avatar": "/uploads/prize/avatars/26/original.png?v=63780572129",
"id": 26,
"name": "Raspberry Pi 4 2gb + carregador"
}],
"redeemables": [
{
"id": 1,
"image": "/images/redeemable-missing.png",
"name": "T-shirt",
"price": 10,
"quantity": 1
}
],
"token_balance": 10,
"volunteer": false
}
}
{
"errors": {
"detail": "Bad Request"
}
}
Changes an attendee.
{
"attendee": {
"nickname": "qwrqasd"
}
}
{
"data": {
"nickname": "qwrqasd",
"id": "d832f350-fe30-4d98-a245-59d1aa186f36",
"name": "Name LastName",
"avatar": "/images/default/attendee-missing.png"
}
}
{
"errors": {
"detail": "Bad Request"
}
}
Removes an attendee.
204
(no content)
- Invalid uuid
{
"errors": {
"detail": "Endpoint Not Found"
}
}
{
"id": "ee2c4d55-7765-47c6-85af-b087fa03dc9b"
}
{
"referral": "Referral redeemed successfully"
}
- Used referrals
{
"referral": "Referral not available"
}
- Attende allready had this badge
{
"errors": {
"unique_attendee_badge": [
"An attendee can't have the same badge twice"
]
}
}
{
"data": {
"badge_id": 37,
"channel_id": "1",
"id": 1,
"name": "Accenture",
"sponsorship": "Exclusive"
}
}
{
"data": [
{
"badge_id": 37,
"channel_id": "1",
"id": 1,
"name": "Accenture",
"sponsorship": "Exclusive"
}
]
}
{
"data": {
"sponsorship": "ola",
"name": "ola",
"id": 1
}
}
{
"data": {
"id": 1,
"nickname": "AttendeeMega2",
"name": "Attendee Mega 2",
"avatar": "/images/default/attendee-missing.png",
"token_balance": 10,
"entries": 0,
}
}
{
"errors": {
"detail": "Endpoint Not Found"
}
}
{
"redeem": {
"attendee_id": "43ffc4f5-3b12-4243-a157-e4e9e90d35dc",
"badge_id": "1"
}
}
{
"redeem": "Badge redeemed successfully. Tokens added to your balance"
}
- User allready had the badge
{
"errors": {
"unique_attendee_badge": [
"An attendee can't have the same badge twice"
]
}
}
- Not a manager, no badge_id, not valid badge_id
{
"errors": {
"detail": "Endpoint Not Found"
}
}
{
"data": [
{
"avatar": "/images/attendee-missing.png",
"badges": 28,
"id": "79a29c1c-9f2e-4de1-a318-54eb1e6ec060",
"name": "user1",
"nickname": "user1",
"token_balance": 80,
"volunteer": false
},
{
"avatar": "/images/attendee-missing.png",
"badges": 11,
"id": "05942830-fe17-4133-aadf-23c44d5dc24b",
"name": "user2",
"nickname": "user2",
"token_balance": 91,
"volunteer": false
}
]
}
Get the daily leaderboard
{
"data": [
{
"avatar": "/images/attendee-missing.png",
"badges": 2,
"id": "1f18064f-9fe8-437a-9141-9c75ee85d25b",
"name": "user3",
"nickname": "user3",
"token_balance": 2,
"volunteer": false
},
{
"avatar": "/images/attendee-missing.png",
"badges": 1,
"id": "79a29c1c-9f2e-4de1-a318-54eb1e6ec060",
"name": "user1",
"nickname": "user1",
"token_balance": 71,
"volunteer": false
}
]
}
}
No body
{
"spotlight": "Spotlight requested succesfully"
}
- A company is already in spotlight
{
"errors": {
"active": [
"Another spotlight is still active"
]
}
}
- The company has no remaining spotlights
{
"errors": {
"remaining_spotlights": [
"must be greater than or equal to 0"
]
}
}
Fetches the id of the attendee associated with the given discord id
{
"id": "f90b60ce-219c-4edc-a92a-e6c63fec4a4d"
}
- Discord id is not associated:
{
"error": "No attendee with that discord_id"
}
{
"discord_association_code": "733405df-0b7b-4dc3-9666-3038fde44698",
"discord_id": "abc"
}
{
"association": "participante"/"empresa"/"orador"/"staff"
}
- Invalid association code:
{
"error": "Unable to associate"
}
Fetches all redeemables in store.
- When is an attendee
{
"data": [
{
"can_buy": 1,
"description": "PowerBank 5k com logo SEI",
"id": 1,
"image": "/uploads/redeemable/avatars/1/original.png?v=63780993725",
"max_per_user": 1,
"name": "PowerBank",
"price": 100,
"stock": 30
},
{
"can_buy": 3,
"description": "Merch SEI",
"id": 2,
"image": "/uploads/redeemable/avatars/2/original.png?v=63780993725",
"max_per_user": 4,
"name": "T-shirt",
"price": 50,
"stock": 10
}
]
}
- When is not an attendee
{
"data": [
{
"can_buy": 0,
"description": "PowerBank 5k com logo SEI",
"id": 1,
"image": "/uploads/redeemable/avatars/1/original.png?v=63780993725",
"max_per_user": 1,
"name": "PowerBank",
"price": 100,
"stock": 30
},
{
"can_buy": 0,
"description": "Merch SEI",
"id": 2,
"image": "/uploads/redeemable/avatars/2/original.png?v=63780993725",
"max_per_user": 4,
"name": "T-shirt",
"price": 50,
"stock": 10
}
]
}
Fetches a single item.
- When is an attendee
{
"data": {
"can_buy": 7,
"description": "Merch SEI",
"id": 2,
"image": "/images/redeemable-missing.png",
"max_per_user": 10,
"name": "Caneta",
"price": 5,
"stock": 7
}
}
- When is not an attendee
{
"data": {
"can_buy": 0,
"description": "Merch SEI",
"id": 2,
"image": "/images/redeemable-missing.png",
"max_per_user": 10,
"name": "Caneta",
"price": 5,
"stock": 7
}
}
- When an item does not exist in store.
{
"errors": {
"detail": "Endpoint Not Found"
}
}
Buy a redeemable.
{
"redeemable": {
"redeemable_id": 3
}
}
{
"Redeemable": "Caneta bought successfully!"
}
- When the participant has already reached the maximum quantity allowed per user.
{
"errors": {
"quantity": [
"Quantity is greater than the maximum amount permitted per attendee"
]
}
}
- Attendee token balance is insufficient to buy the redeemable.
{
"errors": {
"token_balance": [
"Token balance is insufficient."
]
}
}
- The stock of the selected redeemable reached 0.
{
"errors": {
"stock": [
"Item is sold out!"
]
}
}
- There is no redeemable_id parameter or it is written differently.
{
"Redeemable": "No 'redeemable_id' param"
}
- Not an attendee
{
"error": "Only attendees can buy products!"
}
- There is no redeemable with that id
{
"Redeemable": "There is no such redeemable"
}
deliver a redeemable to the atendee.
{
"redeem": {
"user_id": 2,
"redeemable_id": 3,
"quantity": 1
}
}
{
"Redeemable": "Caneta bought successfully!"
}
- User doesn not exist
{
"errors": {
"User": [
"User does not exist"
]
}
}
- redeemable does not exist
{
"errors": {
"Redeemable": [
"There is no such redeemable"
]
}
}
- json is lacking the quantity parameter
{
"errors": {
"stock": [
"Json does not have `quantity` param"
]
}
}
- When you win tokens
{
"prize": {
"avatar": "/uploads/prize/avatars/45/original.png?v=63781002813",
"id": 45,
"name": "Tokens"
},
"tokens": 10
}
- When you win a normal prize
{
"prize": {
"avatar": "/uploads/prize/avatars/57/original.png?v=63781049535",
"id": 57,
"name": "Raspberry Pi 4 2gb + carregador"
}
}
- When you win entries for the final draw
{
"entries": 1,
"prize": {
"avatar": "/uploads/prize/avatars/66/original.png?v=63781049535",
"id": 66,
"name": "Entradas para o sorteio final"
}
}
- When you win a roulette badge
{
"badge": {
"avatar": "/uploads/badge/avatars/129/original.png?v=63780362701",
"begin": "2020-02-26T00:00:00Z",
"description": "Lucky Bastard 1",
"end": "2020-02-27T00:00:00Z",
"id": 129,
"name": "Lucky Bastard 1",
"tokens": 1,
"type": 9
},
"prize": {
"avatar": "/uploads/prize/avatars/61/original.png?v=63781049535",
"id": 61,
"name": "Lucky Bastard 1"
}
}
- When you win nothing
{
"prize": {
"avatar": "/uploads/prize/avatars/67/original.png?v=63781049535",
"id": 67,
"name": "Nada"
}
}
Prizes that an attendee can win by spinning the roulette.
{
"data": [
{
"avatar": "/uploads/prize/avatars/25/original.png?v=63780572128",
"id": 25,
"max_amount_per_attendee": 1,
"name": "Amazon Voucher",
"stock": 8
}
]
}
Get a specific prize by prize_id
{
"data": {
"avatar": "/uploads/prize/avatars/26/original.png?v=63780572129",
"id": 26,
"max_amount_per_attendee": 1,
"name": "Raspberry Pi 4 2gb + carregador",
"stock": 1
}
}
- When the prize_id does not exist.
{
"errors": {
"detail": "Endpoint Not Found"
}
}
{
"data": [
{
"attendee_name": "user1",
"date": "2021-02-21T21:36:13",
"prize": {
"avatar": "/uploads/prize/avatars/12/original.png?v=63781160330",
"id": 12,
"max_amount_per_attendee": 1,
"name": "ATH-M50X Profissional Audio-technica",
"stock": 0
}
}
]
}
Company gives a pre-defined bonus to an attendee
{
"attendee_id": "05942830-fe17-4133-aadf-23c44d5dc24b",
"bonus_count": 2,
"company_id": 1,
"name": "user2",
"token_bonus": 10
}
- When a company tries to give more than 3 bonuses to the same attendee.
{
"errors": {
"count": [
"must be less than or equal to 3"
]
}
}
- When the attendee_id is not valid
{
"errors": {
"detail": "Bad Request"
}
}