Foxorder's API contains diffrents roles. Each endpoint is restricted for one or multiple roles depending on its need.
If you would like to test these endpoints in our Swagger UI docs, you need to retrieve a JWT token first.
Here are the roles available in our API:
| Endpoint | Method | Description | FRONT | MANAGER | SHOP_OWNER | CUSTOMER |
|---|---|---|---|---|---|---|
| /api/v2/customers/{id}/orders |
GET
|
Return the list of orders of the connected customer |
Unauthorised
|
Unauthorised
|
Unauthorised
|
Authorized
|
| /api/v2/orders |
GET
|
Return the list of orders of the connected customer |
Unauthorised
|
Unauthorised
|
Authorized
|
Authorized
|
| /api/v2/orders |
POST
|
Add a new order |
Authorized
|
Unauthorised
|
Unauthorised
|
Authorized
|
| /api/v2/orders/{id} |
GET
|
Return an order |
Authorized
|
Unauthorised
|
Authorized
|
Authorized
|
| /api/v2/orders/{id} |
PUT
|
Update an order |
Authorized
|
Unauthorised
|
Unauthorised
|
Authorized
|
| /api/v2/orders/{id}/accept |
PATCH
|
Set the status of a given order to "Accepted" |
Unauthorised
|
Unauthorised
|
Authorized
|
Unauthorised
|
| /api/v2/orders/{id}/cancel |
PATCH
|
Cancel an order |
Unauthorised
|
Unauthorised
|
Authorized
|
Authorized
|
| /api/v2/orders/{id}/delay |
PATCH
|
Delay an order |
Unauthorised
|
Unauthorised
|
Authorized
|
Unauthorised
|
| /api/v2/orders/{id}/deliver |
PATCH
|
Set the status of a given order to "Delivered" |
Unauthorised
|
Unauthorised
|
Authorized
|
Unauthorised
|
| /api/v2/orders/{id}/pay |
PATCH
|
Set the status of a given order to "Paid" |
Unauthorised
|
Unauthorised
|
Authorized
|
Unauthorised
|
| /api/v2/orders/{id}/ready |
PATCH
|
Set the status of a given order to "Ready" |
Unauthorised
|
Unauthorised
|
Authorized
|
Unauthorised
|
| /api/v2/orders/{id}/reject |
PATCH
|
Set the status of a given order to "Rejected" |
Unauthorised
|
Unauthorised
|
Authorized
|
Unauthorised
|
| /api/v2/orders/cancel-payments |
POST
|
Cancel payments |
Authorized
|
Unauthorised
|
Unauthorised
|
Unauthorised
|