> For the complete documentation index, see [llms.txt](https://truq-services.gitbook.io/merchants/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://truq-services.gitbook.io/merchants/booking-management/trip-booking/booking-a-standard-trip.md).

# Booking a standard trip

Booking a standard trip is a feature available on the customer dashboard, and via Open API that allows your customers to create a trip, while you manage the trip information processes from initiation to reconciliation.

So when your customers book a trip, they can view the trip on their dashboard, while you manage the trip process on your dashboard.&#x20;

### Collect trip information

The `trip_type`, `category_size`,  `scheduled_date`, `source`, `destination`, and parameters are required to book a customer trip. They are not optional. The `email`,  `first_name`, `last_name`, and `phone` fields allow us to validate the user.&#x20;

The `callback_url` field is an optional field which redirects back to your application after a successful payment checkout.

{% code title="Endpoint" %}

```url
https://dodge.truq.it/booking-service/booking/booking-trip/create_open_trip/
-H "Authorization: Bearer YOUR_PUBLIC_KEY"
-H "Organisation: YOUR_REFERENCE"
-X POST
```

{% endcode %}

{% code title="Request Body" %}

```json
{ 
    "source": { 
        "address": "Ikoyi", 
        "latitude": 6.4500, 
        "longitude": 3.4333, 
        "state": "Lagos" 
    }, 
    "destination": { 
        "address": "Ikoyi", 
        "latitude": 6.4500, 
        "longitude": 3.4333, 
        "state": "Lagos",
        "stops": {
            "number": 0,
            "stopovers": []
        }
    },
    "email": "john@doe.com",
    "first_name": "John",
    "last_name": "Doe",
    "phone": "2348000000000",
    "trip_type": "INTRASTATE",
    "category_size": "422cd8e2-4a19-42c2-97c8-xxxxxxxxxxxx",
    "callback_url": "https://beta.mytruq.com/tracking-page",
    "scheduled_date": "2023-03-22T10:00:00.755446+00:00"   
}
```

{% endcode %}

{% code title="Response" lineNumbers="true" %}

```json
{
    "status": "SUCCESS",
    "message": "Successfully calculated trip quote information",
    "data": {
        "id": "422cd8e2-4a19-42c2-97c8-xxxxxxxxxxxx",
        "reference": "BORA86N05112023011452",
        "source": {
            "address": "Ikoyi",
            "latitude": 6.45,
            "longitude": 3.4333,
            "state": "Lagos"
        },
        "destination": {
            "address": "Ojuelegba",
            "latitude": 6.5111,
            "longitude": 3.3666,
            "state": "Lagos",
            "stops": {
                "number": 0,
                "stopovers": []
            }
        },
        "organisation": "BOR_A86N",
        "is_interoperability": false,
        "category_size": "422cd8e2-4a19-42c2-97c8-xxxxxxxxxxxx",
        "trip_type": "INTRASTATE",
        "system_trip_type": "INTRASTATE",
        "extras": {
            "packaging_boxes": 0
        },
        "is_transit": false,
        "is_completed": false,
        "distance": 14.233,
        "helper_info": {},
        "added_on": "2023-05-10T08:34:51.655502Z",
        "status": "INITIATED",
        "system_status": "INITIATED",
        "is_insured": false,
        "is_paid": false,
        "quote": {
            "base_fare": 200.0,
            "cost_per_kilometer": 4269.9,
            "vat_value": 11.625,
            "platform_fee": 75.0,
            "helper_charge": 0.0,
            "charge": 4556.525,
            "total_charge": 4556.525,
            "currency": "NGN",
            "reference": "TRIP-PYT-BORA86N05102023083452",
            "estimated_value": 0.0,
            "checkout_url": "https://checkout.paystack.com/xxxxxxxxxx"
        },
        "vehicle_payment": {
            "vehicle_payment": 3863.16,
            "currency": "NGN",
            "is_paid": false
        },
        "scheduled_date": "2023-03-22T10:00:06.755446Z",
        "confirmation": {},
        "user_journey": [
            {
                "status": "INITIATED",
                "system_status": "INITIATED",
                "message": "Trip Initiated",
                "time": "2023-05-10 08:34:52.857545+00:00",
                "longitude": 6.5111,
                "latitude": 3.4333
            }
        ]
    }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://truq-services.gitbook.io/merchants/booking-management/trip-booking/booking-a-standard-trip.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
