NAV

Introduction

Endpoints overview

The root endpoint is https://neopark.io/api-partners/web/v2/ and we currently have the following endpoints.

Method Path Description
GET /hello Test purpose
GET /parkings List of parkings
GET /parkings/{parking_id} Data on a specific parking
GET /parking_types List of all parking types
GET /parking_types/{parking_type_id} Data on a specific parking type
GET /services List of all services
GET /services/{service_id} Data on a specific service
GET /securities List of all securities
GET /securities/{security_id} Data on a specific security
GET /payment_types List of all payment_types
GET /payment_types/{payment_type_id} Data on a specific payment_type
GET /booking_centers List of all booking centers
GET /booking_centers/{booking_center_id} Data on a specific booking center
Method Path Description
GET /parkings/bookable List of parking that can be booked
GET /members List of members you created
POST /members Add a new member
GET /members/{member_id} Data on a specific member
GET /bookings List of bookings you made
POST /bookings Add a new booking
GET /bookings/{booking_id} Data on a specific booking

Definitions

GET /hello

Example Request

curl "https://neopark.io/api-partners/web/v2/hello" -u user:pass

JSON Response in case of success

{ "message": "Hello world" }

JSON Response in case of wrong API key used

{
  "status_code": 401,
  "error_type": "unauthorized",
  "error_message": "Your API authentication is wrong"
}

Simple endpoint to test the API connection.

Returns

A simple message with the text "Hello world".

GET /parkings

Example Request with minimum information

$ curl "https://neopark.io/api-partners/web/v2/parkings?lat=48.860161&lng=2.346553&rad=0.8&expand=booking_offers"
    -u user:pass

JSON Response

[
  {
    "parking": {
      "parking_id": 612,
      "name": "Parking Sébastopol",
      "main_location": {
        "lat": 48.860708,
        "lng": 2.34942,
        "dist": 0.21808138475867,
        "address": "43 bis boulevard de Sébastopol",
        "town": "PARIS",
        "zipcode": "75001",
        "country_code": "FR"
      },
      "parking_type": 0,
      "parking_category": 0,
      "max_height": 1.9,
      "accepted_vehicles": [
        0,
        1
      ],
      "company": "Indigo",
      "descriptions": {
        "FR": "Description du parking Sébastopol",
        "EN": "Description of the Sébastopol car park"
      }
    },
    "dist": 0.76,
    "booking_offers": []
  },
  {
    "parking": {
      "parking_id": 6890,
      "name": "Parking Les Halles St Eustache",
      "main_location": {
        "lat": 48.8634289,
        "lng": 2.3439805,
        "dist": 0.40866000012317,
        "address": "22 Rue des Halles",
        "town": "PARIS",
        "zipcode": "75001",
        "country_code": "FR"
      },
      "parking_type": 0,
      "parking_category": 0,
      "max_height": 1.9,
      "accepted_vehicles": [
        0,
        1
      ],
      "company": "SAEMES",
      "descriptions": {
        "FR": "Description du parking Sébastopol",
        "EN": "Description of the Sébastopol car park"
      }
    },
    "dist": 0.96,
    "booking_offers": [
      {
        "booking_center_id": 3,
        "booking_center_name": "Neoparking",
        "booking_center_slug": "neopark",
        "booking_urls": {
          "FR": "https://www.neoparking.com/...",
          "EN": "https://en.neoparking.com/...",
          "ES": "https://es.neoparking.com/...",
          "IT": "https://it.neoparking.com/...",
          "DE": "https://de.neoparking.com/...",
          "NL": "https://nl.neoparking.com/..."
        }
      },
      {
        "booking_center_id": 1,
        "booking_center_name": "Zenpark",
        "booking_center_slug": "zenpark",
        "booking_urls": {
          "FR": "http://www.neopark.io/..."
        }
      },
      {
        "booking_center_id": 2,
        "booking_center_name": "TRIP'N'DRIVE",
        "booking_center_slug": "tripndrive",
        "booking_urls": {
          "FR": "http://www.neopark.io/...",
          "EN": "http://www.neopark.io/...",
          "ES": "http://www.neopark.io/...",
          "IT": "http://www.neopark.io/...",
          "DE": "http://www.neopark.io/..."
        }
      }
    ]
  },
  {
    "...": "..."
  }
]

Parameters

Property Type Required Description
lat float required The latitude of the search
lng float required The longitude of the search
rad float required The radius of the search, in kilometers. Must be lower than 5
from DateTime optional The begining of the search
to DateTime optional The end of the search

Returns

Returns a list with informations about parkings, ordered by distance. Each element of the list contains the following properties.

Property Type Description
parking Parking Parking data
dist float The distance, in kilometers, from the parking main location to the point (lat,lng)
booking_offers (includible) BookingOffer[] A list of booking offers
public_offer (includible, 1) PublicOffer A public offer

(1) Only displayed when from and to are set.

GET /parkings/{parking_id}

This endpoint is quite similar to GET /parkings but only display data on one parking.

Example Request with minimum information

$ curl "https://neopark.io/api-partners/web/v2/parkings/732"
    -u user:pass

JSON Response

{
  "parking": {
    "parking_id": 732,
    "name": "Parking Rex Atrium",
    "main_location": {
      "lat": 48.871482781198,
      "lng": 2.3478555679321,
      "address": "7 rue faubourg poissonniere",
      "town": "PARIS",
      "zipcode": "75009",
      "country_code": "FR"
    },
    "parking_type": 0,
    "parking_category": 0,
    "max_height": 1.9,
    "accepted_vehicles": [
      0,
      1
    ],
    "company": "PARK A",
    "descriptions": {
      "FR": "Description du parking Rex Atrium",
      "EN": "Description of the Rex Atrium car park"
    }
  }
}

Example Request with many parameters

$ curl "https://neopark.io/api-partners/web/v2/parkings/732?from=2016-07-14T20:42&to=2016-07-14T22:42&expand=parking_type,parking_category,accepted_vehicles&include=photos,services,securities,payment_types,reviews,weekly_openings,booking_offers,public_offer"
    -u user:pass

JSON Response

{
  "parking": {
    "parking_id": 732,
    "name": "Parking Rex Atrium",
    "main_location": {
      "lat": 48.871482781198,
      "lng": 2.3478555679321,
      "address": "7 rue faubourg poissonniere",
      "town": "PARIS",
      "zipcode": "75009",
      "country_code": "FR"
    },
    "parking_type": {
      "parking_type_id": 0,
      "names": {
        "FR": "..."
      }
    },
    "parking_category": {
      "parking_category_id": 0,
      "names": {
        "FR": "..."
      }
    },
    "max_height": 1.9,
    "accepted_vehicles": [
      {
        "accepted_vehicle_id": 0,
        "names": {
          "FR": "Moto"
        }
      },
      {
        "accepted_vehicle_id": 1,
        "names": {
          "FR": "Voiture"
        }
      }
    ],
    "company": "PARK A",
    "descriptions": {
      "FR": "Description du parking Rex Atrium",
      "EN": "Description of the Rex Atrium car park"
    },
    "photos": [
      "http://neopark.io/photos/...jpg",
      "http://neopark.io/photos/...jpg"
    ],
    "services": [
      {
        "service_id": 42,
        "names": {
          "FR": "..."
        },
        "descriptions": {
          "FR": "..."
        }
      }
    ],
    "securities": [
      {
        "security_id": 42,
        "names": {
          "FR": "Gardien"
        },
        "value": 0
      }
    ],
    "payment_types": [
      {
        "payment_type_id": 42,
        "names": {
          "FR": "..."
        }
      }
    ],
    "reviews": {
      "avg_rating": 0.87,
      "nb_ratings": 42
    },
    "weekly_openings": {
      "sun_open": "08:00",
      "sun_close": "00:00",
      "mon_open": "..."
    }
  },
  "booking_offers": [
    {
      "booking_center_id": 3,
      "booking_center_name": "Neoparking",
      "booking_center_slug": "neopark",
      "booking_urls": {
        "FR": "https://www.neoparking.com/...",
        "EN": "https://en.neoparking.com/..."
      },
      "status": "available",
      "price": 10,
      "booking_price": 1,
      "currency": "EUR",
      "multi_io": true,
      "voucher_to_print": true,
      "bookable": true
    },
    {
      "booking_center_id": 2,
      "booking_center_name": "TRIP'N'DRIVE",
      "booking_center_slug": "tripndrive",
      "booking_urls": {
        "FR": "http://www.neopark.io/...",
        "EN": "http://www.neopark.io/..."
      },
      "status": "period_too_short",
      "price": 0,
      "booking_price": 0,
      "currency": "EUR",
      "multi_io": false,
      "bookable": false
    }
  ],
  "public_offer": {
    "status": "open",
    "price": 12.5,
    "currency": "EUR"
  }
}

The only argument, parking_id, represents the id of the parking you want details.

Parameters

Property Type Required Description
from DateTime optional The begining of the search
to DateTime optional The end of the search

Returns

Property Type Description
parking Parking Parking data
dist float The distance, in kilometers, from the parking main location to the point (lat,lng)
booking_offers (includible) BookingOffer[] A list of booking offers
public_offer (includible, 1) PublicOffer A public offer

(1) Only displayed when from and to are set.

Others

Example Request with parking types

$ curl "https://neopark.io/api-partners/web/v2/parking_types/0"
    -u user:pass

JSON Response

{
  "parking_type_id": 0,
  "names": {
    "FR": "Parking couvert",
    "EN": "Indoor car park",
    "ES": "Aparcamiento cubierto",
    "IT": "Parcheggio coperto",
    "DE": "\u00dcberdachter Parkplatz",
    "NL": "Overdekte parkeergarage"
  }
}

All the endpoints below work the same way. For instance with parkings types:

Endpoint Return
GET /parking_types ParkingType[]
GET /parking_types/{parking_type_id} ParkingType
GET /services Service[]
GET /services/{service_id} Service
GET /securities Security[]
GET /securities/{security_id} Security
GET /payment_types PaymentType[]
GET /payment_types/{payment_type_id} PaymentType
GET /booking_centers BookingCenter[]
GET /booking_centers/{booking_center_id} BookingCenter

Objects

Parking

Parking Object Example with "descriptions" included

{
  "parking_id": 732,
  "name": "Parking Rex Atrium",
  "main_location": {
    "lat": 48.871482781198,
    "lng": 2.3478555679321,
    "address": "7 rue faubourg poissonniere",
    "town": "PARIS",
    "zipcode": "75009",
    "country_code": "FR"
  },
  "parking_type": 0,
  "parking_category": 0,
  "max_height": 1.9,
  "accepted_vehicles": [
    0,
    1
  ],
  "company": "PARK A",
  "descriptions": {
    "FR": "Description du parking Rex Atrium",
    "EN": "Description of the Rex Atrium car park"
  }
}
Attributes Type Description
parking_id int Parking id
name string Parking name
main_location Location Parking main location
parking_type (expandable) int (ParkingType) Parking type id (or ParkingType object if expended)
parking_category (expandable) int (ParkingCategory) Parking category id (or ParkingCategory object if expended)
max_height float Maximum height allowed for vehicles
accepted_vehicles (expandable) int[] (Vehicle[]) List of accepted vehicle ids (or list of Vehicle objects if expended)
company string The company name
descriptions (includible) MultiLangStrings Descriptions of the parking
photos (includible) string[] List of photos of the parking, with absolute links
services (includible, expandable) int[] (Service[]) List of service ids (or list of Service objects if expended)
securities (includible, expandable) int[] (Security[]) List of security ids (or list of Security objects if expended)
payment_types (includible, expandable) int[] (PaymentType[]) List of payment_type ids (or list of PaymentType objects if expended)
reviews (includible) Object Information about reviews
weekly_openings (includible) Object Information about weekly openings

BookingOffer

BookingOffer Object Example with Neoparking

{
  "booking_center_id": 3,
  "booking_center_name": "Neoparking",
  "booking_center_slug": "neopark",
  "booking_urls": {
    "FR": "https://www.neoparking.com/...",
    "EN": "https://en.neoparking.com/...",
    "ES": "https://es.neoparking.com/...",
    "IT": "https://it.neoparking.com/...",
    "DE": "https://de.neoparking.com/...",
    "NL": "https://nl.neoparking.com/..."
  },
  "status": "available",
  "price": 10,
  "booking_price": 1,
  "currency": "EUR",
  "multi_io": true,
  "voucher_to_print": true,
}
Attributes Type Description
booking_center_id int Booking center id
booking_center_name string Booking center name
booking_center_slug string Booking cener slug
booking_urls MultiLangStrings URLs of the booking offers
status (1) string | null The status of the parking: "available", "closed", "bookingFull"
price (1) numeric | null The price (without the booking price)
booking_price (1) numeric | null The booking price
currency (1) string | null The currency
multi_io (1) bool | null True if multiple entries are alloweded. Null if it's unknown.
voucher_to_print (1) bool | null True if it is mandatory to print the voucher. Null if it's unknown.

(1) : All these fiels are null when there is not enough information, generally when from and to fields where not associated.

PublicOffer

PublicOffer Object Example

{
  "status": "open",
  "price": 12.5,
  "currency": "EUR"
}
Attributes Type Description
status string | null The status of the parking: "open", "closed". Null if it is unknown
price numeric | null The public price. Null if it is unknown
currency string | null The currency. Null if it is unknown

ParkingType

ParkingType Object Example

