> ## Documentation Index
> Fetch the complete documentation index at: https://handbook.nyotaimara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/logistics/estimate — Get a Delivery Quote

> Request a live delivery fee and ETA for a pickup and dropoff location pair. The fee is sourced from Uber Direct and returned in KES as the lowest denomination.

Request a real-time delivery quote for a given pickup and dropoff coordinate pair. The fee is sourced live from Uber Direct and returned in KES. Use the `quoteId` when booking a delivery to lock in the quoted price.

<Info>
  Fees from Uber Direct are expressed in the lowest denomination (e.g. `25000` = 250 KES). The API returns the raw value — divide by 100 to display a human-readable amount.
</Info>

## Endpoint

```
POST /v1/logistics/estimate
```

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer <token>`
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  The ID of the organization requesting the estimate.
</ParamField>

## Request body

<ParamField body="pickup" type="object" required>
  Pickup location details.

  <Expandable title="properties">
    <ResponseField name="address" type="string">
      Human-readable street address of the pickup point.
    </ResponseField>

    <ResponseField name="lat" type="number">
      Latitude of the pickup location.
    </ResponseField>

    <ResponseField name="lng" type="number">
      Longitude of the pickup location.
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="dropoff" type="object" required>
  Dropoff location details.

  <Expandable title="properties">
    <ResponseField name="address" type="string">
      Human-readable street address of the dropoff point.
    </ResponseField>

    <ResponseField name="lat" type="number">
      Latitude of the dropoff location.
    </ResponseField>

    <ResponseField name="lng" type="number">
      Longitude of the dropoff location.
    </ResponseField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` on a successful request.
</ResponseField>

<ResponseField name="data" type="object">
  Delivery quote details.

  <Expandable title="properties">
    <ResponseField name="fee" type="number">
      Delivery fee in the lowest KES denomination (divide by 100 for display). For example, `25000` = KES 250.
    </ResponseField>

    <ResponseField name="quoteId" type="string">
      Uber Direct quote ID. Pass this when booking a delivery to use this quoted price.
    </ResponseField>

    <ResponseField name="eta" type="string">
      ISO 8601 timestamp of the estimated dropoff time.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```bash theme={null}
curl --request POST \
  --url https://api.nyotaimara.com/v1/logistics/estimate \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Organization-Id: <org-id>' \
  --header 'Content-Type: application/json' \
  --data '{
    "pickup": {
      "address": "The Hub Karen, Karen Road, Nairobi",
      "lat": -1.3193,
      "lng": 36.7172
    },
    "dropoff": {
      "address": "Two Rivers Mall, Limuru Road, Nairobi",
      "lat": -1.2302,
      "lng": 36.7991
    }
  }'
```

```json theme={null}
{
  "success": true,
  "data": {
    "fee": 25000,
    "quoteId": "qte_01j9...",
    "eta": "2025-04-26T15:45:00.000Z"
  }
}
```
