Listado de clientes
Listado de clientes
GET https://api.test.fandit.es/api/v2/clients/
Petición paginada para obtener todos los clientes que correspondan según el permiso del gestor.
Cabeceras
| Authorization string | |
|---|---|
| Token de experto (Obligatorio). |
Parámetros de consulta (query params)
Respuesta
Object
count number
next string
previous string
results array of objects
id number
expert_data object
id number
name string
email string
experts array of numbers
public boolean
status number
platform_data object
nif string
business_name string
email string
phone null
reference null
notes null
province array of numbers
address string
postal_code string
location string
legal_representative_name string
legal_representative_nif string
legal_representation_type string
contacts string
cnaes array of numbers
provinces_to_work array of numbers
applicant_types array of numbers
action_items array of numbers
employees_quantity number
constitution_date string
last_year_billing number
investment_budget number
project_description string
curl--request GET \--url 'https://api.test.fandit.es/api/v2/clients/' \--get \ --data-urlencode 'page=1' \ --data-urlencode 'page_size=10' \ --data-urlencode 'isActive=0' \ --data-urlencode 'filters={"order":"-updated_at","status__in":"1"}' \ import requests
url = "https://api.test.fandit.es/api/v2/clients/"
params = {
"page": "1",
"page_size": "10",
"isActive": "0",
"filters": "{\"order\":\"-updated_at\",\"status__in\":\"1\"}"
}
response = requests.get(url, params=params)
print(response.status_code)
print(response.json())
const url = "https://api.test.fandit.es/api/v2/clients/";
const params = new URLSearchParams({
"page": "1",
"page_size": "10",
"isActive": "0",
"filters": "{\"order\":\"-updated_at\",\"status__in\":\"1\"}"
});
const options = {
method: "GET",
headers: {
}
};
const response = await fetch(`${url}?${params}`, options);
const data = await response.json();
console.log(data);
const url: string = "https://api.test.fandit.es/api/v2/clients/";
const params: URLSearchParams = new URLSearchParams({
"page": "1",
"page_size": "10",
"isActive": "0",
"filters": "{\"order\":\"-updated_at\",\"status__in\":\"1\"}"
});
const options: RequestInit = {
method: "GET",
headers: {
}
};
const response = await fetch(`${url}?${params}`, options);
const data: any = await response.json();
console.log(data);
<?php
$url = "https://api.test.fandit.es/api/v2/clients/";
$query = http_build_query([
"page" => "1",
"page_size" => "10",
"isActive" => "0",
"filters" => "{\"order\":\"-updated_at\",\"status__in\":\"1\"}"
]);
$curl = curl_init("$url?$query");
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
]
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.IOException;
import okhttp3.*;
public class FanditApiExample {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
HttpUrl url = HttpUrl.parse("https://api.test.fandit.es/api/v2/clients/").newBuilder()
.addQueryParameter("page", "1")
.addQueryParameter("page_size", "10")
.addQueryParameter("isActive", "0")
.addQueryParameter("filters", "{\"order\":\"-updated_at\",\"status__in\":\"1\"}")
.build();
Request request = new Request.Builder()
.url(url)
.get()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
}
}
Respuesta Ejemplo de respuesta
{
"count": 128,
"next": "https://api.test.fandit.es/api/v2/clients/?page=2&page_size=10",
"previous": null,
"results": [
{
"id": 3021,
"expert_data": {
"id": 45,
"name": "María Fernández",
"email": "maria.fernandez@despacho.es"
},
"experts": [
45,
52
],
"public": false,
"status": 1,
"platform_data": {
"id": 2,
"name": "FANDIT"
},
"nif": "B12345678",
"business_name": "Innovatech Soluciones SL",
"email": "contacto@innovatech-soluciones.es",
"phone": null,
"reference": null,
"notes": null,
"province": [
28
],
"address": "Calle Alcalá 120, 3ºB",
"postal_code": "28009",
"location": "Madrid",
"legal_representative_name": "Carlos Ruiz Gómez",
"legal_representative_nif": "12345678Z",
"legal_representation_type": "Administrador único",
"contacts": "Carlos Ruiz Gómez - 600111222",
"cnaes": [
6201,
6202
],
"provinces_to_work": [
28,
8
],
"applicant_types": [
1,
3
],
"action_items": [
1,
2
],
"employees_quantity": 18,
"constitution_date": "2015-03-12",
"last_year_billing": 850000,
"investment_budget": 120000,
"project_description": "Digitalización de procesos internos y desarrollo de nueva plataforma de gestión."
},
{
"id": 3045,
"expert_data": {
"id": 52,
"name": "Javier Ortega",
"email": "javier.ortega@despacho.es"
},
"experts": [
52
],
"public": true,
"status": 1,
"platform_data": {
"id": 2,
"name": "FANDIT"
},
"nif": "44556677Q",
"business_name": "Panadería Hermanos Soler",
"email": "info@panaderiasoler.es",
"phone": null,
"reference": "REF-2024-0198",
"notes": "Cliente interesado en ayudas de digitalización",
"province": [
8
],
"address": "Avinguda Diagonal 455",
"postal_code": "08036",
"location": "Barcelona",
"legal_representative_name": "Marta Soler Puig",
"legal_representative_nif": "87654321X",
"legal_representation_type": "Autónomo",
"contacts": "Marta Soler Puig - 611223344",
"cnaes": [
1071
],
"provinces_to_work": [
8
],
"applicant_types": [
2
],
"action_items": [
3
],
"employees_quantity": 6,
"constitution_date": "2019-07-01",
"last_year_billing": 210000,
"investment_budget": 35000,
"project_description": "Ampliación de obrador y compra de maquinaria."
}
]
}