Overview

This API allows authenticated companies to manage their own tours, activities, and submit bookings. It supports CRUD operations and is protected via Sanctum Token Authentication.

Authentication

All requests must include a Bearer Token obtained after login or registration.

Authorization: Bearer YOUR_API_KEY

Query Parameters (for GET /company/tours)

  • search – Filter by keyword
  • sort – e.g., asc or desc
  • destination – Filter by destination name
  • duration – e.g., 1-3, 4-7
  • price – e.g., 0-500
  • type – e.g., Private, Group

Endpoints

Returns a list of your company’s tours (with filters).

curl -X GET "https://yourdomain.com/api/company/tours" \
-H "Authorization: Bearer YOUR_API_KEY"

Returns the latest added tours.

curl -X GET "https://yourdomain.com/api/company/tours/latest" \
-H "Authorization: Bearer YOUR_API_KEY"

Creates a new tour with provided details.

curl -X POST "https://yourdomain.com/api/company/tours" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
    "title": "Desert Safari",
    "price": 250,
    "duration": "1 day"
}'

Returns details of a specific tour.

curl -X GET "https://yourdomain.com/api/company/tours/1" \
-H "Authorization: Bearer YOUR_API_KEY"

Updates a specific tour.

curl -X PUT "https://yourdomain.com/api/company/tours/1" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
    "price": 300
}'

Deletes a specific tour.

curl -X DELETE "https://yourdomain.com/api/company/tours/1" \
-H "Authorization: Bearer YOUR_API_KEY"

Returns a list of company activities.

curl -X GET "https://yourdomain.com/api/company/activities" \
-H "Authorization: Bearer YOUR_API_KEY"

Creates a new activity.

curl -X POST "https://yourdomain.com/api/company/activities" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
    "name": "Jet Skiing",
    "location": "Dubai Marina"
}'

Submits a booking request for a tour.

curl -X POST "https://yourdomain.com/api/company/tour/book" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
    "tour_id": 1,
    "check_in_date": "2025-10-01",
    "check_out_date": "2025-10-02",
    "guests": 2,
    "customer_name": "John Doe",
    "customer_email": "john@example.com",
    "phone": "+971500000000"
}'

Error Handling

  • 200 OK – Request successful
  • 201 Created – Resource created successfully
  • 400 Bad Request – Missing or invalid data
  • 401 Unauthorized – Invalid or missing token
  • 404 Not Found – Resource not found
  • 500 Server Error – Internal server error

Getting Started

Register your account and start managing your tours and bookings with the API.