Express Natours API
The Natours API contain endpoint for Users, Tours, Reviews, Bookings and Stripe.
Public
Public endpoints.
Tours
Public endpoints for tours.
You can fetch:
all tours
1 tour by id
5 cheapest tours
all tours within a distance
distances to all tours from a point
(partial) tours statistics
GETGet All Tours
{{URL}}api/v1/tours?page=1&duration[gte]=2&sort=price
Use this endpoint to retrieve a list of tours.
Request
Method: GET
URL:
{{URL}}api/v1/tours
Response
- Status: 200 OK
PARAMS
page
duration[gte]
sort
GETGet (public) Statistics for Tours
{{URL}}api/v1/tours/stats
Use this endpoint to retrieve (public) statistics for tours.
Request
Method: GET
URL:
{{URL}}api/v1/tours/stats
Response
- Status: 200 OK
GETGet Top 5 Cheapest Tours
{{URL}}api/v1/tours/top-5-cheap
Use this endpoint to retrieve a list of the 5 cheapest tours.
Request
Method: GET
URL:
{{URL}}api/v1/
tours/top-5-cheap
Response
- Status: 200 OK
Loading