This documentation provides information on the CRUD operations for managing vehicle stops, including details for fuel stops, parking, rest areas, airport charges, and more. It also covers associated meta information such as fuel rates, parking charges, and airport pick-up/drop charges. Each endpoint requires an API key for authentication, and each API key is associated with specific stop information.
-
Endpoint:
GET /v1/vehicle-stops?pageNumber=2&pageSize=10
-
Description: Retrieves a list of all vehicle stops. The response includes details of each stop along with their associated
metaData
if available. IfmetaData
is not present, it is not shown in the response. Pagination is supported through query parameters. -
Query Parameters:
pageNumber
(optional): Specifies the page number to retrieve. Default is 1.pageSize
(optional): Specifies the number of items per page. Default is 10.
-
Pagination Info: The response will contain the following pagination information:
{ "paginationInfo": { "totalItems": 1, "totalPages": 1, "currentPage": 1, "pageSize": 10 } }
-
Sample Response: View sample response body
- Endpoint:
GET /v1/vehicle-stop/{stop_id}
- Description: Retrieves a specific vehicle stop by its ID. The response includes details of the stop along with their associated
metaData
if available. IfmetaData
is not present, it is not shown in the response. - Response Body: View sample response body
- Endpoint:
POST /v1/vehicle-stops
- Description: Creates a new vehicle stop. The request body consists of two objects:
stop
andmetaData
.stop
: Contains the details of the vehicle stop, such as location, address, and amenities.metaData
: Contains the meta data of the stop, like fuel rates. This object is optional. IfmetaData
is not present, only the stop is created.metaData
can be added later using the update endpoint with the stop ID.- Note: For
stop_type
parking, if an array is provided in themetaData
, each object in the array should include the predicatorsvalid_from
andvalid_to
.
- Request Body: View sample request body
- Response Body: View sample response body
- Endpoint:
PUT /v1/vehicle-stop/{stop_id}
- Description: Updates the details or rates of the specified vehicle stop. The request body consists of two objects:
stop
andmetaData
.stop
: Contains the updated details of the vehicle stop.metaData
: Contains the updated meta data of the stop, like fuel rates. Eitherstop
,metaData
, or both can be updated using this endpoint.- Note: For
stop_type
parking, if an array is provided in themetaData
, each object in the array should include the predicatorsvalid_from
andvalid_to
.
- Request Body: View sample request body
- Response Body: View sample response body
- Endpoint:
DELETE /v1/vehicle-stop/{stop_id}
- Description: Deletes the specified vehicle stop. Deleting a stop will also delete the associated meta data.
- Response Body:
{ "message": "Vehicle stop deleted" }
Each request to the API requires an API key for authentication. Ensure your API key is included in the headers of your requests.
The API uses standard HTTP status codes to indicate the success or failure of an API request. Common status codes include:
200 OK
: The request was successful.201 Created
: The resource was successfully created.400 Bad Request
: The request was invalid or cannot be otherwise served.401 Unauthorized
: Authentication failed or user does not have permissions for the requested operation.404 Not Found
: The requested resource could not be found.500 Internal Server Error
: An error occurred on the server.
For detailed examples of how to use each endpoint, refer to the sample request and response bodies linked within each endpoint description.
For questions or support, please contact our support team at stop-api-support@mapup.ai