Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store check in kiosk id to mark association #8958

Closed
cweitat opened this issue Jul 7, 2023 · 7 comments · Fixed by #8991 or #9030
Closed

Store check in kiosk id to mark association #8958

cweitat opened this issue Jul 7, 2023 · 7 comments · Fixed by #8991 or #9030
Labels
Milestone

Comments

@cweitat
Copy link
Contributor

cweitat commented Jul 7, 2023

Allow organiser to create station name for each event

  • station name
  • location (based on the locations available for the venue) - if registration is selected, location can be empty
  • type (registration / daily / check in / check out )
@ghost
Copy link

ghost commented Jul 18, 2023

Hi @cweitat @mariobehling @DonChiaQE
Could you please share me the sample request (CURD) for this API.

@cweitat
Copy link
Contributor Author

cweitat commented Jul 18, 2023

@lthanhhieu
There should be two APIs for this one

First is storing a new station POST
eventId, microlocation_id, station_name, station_type

Second need GET
microlocation_id, room, station_name, station_type
For microlocation_id and room pls refer here https://test-api.eventyay.com/#microlocations-microlocation-details

If type is registration & daily, microlocation_id and room can be null on GET

This should be a new DB TABLE

@nnhathung
Copy link
Contributor

nnhathung commented Jul 18, 2023

Hi @cweitat

APIs spec for create and get station, could you help me to take a look and let me know if it okay

POST: /v1/station
Request

{
"data": {
"attributes": {
"station-name": "station name",
"station-type": "registration" // registration | daily | session
},
"relationships": {
"event": {
"data": {
"type": "event",
"id": "1"
}
},
"microlocation": {
"data": {
"type": "microlocation",
"id": "1"
}
}
},
"type": "station"
}
}

Response
Success Http status: 201 CREATED
{
"data": {
"type": "station",
"attributes": {
"station-name": "station name",
"microlocation-id": "1",
"station-type": "registration",
"room": "room 1"
},
"id": 17
}
}

Error : station type is invalid
Http status 422 UNPROCESSABLE ENTITY

{
"errors": [
{
"detail": "Not a valid choice.",
"source": {
"pointer": "/data/attributes/station-type"
},
"status": "422",
"title": "Validation error"
}
]
}

GET: /v1/station/{station-id}

Response

{
"data": {
"type": "station",
"attributes": {
"station-name": "station name",
"microlocation-id": "1",
"station-type": "registration",
"room": "room 1"
},
"id": 17
}
}

Error Response if station can not be found:
Http status 404 NOT FOUND

{
"errors": [
{
"status": 404,
"source": {
"pointer": ""
},
"title": "Object not found",
"detail": "Object Not Found"
}
],
"jsonapi": {
"version": "1.0"
}
}

GET all station of event: /v1/events/{event-id}/stations

{
"data": [
{
"type": "station",
"attributes": {
"station-name": "station name 1",
"microlocation-id": "1",
"station-type": daily
"room": "room"
}
"id": 4
},
{
"type": "station",
"attributes": {
"station-name": "station name 2",
"station-type": "registration"
}
"id": 5
}
],
"meta": {
"count": 15
}
}

@cweitat
Copy link
Contributor Author

cweitat commented Jul 18, 2023

@lthanhhieu what if not successful? what does it returns for POST

Also another GET which is to get all stations of the event

@nnhathung
Copy link
Contributor

nnhathung commented Jul 19, 2023

@lthanhhieu what if not successful? what does it returns for POST

Also another GET which is to get all stations of the event

Hi @cweitat
I have updated APIs spec in previous comment since there're the relationship between station with event and microlocation.

For event, it has one-to-many with station, but with microlocation, is it one-to-many or 1:1 with station?

and another one is does we need paging for API get all stations of event?

@lthanhhieu, @mariobehling : FYI

@cweitat
Copy link
Contributor Author

cweitat commented Jul 19, 2023

@nnhathung don't need pagination
1 Micro location can have multiple stations

@nnhathung
Copy link
Contributor

Hi @cweitat , thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants