GreenPlaces Integrations
HomeDashboard
  • 👋Welcome to GreenPlaces
  • Overview
    • Adding your Team
    • Available Integrations
      • 👥HRIS
      • ⚡Utilities
      • 📖Accounting
    • Configuring SSO
  • Integrations
    • HRIS
    • Accounting
    • Utilities
  • GreenPlaces API
    • 🌏API Overview
    • 🔐Authentication
    • 🧭API Reference
      • Air travel
        • Bulk
        • Segments
      • Appliances
        • File
      • Expenses
      • Locations
      • Vehicles
      • Vendors
    • Specification
  • Page
Powered by GitBook
On this page
  1. GreenPlaces API
  2. API Reference
  3. Air travel

Bulk

PreviousAir travelNextSegments
🧭

Bulk store AirTravel

post

Bulk store AirTravel for a company

Body

Bulk create AirTravel request body data

Responses
200
Successful operation
application/json
400
Bad Request
application/json
403
Unauthenticated
application/json
404
Not Found
application/json
500
Internal Server
application/json
post
POST /api/air-travel/bulk HTTP/1.1
Host: app.greenplaces.com
Content-Type: application/json
Accept: */*
Content-Length: 421

{
  "flights": [
    {
      "traveler_name": "test name",
      "traveler_email": "test@gmail.com",
      "spend_amount": "2000.32",
      "currency": "USD",
      "segments": [
        {
          "airline_id": "000f13cd-d397-44cb-948b-edace9f8b4dc",
          "flight_date": "2023-03-17",
          "flight_number": "A1212",
          "flight_status": "completed",
          "started_at": "2023-03-17 12:34:56",
          "ended_at": "2023-03-17 13:45:30",
          "aircraft": {},
          "departure_id": "AGAT",
          "arrival_id": "730fcf91-1d3c-44e7-b4ef-7c9dbb7d8aee"
        }
      ]
    }
  ]
}
{
  "status": "Ok",
  "message": "Success",
  "data": [
    {
      "id": "996501df-0bfc-4f95-954d-3a5d5dc48469",
      "traveler_name": "test name",
      "traveler_email": "test@gmail.com",
      "spend_amount": "2000.32",
      "distance_mi": "9164",
      "distance_km": "14745",
      "currency": "USD",
      "segments": [
        {
          "id": "99b80a01-fd16-4c8a-9716-db37407bdc67",
          "departure": {
            "id": "36616115-61ba-4890-a6ce-ddb4e4e68ec4",
            "iata_code": "ATD",
            "icao_code": "AGAT",
            "airport_name": "Atoifi"
          },
          "arrival": {
            "id": "300a8ec20-ad3b-4377-a003-0baa23deae3e",
            "iata_code": "ERM",
            "icao_code": "SSER",
            "airport_name": "Comandante Kraemer"
          },
          "started_at": "2023-06-12 17:30:21",
          "ended_at": "2023-06-12 17:30:21",
          "flight_date": "2023-06-12",
          "flight_status": "Completed",
          "flight_number": "A121312",
          "distance_mi": "9164",
          "distance_km": "14745",
          "airline": {
            "id": "000f13cd-d397-44cb-948b-edace9f8b4dc",
            "iata_code": "7P",
            "icao_code": "PST",
            "airline_name": "Air Panama dba Parsa, S.A."
          },
          "emission": {
            "scope": "3",
            "carbon_equivalent": "6573.6700",
            "carbon_dioxide": "2641.0894",
            "methane": "0.1460",
            "nitrous_oxide": "13.1397"
          }
        }
      ]
    }
  ],
  "meta": {}
}