# Validar Dirección

## Validar Dirección

<mark style="color:green;">`POST`</mark> `https://www.rapigo.co/api/v1/validate_address/`

Valida que una dirección puede ser georreferenciada

#### Headers

| Name           | Type   | Description      |
| -------------- | ------ | ---------------- |
| Authentication | string | Token Basic Auth |

#### Request Body

| Name     | Type   | Description         |
| -------- | ------ | ------------------- |
| lon      | string | latitud             |
| lat      | string | longitud            |
| city\_id | number | Ciudad              |
| address  | string | Dirección a validar |

{% tabs %}
{% tab title="200 Respuesta " %}

```javascript
{
    "result": true
}

{
    "message": "without geographic coverage",
    "result": false
}

{ 
    "result": false, 
    "message": "not found"
}
```

{% endtab %}
{% endtabs %}

## Ejemplo en php

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://www.rapigo.co/api/v1/validate_address/');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'postman-token' => 'bc28b90a-c12d-b8a2-b272-7f8f881052a7',
  'cache-control' => 'no-cache',
  'content-type' => 'application/x-www-form-urlencoded',
  'authorization' => 'Basic anVsaWFuQHJhcGlnby5jbzpjb2xvbWJpYTEyMjQ='
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'address' => 'carrera 38A #25A-69'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```


---

# Agent Instructions: 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:

```
GET https://apidocs.rapigo.co/api/validar-direccion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
