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

# Quickstart

> Get ready to easily integrate Vitau into your health software

The Vitau API is organized around REST. Our API receives and returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

To authenticate the client each request must provide its personal API KEY. Clients are trusted to safeguard the key.

## Fetching resources

```bash theme={null}
curl --request GET \\
  --url API_URL/api/some-route \\
  --header 'Accept: application/json' \\
  --header 'X-API-Key: {Client API Key}'
```

| Name       | Value type | Description                                                                    | Example                |
| ---------- | ---------- | ------------------------------------------------------------------------------ | ---------------------- |
| page       | int        | A page number within the paginated result set.                                 | ?page=1                |
| limit      | int        | Number of results to return per page.                                          | ?limit=10              |
| search     | string     | Returns all objects that contain the string in the specified lookup fields     | ?search=advil          |
| ordering   | string     | Field name to order the results. Prefix the value with '-' to reverse results. | ?ordering=-created\_at |
| field-name | string     | Filter results against the specified value.                                    | ?ean\_key=0123456      |

Paginated response structure:

In each paginated request, there is a “next” and “previous” field which specifies the url to request next (it contains the next or previous page number).

```json theme={null}
Status Code: 200 OK
{
"count": INT, // Number of total resources. Useful to show the number of pages.
"next": "API_URL/?page={int}", // URL of next page of results
"previous": "API_URL/?page={int}", // URL of previous page of results
"results": [...] // Array of result set
}

```

Without pagination the response only contains the array of results.

## Building Vitau's cart URL

Since there is no API interaction needed this is the simplest and quickest way to enable your customers to purchase the products they need!

The pre-made cart is a feature we use at Vitau and several commercial alliances use to direct a patient directly to the checkout of the products they use.

The base url is the following [https://vitau.mx/carrito](https://vitau.mx/carrito)
Sending the following query params:

* productos: EANs of the products inside the cart, separated by commas
* cantidades: numbers separated by commas, indicating the amount of each product you wish to have in your cart, following the same order of productos.

Example:

[https://vitau.mx/carrito?productos=123456,78910\&cantidades=1,2](https://vitau.mx/carrito?productos=123456,78910\&cantidades=1,2)

For a more advanced integration where you might want to query the available products and prices from the API read the following guide Public routes
