Documentación de la API
El siguiente es el comando cURL para realizar una solicitud a la API de disponibilidad de autos:
curl --location 'https://api.basset.ws/cars/availabilities?pickup_location=MIA-AIRPORT&dropoff_location=MIA-AIRPORT&pickup_date=2024-02-05T10%3A00&dropoff_date=2024-02-10T10%3A00&driver_age=31&limit=20&offset=0&order_by=&site=AR&channel=DESKTOP' \
--header 'authority: api.basset.ws' \
--header 'accept: application/json' \
--header 'accept-language: es-ES,es;q=0.9' \
--header 'content-type: application/json' \
--header 'origin: https://app.basset.la' \
--header 'referer: https://app.basset.la/' \
--header 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Windows"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: cross-site' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
--header 'x-api-key: API-KEY' \
--header 'x-client-id: CLIENT-ID'
Descripción de la Solicitud:
- URL de la API:
https://api.basset.ws/cars/availabilities
- Método HTTP: GET
- Parámetros de la URL:
pickup_location
: MIA-AIRPORTdropoff_location
: MIA-AIRPORTpickup_date
: 2024-02-09T10:00dropoff_date
: 2024-02-23T10:00driver_age
: 31limit
: 20offset
: 0order_by
: (no especificado en la solicitud)- Encabezados:
authority
: api.basset.wsaccept
: application/jsonaccept-language
: es-ES,es;q=0.9content-type
: application/jsonorigin
: https://app.basset.lareferer
: https://app.basset.la/sec-ch-ua
: “Google Chrome”;v=”119″, “Chromium”;v=”119″, “Not?A_Brand”;v=”24″sec-ch-ua-mobile
: ?0sec-ch-ua-platform
: “Windows”sec-fetch-dest
: emptysec-fetch-mode
: corssec-fetch-site
: cross-siteuser-agent
: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36x-api-key
: API-KEYx-client-id
: CLIENT-ID
Respuesta de Ejemplo:
{
"clusters": [
{
"id": "36df75f3-8d63-11ee-bcd3-0242ac110002",
"provider": "AVIS",
"type": "STANDALONE",
"plan": "BASIC",
"equipments": [],
"coverages": {
"basic_plan": {
"coverages": [],
"total": 0
},
"premium_plan": {
"coverages": [],
"total": 0
}
},
"pickup": {
"date": "2024-02-09T10:00:00Z",
"location": {
"type": "AIRPORT",
"address": "Miami, FL, Estados Unidos (MIA-A. Internacional de Miami)",
"coordinates": {
"latitude": 25.8,
"longitude": -80.28333
}
}
},
"dropoff": {
"date": "2024-02-23T10:00:00Z",
"location": {
"type": "AIRPORT",
"address": "Miami, FL, Estados Unidos (MIA-A. Internacional de Miami)",
"coordinates": {
"latitude": 25.8,
"longitude": -80.28333
}
}
},
"fare": {
"base_rate": 2058.89,
"net_rate": 2058.89,
"total": 5936.466166666667,
"currency": "ARS",
"original_currency": {
"code": "ARS",
"ratio": 1
},
"charges": [
{
"type": "markup",
"amount": 686.2966666666666,
"vat": 0,
"currency": "ARS",
"collector": "AGENCY"
}
],
"fees": [
{
"type": "PAIS",
"amount": 617.667,
"currency": "ARS"
},
{
"type": "RG4815/20",
"amount": 2058.89,
"currency": "ARS"
},
{
"type": "RG5272/22",
"amount": 514.7225,
"currency": "ARS"
}
]
},
"tracking_id": "ab7c8185-a7ef-48a4-a7ea-91cddd0d510",
"rate_code": "JQ"
}
],
"total": 15,
"limit": 20,
"offset": 0,
"filters": {
"categories": [
{
"value": "STANDARD",
"label": "STANDARD"
},
{
"value": "FULL_SIZE",
"label": "FULL_SIZE"
},
// ... (otras categorías)
],
"passengers_quantity": [
{
"value": "4",
"label": "4"
},
{
"value": "5",
"label": "5"
},
// ... (otras cantidades de pasajeros)
],
// ... (otros filtros)