{
  "parking_type_id": 0,
  "names": {
    "FR": "Parking couvert",
    "EN": "Indoor car park",
    "ES": "Aparcamiento cubierto",
    "IT": "Parcheggio coperto",
    "DE": "\u00dcberdachter Parkplatz",
    "NL": "Overdekte parkeergarage"
  }
}
Attributes Type Description
parking_type_id int Parking type id
names MultiLangStrings Names in different languages

ParkingCategory

ParkingCategory Object Example

{
  "parking_category_id": 0,
  "names": {
    "FR": "Parking public",
    "EN": "Public car park",
    "ES": "Aparcamiento p\u00fablico",
    "IT": "Parcheggio pubblico",
    "DE": "\u00d6ffentlicher Parkplatz",
    "NL": "Openbare parkeergarage"
  }
}
Attributes Type Description
parking_category_id int Parking category id
names MultiLangStrings Names in different languages

Vehicle

Vehicle Object Example

{
  "vehicle_id": 1,
  "names": {
    "FR": "Voiture",
    "EN": "Car",
    "ES": "Turismo",
    "IT": "Autovettura",
    "DE": "Auto",
    "NL": "Auto"
  }
}
Attributes Type Description
vehicle_id int Vehicle id
names MultiLangStrings Names in different languages

Service

Service Object Example

{
  "service_id": 42,
  "names": {
    "FR": "..."
  },
  "descriptions": {
    "FR": "..."
  }
}
Attributes Type Description
service_id int Service id
names MultiLangStrings Names in different languages
descriptions (includible) MultiLangStrings Descriptions of the service

Security

Security Object Example

{
  "security_id": 42,
  "names": {
    "FR": "Gardien"
  },
  "value": 0
}
Attributes Type Description
security_id int Security id
names MultiLangStrings Names in different languages
value int | null Value of the security

PaymentType

PaymentType Object Example

{
  "payment_type_id": 42,
  "names": {
    "FR": "..."
  }
}
Attributes Type Description
payment_type_id int Payment type id
names MultiLangStrings Names in different languages

Location

Location Object Example

{
  "lat": 48.8634289,
  "lng": 2.3439805,
  "dist": 0.40866000012317,
  "address": "22 Rue des Halles",
  "town": "PARIS",
  "zipcode": "75001",
  "country_code": "FR"
}
Attributes Type Description
lat int Latitude
lng string Longitude
address string Address
town string Town
zipcode string Zipcode
country_code string Country code (eg: FR for France)

MultiLangStrings

MultiLangStrings Object Example

{
  "FR": "https://www.neoparking.com/...",
  "EN": "https://en.neoparking.com/...",
  "ES": "https://es.neoparking.com/...",
  "IT": "https://it.neoparking.com/...",
  "DE": "https://de.neoparking.com/...",
  "NL": "https://nl.neoparking.com/..."
}

MultiLangStrings is a list where the key is a language code and the value is a string.

Formats

DateTime

The Neopark API support the ISO-8601 format for passing in dates and times. The full format is YYYY-MM-DDTHH:mm:ss.sssZ but shorter versions can be used.

Short version Translation
2016-07-14 2016-07-14T00:00:00.000Z
2016-07-14T20:42 2016-07-14T20:42:00.000Z
2016-07-14T20:42Z 2016-07-14T20:42:00.000Z (GMT timezone)
2016-07-14T20:42-0700 2016-07-14T20:42:00.000-0700 (US Pacific time zone)

Country codes

The country code follows the ISO 3166-1 standard. All the values in our API can be find below.

Country code Country
AT Austria
BE Belgium
CH Switzerland
DE Germnay
ES Spain
FR France
GB United Kingdom
IT Italy
LU Luxembourg
MC Monaco
NL Netherlands
PT Portugal

Prices and currencies

Prices are always a float value and associated with a currency.

Errors

Example of JSON Response Error

{
  "status_code": 402,
  "error_type": "invalid_parking_id",
  "error_message": "There is no parking with id '42' or you can't access it.",
}

When an error happen, 3 elements are displayed to explain the error:

Status Code

400 Bad Request The request was unacceptable, often due to a missing required parameter
401 Unauthorized No valid API key provided
402 Request Failed The parameters were valid but the request failed
403 Forbidden You don't have the rights to access this route
404 Not Found The specified route was not found
405 Method Not Allowed You tried to access a route with an invalid method
429 Too Many Requests You're requesting too many routes! Slow down!
500 Internal Server Error We had a problem with our server.

Error Type

bad_request Unacceptable, often due to a missing required parameter
forbidden Access Denied for this route
invalid_parking_id Invalid parking id specified in the route
not_found Specified route was not found
unauthorized Invalid credentials provided
internal_error For internal errors(5xx status code)
unknown_error For other errors