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

# API Introduction

> Overview of the Viax API - rideshare platform for Colombia

## Welcome to Viax API

The Viax API is a RESTful API that powers the Viax rideshare platform, connecting passengers with drivers in Colombia. The API provides endpoints for user management, trip booking, driver operations, mapping services, and administrative functions.

## Base URLs

The API supports multiple environments:

<CodeGroup>
  ```bash Production theme={null}
  https://76.13.114.194
  ```

  ```bash Development (Local Network) theme={null}
  http://192.168.18.68/viax/backend
  ```

  ```bash Development (Android Emulator) theme={null}
  http://10.0.2.2/viax/backend
  ```
</CodeGroup>

## API Architecture

Viax uses a microservices-oriented architecture with the following service endpoints:

<CardGroup cols={2}>
  <Card title="Auth Service" icon="lock">
    `/auth` - Authentication and user management
  </Card>

  <Card title="Conductor Service" icon="user-tie">
    `/conductor` - Driver profile, documents, and earnings
  </Card>

  <Card title="Trip Service" icon="route">
    `/viajes` - Trip creation, tracking, and history
  </Card>

  <Card title="Map Service" icon="map">
    `/map` - Geocoding, routing, and location services
  </Card>

  <Card title="Admin Service" icon="shield">
    `/admin` - Administrative operations and analytics
  </Card>
</CardGroup>

## API Version

Current API version: **v1**

The API version is included in the service configuration and can be accessed via the `apiVersion` field in configuration responses.

## Request Format

All API requests should include the following headers:

```http theme={null}
Content-Type: application/json
Accept: application/json
```

Request bodies should be formatted as JSON:

```json theme={null}
{
  "email": "user@example.com",
  "password": "securePassword123"
}
```

## Response Format

All API responses follow a consistent structure:

### Success Response

```json theme={null}
{
  "success": true,
  "message": "Operation completed successfully",
  "data": {
    // Response data here
  }
}
```

### Error Response

```json theme={null}
{
  "success": false,
  "message": "Error description",
  "error": "ERROR_CODE"
}
```

## Rate Limiting

<Note>
  Currently, the API does not enforce rate limiting, but this may be implemented in future versions.
</Note>

## Timeout Configuration

The API has the following timeout settings:

* **Connection Timeout**: 30 seconds
* **Receive Timeout**: 30 seconds

Clients should implement appropriate timeout handling and retry logic.

## CORS

The API supports Cross-Origin Resource Sharing (CORS) for web applications. Ensure your requests include appropriate origin headers.

## Data Types

### Dates and Times

All timestamps are returned in ISO 8601 format:

```json theme={null}
"creado_en": "2024-03-15T14:30:00.000Z"
```

Dates are stored in UTC and should be converted to local time on the client.

### Numeric Values

* **IDs**: Integer
* **Prices**: Float (in Colombian Pesos)
* **Distances**: Float (in kilometers)
* **Coordinates**: Float (latitude/longitude in decimal degrees)

## Pagination

Endpoints that return lists support pagination with the following query parameters:

<ParamField query="page" type="integer" default="1">
  Page number to retrieve
</ParamField>

<ParamField query="per_page" type="integer" default="20">
  Number of items per page (max 100)
</ParamField>

Paginated responses include metadata:

```json theme={null}
{
  "success": true,
  "data": [...],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 150,
    "total_pages": 8
  }
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api/authentication">
    Learn how to authenticate your API requests
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/api/error-handling">
    Understand error codes and handling
  </Card>

  <Card title="User Registration" icon="user-plus" href="/api/auth/register">
    Register a new user account
  </Card>

  <Card title="Create Trip" icon="car" href="/api/trips/create">
    Book a ride
  </Card>
</CardGroup>
