request_board
Accept all demand on an offer and add the everyone on the trip to a chat.
Request_board endpoint
get_request_board
GET https://carpoolingbackend.herokuapp.com/v1/apis/request_board
Get the request_board status of demands and offers
Path Parameters
Authorization
string
The auth_token of the currently authenticated user.
[
{
"id": 2,
"status": "PE",
"offer": 2,
"demand": 2
}
]An example of a get request on the request_board endpoint.
An example of a get request on the request_board endpoint.
get status of a specific trip
GET https://carpoolingbackend.herokuapp.com/v1/apis/request_board/{id}
Filter the trip_request response based on id's.
Path Parameters
Authorization
string
The auth_token of the currently logged in user.
Query Parameters
id
integer
The request_board id
{
"id": 2,
"status": "PE",
"offer": 2,
"demand": 2
}An example of a get request on the board_request endpoint filtered by id.

post_trip_status
POST https://carpoolingbackend.herokuapp.com/v1/apis/request_board
Accept a demand on a trip offer.
Path Parameters
Authorization
string
The auth_token of the currently logged in user.
Request Body
status
string
The status of the trip, either (AC, PE, DE)
offer
integer
the offer id
demand
integer
the demand id
{
"id": 1,
"status": "AC",
"offer": 1,
"demand": 1
}Pass the offer_id and the demand_id to be accepted on the offer.
An example of a post request on the request_board endpoint

update trip status
PATCH https://carpoolingbackend.herokuapp.com/v1/apis/request_board/{id}
Update the status of the trip
Path Parameters
Authorization
string
The auth_token of the currently logged in user.
Query Parameters
id
integer
The board_request id to be updated.
Request Body
status
string
The status of the trip..choices are ( AC, PE or DE).
{
"id": 1,
"status": "PE",
"offer": 1,
"demand": 1
}An example of a patch_request on the request_board endpoint

Last updated
Was this helpful?