Inflights API (v0-alpha)

Download OpenAPI specification:Download

Introduction

Welcome to Inflights' API reference.

The Inflights API allows you to integrate with our platform, so you can allow your clients to order drone data anywhere in the world through a seamlessly integrated experience.

You can request API access via info@inflights.com

How does it work?

The API supports operations similar to the ones a customer would go through if they were to order a flight via Inflights' Quote tool:

  1. Indicate an area that you want to survey.
  2. Request a quote for the flight.
  3. Receive the quote with price.
  4. Accept or reject the quote.
  5. Receive the deliverables once the flight and processing are done.

Webhooks

Wehbooks can be used to retrieve updates about various events related to e.g. flights.

Currently the following events are supported:

  • flight_created
  • flight_price_updated
  • flight_quote_accepted
  • flight_cancelled
  • flight_pilot_confirmed
  • flight_scheduled
  • flight_rescheduled
  • flight_marked_as_completed

The webhooks will POST a JSON payload to an endpoint of your choosing, and will retry until the endpoint returns a successful status in the 2xx range (for example 200 OK or 201 Created).

All webhook events will have an "event_name" and "data" property. Currently, all events relate to flights, so their "data" propertly will contain the flight info in the same format like you would get from the API endpoints.

Here's an example of the flight_created event:

{
  "event_name": "flight_created",
  "data": {
    "flight": {
      "id": 123,
      "regulation_status": "authorised_to_fly",
      "quote_accepted_at": "2021-03-23T09:00:00.000Z",
      "cancelled_at": null,
      "completed_at": null,
      "price": 1234.5,
      "scheduled_flight_date": null,
      "backup_scheduled_flight_date": null,
      "pilot_confirmed": false
    }
  }
}

Authentication

basic

All endpoints require authentication via the 'Basic' HTTP Authentication scheme

Security Scheme Type HTTP
HTTP Authorization Scheme basic

Flights

Returns all flights

This endpoint returns all flights associated with the currently used API credentials.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "flights": [
    • {
      • "id": 1001,
      • "regulation_status": "authorised_to_fly",
      • "price": 1400.5,
      • "quote_accepted_at": "2020-08-24T14:15:22Z",
      • "cancelled_at": null,
      • "completed_at": "2020-10-01T12:00:00Z",
      • "scheduled_flight_date": "2020-09-23",
      • "backup_scheduled_flight_date": "2020-09-24",
      • "pilot_confirmed": true
      }
    ],
  • "pagination": {
    • "current_page": 1,
    • "per_page": 50,
    • "total_pages": 1,
    • "total_items": 1
    }
}

Creating a new quote

This endpoint creates a quote to fly over a specific area and have a specific product delivered. After this API has been called, the quote still needs to be accepted before we will proceed to scheduling and executing the flight.

Authorizations:
Request Body schema: application/json
product_id
integer

The identifier of the selected product.

Array of objects (flight_areas)

One or more areas to fly.

object

Information about the location which a pilot can use to organize the flight (e.g. contact someone at the location).

Responses

Request samples

Content type
application/json
{
  • "product_id": 0,
  • "areas": [
    • {
      • "type": "Feature",
      • "properties": { },
      • "geometry": {
        }
      }
    ],
  • "location": {
    • "address": "string",
    • "country_code": "BE",
    • "latitude": 4.38,
    • "longitude": 50.85
    }
}

Response samples

Content type
application/json
{
  • "flight": {
    • "id": 1001,
    • "regulation_status": "authorised_to_fly",
    • "price": 1400.5,
    • "quote_accepted_at": "2020-08-24T14:15:22Z",
    • "cancelled_at": null,
    • "completed_at": "2020-10-01T12:00:00Z",
    • "scheduled_flight_date": "2020-09-23",
    • "backup_scheduled_flight_date": "2020-09-24",
    • "pilot_confirmed": true
    }
}

Preview a flight quote

This endpoint previews the response you would get if you created a flight via POST /flights.

Authorizations:
Request Body schema: application/json
product_id
integer

The identifier of the selected product.

Array of objects (flight_areas)

One or more areas to fly.

object

Information about the location which a pilot can use to organize the flight (e.g. contact someone at the location).

Responses

Request samples

Content type
application/json
{
  • "product_id": 0,
  • "areas": [
    • {
      • "type": "Feature",
      • "properties": { },
      • "geometry": {
        }
      }
    ],
  • "location": {
    • "address": "string",
    • "country_code": "BE",
    • "latitude": 4.38,
    • "longitude": 50.85
    }
}

Response samples

Content type
application/json
{
  • "flight": {
    • "id": 1001,
    • "regulation_status": "authorised_to_fly",
    • "price": 1400.5,
    • "quote_accepted_at": "2020-08-24T14:15:22Z",
    • "cancelled_at": null,
    • "completed_at": "2020-10-01T12:00:00Z",
    • "scheduled_flight_date": "2020-09-23",
    • "backup_scheduled_flight_date": "2020-09-24",
    • "pilot_confirmed": true
    }
}

Get a flight

Returns information associated with the flight.

Authorizations:
path Parameters
flight_id
required
integer
Example: 123

The ID of the flight

Responses

Response samples

Content type
application/json
{
  • "flight": {
    • "id": 1001,
    • "regulation_status": "authorised_to_fly",
    • "price": 1400.5,
    • "quote_accepted_at": "2020-08-24T14:15:22Z",
    • "cancelled_at": null,
    • "completed_at": "2020-10-01T12:00:00Z",
    • "scheduled_flight_date": "2020-09-23",
    • "backup_scheduled_flight_date": "2020-09-24",
    • "pilot_confirmed": true,
    • "areas": {
      • "type": "Feature",
      • "properties": { },
      • "geometry": {
        }
      }
    }
}

Accept the quote for a flight

Calling this endpoints accepts the quote for the flight and gives us to go-ahead to fly it.

Authorizations:
path Parameters
flight_id
required
integer
Example: 123

The ID of the flight

Responses

Reject the quote for a flight

Rejects the quote.

Authorizations:
path Parameters
flight_id
required
integer
Example: 123

The ID of the flight

Responses

Deliverables

Get a flight's deliverables

Returns the files associated with this flight (raw pictures, point clouds, CAD models, etc.).

These files are guaranteed to be available once the flight has been marked as completed and has a completed_at timestamp.

Authorizations:
path Parameters
flight_id
required
integer
Example: 123

The ID of the flight

Responses

Response samples

Content type
application/json
{}

Coverage

Retrieve pilot coverage

Returns a GeoJSON response indicating the coverage of our pilot network.

Authorizations: