Flota
Buscá disponibilidad en las marcas habilitadas y minteá un token para fijar un vehículo específico.
POST /fleet/list — Paso 1: búsqueda de disponibilidad
Fan-out en paralelo a todas las marcas habilitadas para tu tenant; devuelve un cars[] plano. Una marca que falla o timeouteá contribuye a meta y errors pero no rompe la respuesta completa — /fleet/list nunca devuelve 5xx por un upstream caído.
| Campo | Tipo | Notas |
|---|---|---|
| pickup_location | pickup_lat+lng | pickup_place_uuid | string | numeric | uuid | One of three is requerido. Ditto for dropoff; dropoff mirrors pickup if omitted. |
| pickup_radius_km | int, 0..500 | opcional, default 50. Only used for lat/lng resolution. |
| pickup_date / dropoff_date | YYYY-MM-DD | requerido. |
| pickup_time / dropoff_time | HH:MM | requerido. |
| passenger_country_code | ISO-3166 alpha-2 | requerido. |
| passenger_age | int, 18..99 | requerido. |
| brand | brands[] | int | int[] | opcional. Omit to fan out to every enabled brand. |
| include_unbookable | bool | Default true. |
Cuerpo de la request
curl -X POST https://greenflow.live/api/v1/fleet/list \
-H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP" \
-H "Content-Type: application/json" \
-d '{
"pickup_location": "AACGH",
"pickup_date": "2026-05-15", "pickup_time": "10:00",
"dropoff_date": "2026-05-18", "dropoff_time": "10:00",
"passenger_country_code": "BR",
"passenger_age": 30,
"brands": [11]
}'
Respuesta · 200 OK
{
"cars": [
{
"brand_id": 11, "brand_code": "LOCALIZA", "brand_name": "LOCALIZA",
"vehicle_code": "B", "vehicle_name": "Fiat Mobi 1.0",
"transmission": "Manual", "seats": 4, "doors": 2, "luggage": 4,
"price": { "currency": "BRL", "total": 272.38, "daily": null },
"rates": [
{ "code": "011880", "name": "Padrão", "currency": "BRL",
"total_amount": 236.85, "estimated_total_amount": 272.38 }
],
"bookable": true, "bookable_reason": null,
"pickup_office": "AACGH", "dropoff_office": "AACGH"
}
],
"offices": [{ "id": 27712, "code": "AACGH", "name": "AGENCIA AEROPORTO CONGONHAS", "brand_id": 11 }],
"places": { "pickup": [], "dropoff": [] },
"groups": [],
"days_calc": 3,
"meta": { "LOCALIZA": { "count": 22, "bookable_count": 22, "ms": 1404, "rate_codes": ["011880"] } },
"errors": {},
"cached": false
}
Resolución de ubicación
Pasá una de tres formas: pickup_location (office code), pickup_lat + pickup_lng o pickup_place_uuid. Las coordenadas resuelven al office más cercano por marca. Los place UUID salen de GET /places/autocomplete.
POST /fleet/show — Paso 2: mintear tokenc
Re-ejecuta una cotización de un único vehículo y devuelve un tokenc que POST /bookings debe ecoar. El token cachea el envelope del proveedor por 3 horas para que el booking no tenga que volver a preguntarle al GDS los metadatos.
curl -X POST https://greenflow.live/api/v1/fleet/show \
-H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP" \
-H "Content-Type: application/json" \
-d '{
"brand": 11, "pickup_location": "AACGH", "dropoff_location": "AACGH",
"pickup_date": "2026-05-15", "pickup_time": "10:00",
"dropoff_date": "2026-05-18", "dropoff_time": "10:00",
"rate": "011880", "vehicle_code": "B",
"passenger_country_code": "BR", "passenger_age": 30
}'
{
"car": { "vehicle_code": "B", "price": { "currency": "BRL", "total": 272.38, "estimated_total": 272.38 }, "rates": [] },
"tokenc": "836c7fb31f624ca2a8b5a519f26825d2",
"installments": [
{"installments": 1, "amount": 272.38, "total": 272.38, "interest_rate": 0.0, "currency": "BRL", "stub": true}
],
"frequent_flyer_programs": [{"iata": "AR", "name": "Aerolineas Argentinas Plus"}],
"airlines": [{"iata": "AR", "name": "Aerolineas Argentinas"}]
}
Bloques de ajuste de tarifa
Cada rates[i] expone arrays opcionales equipments[], coverages[], inclusions[], taxes[] y discounts[]. El soporte varía por marca; tratalos a todos como opcionales y hacé feature-detection por tarifa.
Errores
| HTTP | Body |
|---|---|
| 401 | {"message": "Invalid API key"} |
| 422 | {"message": "The pickup location field is required."} |
| 422 | {"message": "Unknown pickup_place_uuid or place has no coordinates."} |