$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://api.domus.la/brokers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: TOKEN_INGRESO",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"data": [
{
"id": 30283,
"idnumber": 1130682732,
"name": "erika viviana",
"lastname": "timana tellez"
}
]
}
| Parametro | Descripcion | Ejemplo |
|---|---|---|
| Authorization | Token : Llave de acceso | 'authorization' => 'TOKEN_AUTENTICACION' |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://api.domus.la/brokers?name=...",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => array(
"authorization: TOKEN_INGRESO",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"data": {
"code": 16534,
"document": "12345678912345",
"name": "Prueba",
"last_name": "Prueba 2",
"phone": "123456789",
"cell_phone": 0,
"address": null,
"email": "[email protected]",
"branch": 100,
"verification_digit": "1",
"picture_url": "https://prueba.com/picture.png",
"color": "",
"order": 0,
"department": "",
"description": "",
"mls_biz": 0,
"alternative_email": ""
}
}
| Parametro | Descripcion | Ejemplo |
|---|---|---|
| Authorization | Token : Llave de acceso | 'authorization' => 'TOKEN_AUTENTICACION' |
| Parametro | Descripcion | Ejemplo |
|---|---|---|
| document * | Cédula del asesor | &document=12345 |
| name * | Nombres del asesor sin apellidos | &name=Prueba |
| last_name * | Apellidos del asesor | &last_name=Prueba |
| phone | Teléfono fijo del asesor | &phone=12345 |
| cell_phone | Celular del asesor | &cell_phone=12345 |
| address * | Dirección del asesor | &cell_phone=12345 |
| email * | Correo del asesor | [email protected] |
| picture_url | URL de foto del asesor | &picture_url=https://prueba.com/imagen.png |
| order | Orden para mostrar los asesores en página web y otras listas | &order=1 |
| department | Departamento de la empresa en que trabaja el asesor | &department=Administracion |
| description | Descripción o perfil del asesor, cualidades, habilidades, etc... | &description=Administracion |
| mls_biz | Gestión de inmuebles para la que perfil del usuario está asignado | &mls_biz=1 |
| alternative_email | Correo alternativo para contactar al asesor | [email protected] |