Crear cliente
Crear cliente
POST https://api.test.fandit.es/api/v2/clients/
Petición crear un nuevo cliente.
Cabeceras
| Authorization string | |
|---|---|
| Token de experto (Obligatorio). |
Parámetros de consulta (body)
Respuesta
Object
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 POST \--url 'https://api.test.fandit.es/api/v2/clients/' \ import requests
url = "https://api.test.fandit.es/api/v2/clients/"
response = requests.post(url)
print(response.status_code)
print(response.json())
const url = "https://api.test.fandit.es/api/v2/clients/";
const options = {
method: "POST",
headers: {
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
const url: string = "https://api.test.fandit.es/api/v2/clients/";
const options: RequestInit = {
method: "POST",
headers: {
}
};
const response = await fetch(url, options);
const data: any = await response.json();
console.log(data);
<?php
$url = "https://api.test.fandit.es/api/v2/clients/";
$curl = curl_init($url);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
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();
String url = "https://api.test.fandit.es/api/v2/clients/";
Request request = new Request.Builder()
.url(url)
.post()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
}
}
Respuesta Ejemplo de respuesta
{
"id": 3102,
"expert_data": {
"id": 45,
"name": "María Fernández",
"email": "maria.fernandez@despacho.es"
},
"experts": [
45
],
"public": false,
"status": 1,
"platform_data": {
"id": 2,
"name": "FANDIT"
},
"nif": "B98765432",
"business_name": "Talleres Mecánicos Rivas SL",
"email": "admin@talleresrivas.es",
"phone": "911223344",
"reference": null,
"notes": null,
"province": [],
"address": "",
"postal_code": "",
"location": "",
"legal_representative_name": "",
"legal_representative_nif": "",
"legal_representation_type": "",
"contacts": "",
"cnaes": [],
"provinces_to_work": [],
"applicant_types": [],
"action_items": [],
"employees_quantity": null,
"constitution_date": null,
"last_year_billing": null,
"investment_budget": null,
"project_description": ""
}