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

Name
Type
Description

Authorization

string

The auth_token of the currently authenticated user.

[
  {
    "id": 2,
    "status": "PE",
    "offer": 2,
    "demand": 2
  }
]

The board_request endpoint returns the status of the trip.

the trip can exist in three states;

( AC => accepted, PE => pending, DE => denied)

it also returns the offer_id and the demand_id.

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

Name
Type
Description

Authorization

string

The auth_token of the currently logged in user.

Query Parameters

Name
Type
Description

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

Name
Type
Description

Authorization

string

The auth_token of the currently logged in user.

Request Body

Name
Type
Description

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
}

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

Name
Type
Description

Authorization

string

The auth_token of the currently logged in user.

Query Parameters

Name
Type
Description

id

integer

The board_request id to be updated.

Request Body

Name
Type
Description

status

string

The status of the trip..choices are ( AC, PE or DE).

{
  "id": 1,
  "status": "PE",
  "offer": 1,
  "demand": 1
}

You DO NOT have to provide offer_id and demand_id when making a patch request to this endpoint.

An example of a patch_request on the request_board endpoint

patch_request_board

Last updated

Was this helpful?