This page covers all public read endpoints for packages, categories, destinations, and availability, plus the authenticated endpoint for submitting reviews.
List packages
Return a paginated list of active tour packages. Only packages belonging to guides with an active subscription plan are included.
Query parameters
Full-text search against title and description.
Filter by destination ID.
Filter by package category ID.
Minimum adult price (inclusive).
Maximum adult price (inclusive).
Sort order. One of: newest (default), price_asc, price_desc, rating.
Items per page. Maximum 50. Defaults to 12.
Response 200 OK
Array of package summary objects. URL-safe identifier used in other endpoints.
Whether the package is featured.
Whether a discount is active.
0 = percentage, 1 = fixed amount.
URL of the cover image, or null.
Number of approved reviews.
Average star rating (1–5).
Pagination metadata: current_page, last_page, per_page, total.
{
"data" : [
{
"id" : 1 ,
"title" : "Serengeti Safari Adventure" ,
"slug" : "serengeti-safari-adventure" ,
"destination" : "Serengeti" ,
"category" : "Safari" ,
"duration" : 5 ,
"adult_price" : 450.00 ,
"children_price" : 225.00 ,
"infant_price" : 0.00 ,
"is_featured" : true ,
"discount" : true ,
"discount_amount" : 10 ,
"discount_type" : 0 ,
"cover_image" : "https://tripfy.africa/assets/upload/packages/serengeti.jpg" ,
"review_count" : 34 ,
"review_average" : 4.7 ,
"max_travelers" : 8 ,
"guide" : "James Oduya"
}
],
"meta" : {
"current_page" : 1 ,
"last_page" : 4 ,
"per_page" : 12 ,
"total" : 47
}
}
# All packages
curl "https://tripfy.africa/api/v1/packages"
# Safari packages under $500, sorted cheapest first
curl "https://tripfy.africa/api/v1/packages?category_id=2&max_price=500&sort=price_asc"
List categories
Return all active package categories. Use the id field to filter the packages list.
GET /api/v1/packages/categories
Response 200 OK
Display name, e.g. "Safari".
Category image URL, or null.
{
"data" : [
{ "id" : 1 , "name" : "Beach" , "image" : "https://tripfy.africa/assets/upload/categories/beach.jpg" },
{ "id" : 2 , "name" : "Safari" , "image" : "https://tripfy.africa/assets/upload/categories/safari.jpg" },
{ "id" : 3 , "name" : "Cultural" , "image" : "https://tripfy.africa/assets/upload/categories/cultural.jpg" }
]
}
curl https://tripfy.africa/api/v1/packages/categories
Featured packages
Return up to 10 currently featured packages ordered by newest first. Intended for home-screen carousels.
GET /api/v1/packages/featured
Response 200 OK
Same package summary shape as list packages , wrapped in data. No pagination — always returns at most 10 items.
{
"data" : [
{
"id" : 7 ,
"title" : "Zanzibar Spice Tour" ,
"slug" : "zanzibar-spice-tour" ,
"destination" : "Zanzibar" ,
"category" : "Cultural" ,
"duration" : 1 ,
"adult_price" : 85.00 ,
"is_featured" : true ,
"review_average" : 4.9 ,
"cover_image" : "https://tripfy.africa/assets/upload/packages/spice.jpg"
}
]
}
curl https://tripfy.africa/api/v1/packages/featured
Package detail
Return full details for a single active package, including media, itinerary, amenities, related packages, and a preview of reviews.
GET /api/v1/packages/{slug}
Path parameter
The package’s URL slug, e.g. serengeti-safari-adventure.
Response 200 OK
Includes all summary fields plus:
Show additional detail fields
Included facilities list.
Available departure time slots.
Places visited on the tour.
Array of image URLs for the gallery.
Dates with no availability.
Preview of recent approved reviews. Reviewer’s full name, or "Anonymous".
Date the review was submitted (YYYY-MM-DD).
Array of related package summaries.
{
"data" : {
"id" : 1 ,
"title" : "Serengeti Safari Adventure" ,
"slug" : "serengeti-safari-adventure" ,
"duration" : 5 ,
"adult_price" : 450.00 ,
"description" : "<p>Witness the Great Migration...</p>" ,
"time_slots" : [ "06:00" , "14:00" ],
"media" : [
"https://tripfy.africa/assets/upload/packages/img1.jpg" ,
"https://tripfy.africa/assets/upload/packages/img2.jpg"
],
"reviews" : [
{
"id" : 12 ,
"rating" : 5 ,
"comment" : "Absolutely breathtaking experience." ,
"user" : "Sofia Müller" ,
"created_at" : "2024-05-20"
}
],
"related" : []
}
}
curl https://tripfy.africa/api/v1/packages/serengeti-safari-adventure
Package reviews
Return a paginated list of approved top-level reviews for a package, along with the overall average rating.
GET /api/v1/packages/{slug}/reviews
Path parameter
Response 200 OK
Array of approved reviews, 10 per page.
Average star rating across all approved reviews (1 decimal place).
Total number of approved reviews.
{
"data" : [
{
"id" : 12 ,
"rating" : 5 ,
"comment" : "One of the best safari experiences of my life." ,
"user" : { "name" : "Sofia Müller" , "image" : null },
"created_at" : "2024-05-20"
}
],
"meta" : {
"average" : 4.7 ,
"total" : 34
}
}
curl "https://tripfy.africa/api/v1/packages/serengeti-safari-adventure/reviews"
List destinations
Return all active destinations ordered by visitor count (most visited first).
Response 200 OK
Destination name, e.g. "Zanzibar".
Short description, or null.
Destination image URL, or null.
Number of recorded visits.
{
"data" : [
{
"id" : 1 ,
"title" : "Zanzibar" ,
"slug" : "zanzibar" ,
"description" : "Spice island off the coast of Tanzania." ,
"image" : "https://tripfy.africa/assets/upload/destinations/zanzibar.jpg" ,
"visitor_count" : 1240
}
]
}
curl https://tripfy.africa/api/v1/destinations
Destination detail
Return a single destination together with up to 20 of its active packages (featured packages listed first).
GET /api/v1/destinations/{slug}
Path parameter
The destination slug, e.g. zanzibar.
Response 200 OK
Destination fields plus a packages array. Show packages array fields
Cover image URL, or null.
{
"data" : {
"id" : 1 ,
"title" : "Zanzibar" ,
"slug" : "zanzibar" ,
"description" : "Spice island off the coast of Tanzania." ,
"image" : "https://tripfy.africa/assets/upload/destinations/zanzibar.jpg" ,
"visitor_count" : 1240 ,
"packages" : [
{
"id" : 7 ,
"title" : "Zanzibar Spice Tour" ,
"slug" : "zanzibar-spice-tour" ,
"duration" : 1 ,
"adult_price" : 85.00 ,
"is_featured" : true ,
"review_average" : 4.9 ,
"cover_image" : "https://tripfy.africa/assets/upload/packages/spice.jpg"
}
]
}
}
curl https://tripfy.africa/api/v1/destinations/zanzibar
Check availability
Return the number of available spaces for a package on a specific date. No authentication required — useful for showing availability before a user logs in.
GET /api/v1/bookings/availability
Query parameters
Slug of the package to check.
Date to check in YYYY-MM-DD format. Must be today or in the future.
Response 200 OK
Number of spaces still available on that date.
Maximum group size configured for the package.
{
"package" : "Serengeti Safari Adventure" ,
"date" : "2024-08-15" ,
"available" : 4 ,
"max" : 8
}
curl "https://tripfy.africa/api/v1/bookings/availability?package_slug=serengeti-safari-adventure&date=2024-08-15"
Submit a review
Create a review for a package. The review is held for admin approval before it appears publicly. You must have a confirmed (status=1) or completed (status=2) booking for the package to submit a review, and you can only submit one review per package.
Requires authentication.
Request parameters
The numeric ID of the package you are reviewing.
Star rating from 1 (worst) to 5 (best).
Review text. Minimum 10 characters, maximum 1 000 characters.
Response 201 Created
"Review submitted and pending approval. Thank you!"
The newly created review object. The submitted star rating.
Reviewer name and image URL.
Submission date (YYYY-MM-DD).
{
"message" : "Review submitted and pending approval. Thank you!" ,
"data" : {
"id" : 99 ,
"rating" : 5 ,
"comment" : "An unforgettable adventure from start to finish." ,
"user" : { "name" : "Amina Hassan" , "image" : null },
"created_at" : "2024-06-10"
}
}
Submitting a second review for the same package returns 422 Unprocessable Entity with { "message": "You have already submitted a review for this package." }.
curl -X POST https://tripfy.africa/api/v1/reviews \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"package_id": 1, "rating": 5, "comment": "An unforgettable adventure from start to finish."}'