Inflights API (v0-alpha)

Download OpenAPI specification:Download

Introduction

Welcome to the Inflights API's reference documentation.

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

Webhooks 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" properly will contain the flight info in the same format like you would get from the API endpoints.

Here is 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": "AB123",
      • "regulation_status": "authorised_to_fly",
      • "pricing": {
        },
      • "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,
      • "product": {
        }
      }
    ],
  • "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.

object (flight_areas)

The area(s) of interest for the flight in GeoJSON format.

object (location)

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": {
      • "type": "GeometryCollection",
      • "geometries": [
        ]
      }
    },
  • "location": {
    • "latitude": 50.85,
    • "longitude": 4.38
    }
}

Response samples

Content type
application/json
{
  • "flight": {
    • "id": "AB123",
    • "regulation_status": "authorised_to_fly",
    • "pricing": {
      • "total_price": 900,
      • "total_price_before_discount": 1000,
      • "discount": 100,
      • "currency_code": "EUR"
      },
    • "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,
    • "product": {
      • "id": 1,
      • "name": "Drone Mapping"
      }
    }
}

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_ids
Array of integers

The identifier(s) of the products which you want to preview.

object (flight_areas)

The area(s) of interest for the flight in GeoJSON format.

object (location)

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_ids": [
    • 1
    ],
  • "areas": {
    • "type": "Feature",
    • "properties": { },
    • "geometry": {
      • "type": "GeometryCollection",
      • "geometries": [
        ]
      }
    },
  • "location": {
    • "latitude": 50.85,
    • "longitude": 4.38
    }
}

Response samples

Content type
application/json
{
  • "flights": [
    • {
      • "id": "AB123",
      • "regulation_status": "authorised_to_fly",
      • "pricing": {
        },
      • "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,
      • "product": {
        }
      }
    ]
}

Get a flight

Returns information associated with the flight.

Authorizations:
path Parameters
flight_id
required
string
Example: AB123

The ID of the flight

Responses

Response samples

Content type
application/json
{
  • "flight": {
    • "id": "AB123",
    • "regulation_status": "authorised_to_fly",
    • "pricing": {
      • "total_price": 900,
      • "total_price_before_discount": 1000,
      • "discount": 100,
      • "currency_code": "EUR"
      },
    • "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,
    • "product": {
      • "id": 1,
      • "name": "Drone Mapping"
      },
    • "area": {
      • "geom_of_interest": {
        },
      • "geom_of_flight": {
        }
      },
    • "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
string
Example: AB123

The ID of the flight

Responses

Reject the quote for a flight

Rejects the quote.

Authorizations:
path Parameters
flight_id
required
string
Example: AB123

The ID of the flight

Responses

Share a flight

Give one or more users access to a flight. This will trigger an email notifying the user that a flight has been shared with them. If they do not yet have a user account, they will be asked to create one in the email that is sent to them.

Authorizations:
path Parameters
flight_id
required
string
Example: AB123

The ID of the flight

Request Body schema: application/json
emails
Array of strings <email>

The emails of the users to share the flight with

role
string
Default: "viewer"
Enum: "viewer" "coordinator"

Defines the permissions that the users will have for this flight

comment
string Nullable

An optional comment that will be added to the email message sent to the invited users.

Responses

Request samples

Content type
application/json
{
  • "emails": [
    • "user@example.com"
    ],
  • "role": "viewer",
  • "comment": "Hi Jane,\n\nHere is the flight you requested. If you have any questions, please let me know!\n\nKind regards,\nJohn Doe\n"
}

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
string
Example: AB123

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:

Responses

Response samples

Content type
application/json
{
  • "type": "FeatureCollection",
  • "features": [
    • {
      • "type": "Feature",
      • "properties": {
        },
      • "geometry": {
        }
      }
    ]
}

Products

Returns a list of available products

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "products": [
    • {
      • "id": 35,
      • "name": "Terrain - Drone mapping",
      • "subtitle": "Absolute accuracy 2cm",
      • "description": "3D measurements and pictures for the as-is situation. Deliverables include 3D point cloud, 3D mesh and 2D orthomosaic.",
      • "product_type": "terrain",
      • "auto_pricing_enabled": true,
      • "max_area_in_ha_for_auto_price": 300
      }
    ]
}