{
  "swagger": "2.0",
  "schemes": [
    "http"
  ],
  "host": "api.staging-ecotaco.com",
  "basePath": "/",
  "info": {
    "description": "The API ecotaco allows you to connect, create an account,\nmanage your credit cards and order rides.\n\n# Authentication\n\nEcotaco API use a system of application key and authentification token.\n\n## Application key :\n\nThe application key is generated by Ecota.co and unique to an application.\n\nBefore accessing EcoTa.co APIs, you need to register your application. Please supply the following information to dev@ecota.co:\n\n- Application name\n\n- Company (if appropriate)\n\n- Contact name, phone and address\n\n- Contact email\n\n- Is this a web application, a desktop application, or an application running on a device?\n\n- Short description of your application\n\nIt **must** be passed on request : \"accounts -> login\", \"accounts -> facebook login\" and \"accounts -> register\" .\n\n## Authentification token :\n\nThe authentification token is retrieved at login or register of an user.\n\nIt **must** be passed in request for authenticate action in Authorization HTTP header.\n\nExample :\n\nAuthorization: Token token=e55887022c1aca4c86abcc49e85ceb8a0c855d2af4d9fac75c08040a583dcde4\n\n# Language\n\nOn some of our resources, we filter the content displayed based on the Accept-Language header.\nIf the language is not defined or if we don't use the language defined in this header, we automatically use French as the default language.\nEcoTa.co currently support two languages: English, French. (\"en\" and \"fr\")\n\n# Encoding\n\nAll requests and answers on EcoTa.co are in UTF-8.",
    "title": "api.ecota.co v2",
    "version": "1.0.0",
    "x-apisguru-categories": [
      "location"
    ],
    "x-logo": {
      "backgroundColor": "#FFFFFF",
      "url": "https://api.apis.guru/v2/cache/logo/https_pbs.twimg.com_profile_images_674904964125368320_5Z7DncLT_400x400.png"
    },
    "x-origin": [
      {
        "converter": {
          "url": "https://github.com/lucybot/api-spec-converter",
          "version": "2.7.31"
        },
        "format": "apiBlueprint",
        "url": "https://ecotaco.docs.apiary.io/api-description-document",
        "version": "1A"
      }
    ],
    "x-preferred": true,
    "x-providerName": "staging-ecotaco.com",
    "x-datafire": {
      "name": "staging_ecotaco",
      "type": "openapi"
    }
  },
  "securityDefinitions": {},
  "tags": [
    {
      "name": "EcoTa.co API Root"
    },
    {
      "description": "The account methods use the User ressource.\n\nThe User ressource has the following attributes :\n\n- **id** (required, unique, integer) : ID of the User\n\n- **name** (required, string) : Name of the User\n\n- **first_name** (required, string) : First name of the User\n\n- **email** (required, unique, string) : Email of the User\n\n- **phone** (required, string) : Phone of the User\n\n- **birth_date** (optional, string) : Birth date of the User\n\n- **language** (required, string) : Language of the User (fixed by the application)\n\n- **referral_code** (optional, string) : Driver referal code\n\n- **avatar_url** (optional, string) : Avatar Url of the User (fixed by the application, gravatar or facebook)\n\n- **newsletter** (required, boolean) : True if User want to receive the newsletter\n\n- **addresses** : An Array of addresses (see *Addresses*)\n\n- **companies** : An Array of companies (see *Companies*)\n\nThe User have a array of **Addresses** with the following attributes :\n\n- **city** (required, string) : City\n\n- **country** (required, string) : Country\n\n- **latitude** (required, float) : Latitude of the Address\n\n- **longitude** (required, float) : Longitude of the Address\n\n- **postal_code** (required, integer) : Postal Code\n\n- **type_address** (required, string) : Address Type (HOME of User)\n\n- **address_complement** (optional, string) : Address complement\n\n- **label** (optional, string) : Address Type (HOME of User)\n\nThe User have a array of **Companies** with the following attributes :\n\n- **id** (required, string) : Id\n\n- **user_id** (required, string) : Id of user attached to the company\n\n- **type_relation** (required, float) : Relation and role in the company\n\n- **name** (required, float) : Name of company\n\n**type_relation** :\n\n- company_manager : Can manage user and reserve for others user with relation on the company\n\n- visitor : Visitor of the company\n\n- collaborator : Collaborator of the company",
      "name": "Accounts"
    },
    {
      "description": "CreditCards resource\n\nThe Credit Card ressource has the following attributes :\n\n- **id** (required, unique, integer) : ID of the credit card\n\n- **card_id** (required, string) : External stripe ID\n\n- **card_type** (required,string) : Card Type\n\n- **client** (required,string) : External stripe Customer ID\n\n- **expire_month** (required, integer) : Expire Mouth\n\n- **expire_year** (required, integer) : Expire Year\n\n- **label** (required, string) : Label of the Card\n\n- **last4** (required, string) : Last four digit in the card\n\n- **type_transaction** (required, string) : Type transaction (default : card)\n\n- **user_id** (required, integer) : ID of the User",
      "name": "CreditCards"
    },
    {
      "description": "The Ride resource has the following attributes :\n\n- **id** (required, unique, integer) : ID of the Ride\n\n- **booking_user_id** (integer) : ID of user who have create the ride\n\n- **company_id** (integer) : ID of company who have create the ride\n\n- **requested_start** (required, date) : Requested date of the ride\n\n- **flight_number** (string) : Fligth number\n\n- **train_number**  (string) : Train number\n\n- **nb_passengers** (required, integer) : Number of passengers (de 1 à 8)\n\n- **pick_up_or_tacking_out** (boolean) : If pick up or tacking out in station or other\n\n- **comment** (string) : Comment of ride forward to driver\n\n- **points** : Array of Points (see *Points*)\n one start point and one end point is required to create a ride\n\n- **passengers** : Array of Passengers (see *Passengers*)\n One passenger (attribute main: true) is mandatory to book a ride\n\n- **distance** (float) : Distance in Km\n\n- **driver_arrival** (date) : Date of real driver arrival\n\n- **duration** (integer) : Duration of the Ride in seconds\n\n- **price** (float) : price of the ride (without promotion)\n\n- **total_price** (float) : total price of the Ride\n\n- **real_end** (date) : Date of real end of ride\n\n- **real_start** (date) : Date of real start of ride\n\n- **refused_label** (string) : Refused Label (see *REFUSED_LABELS*)\n\n- **status** (string) : Status of the ride (see *STATUSES*)\n\n- **eta** (integer) : Estimated Time of arrival\n\n- **driver** (hash) : Information about driver (see *Driver*)\n\n- **vehicle** (hash) : Information about vehicle (see *Vehicle*)\n\n- **estimated_start** (date) : Estimated Start date of the ride\n\n- **estimated_end** (date) : Estimated End date of the ride\n\n- **promotional_code_used** : Promotional code use if any\n\n**STATUSES** :\n\n- NONE = ''\n\n- REFUSED = 'refused'\nThe ride can not be reserved\n\n- ESTIMATED = 'estimated'\nWe have availability for the ride, it can be reserved\n\n- RESERVED = 'reserved'\n\n- AFFECTED = 'affected'\n\n- SENT = 'sent'\n\n- IN_PROGRESS = 'in_progress'\n\n- CANCELLED = 'cancelled'\n\n- CUSTOMER_MISSING = 'customer_missing'\n\n- FINISHED = 'finished'\n\n- FAILED = 'failed'\n\n**REFUSED_LABELS** :\n\n- NOT_IN_A_CATCHEMENT_AREA = 'not_in_a_catchement_area'\n\n- ROUTE_COULD_NOT_BE_CALCULATE = 'route_could_not_be_calculate'\n\n- NO_DRIVER_AVAILABLE_WITH_MORE_THAN_4_PLACES = 'no_driver_available_with_vehicle_with_more_4_places'\n\n- NO_DRIVER_AVAILABLE = 'no_driver_available'\n\n- PLANNED_DRIVERS_BUT_NOT_CONNECTED = 'planned_drivers_but_not_conected'\n\n- ERROR_ON_ONLINE_AND_NEAR_OF = 'error_on_online_and_near_of'\n\n- TOMTOM_QUOTA_REACHED = 'tomtom_error_request_quota_reached'\n\n- AUTHORIZATION_REFUSED = 'authorization_refused'\n\nThe Ride have a array of **Points** with the following attributes :\n\nOnly one point with type start and only one point with type start\n\n- **id** (required, unique, integer) : ID of the Point\n\n- **longitude** (required, float) : Longitude of the Point\n\n- **latitude** (required, float) : Latitude of the Point\n\n- **type_point** (required, string) : Point Type ( 'start' or 'end' )\n\n- **address** (optional, string) : Address of the Point\n\n- **address_complement** (optional, string) : Address Complement of the Point\n\n- **postal_code** (optional, integer) : Postal Code of the Point\n\n- **city** (optional, string) : City of the Point\n\n- **country** (optional, string) : Country of the Point\n\n- **user_input** (optional, string) : User Input for the Point\n\n- **catchement_areas_id** (required, string) : Catchement Areas ID of the Point (fixed by the application)\n\n- **ride_id** (required, integer) : The Ride ID (fixed by the application)\n\n- **comment** (optional, string): Additionnals informations or comment\n\n- **contacts** (optional, array): Array of Contacts (see *Contacts*)\n\nThe Point may have a array of **Contacts** with the following attributes :\n\nThe contact on the pick up or drop off point\n\n- **email** (optional, string) : Email of the Contact\n\n- **first_name** (optional, string) : Fist Name of the Contact\n\n- **last_name** (optional, string) : Name of the Contact\n\n- **phone** (optional, string) : Phone number of the Contact\n\nThe Ride have a array of **Passengers** with the following attributes :\n\nOne main passenger (with main attribute at true) is required to book a ride\n\n- **main** (required, boolean) : If the passenger is the main passenger\n\n- **first_name** (optional, string) : Fist Name of the Passenger\n\n- **name** (optional, string) : Last Name of the Passenger\n\n- **phone** (optional, string) : Phone number of the Passenger (in international format)\n\n- **email** (optional, string) : Email of the Passenger (required for create user)\n\n- **user_id** (optional, integer) : The User ID related to the passenger if exist\n\n- **company_relation** (optional, integer) : The type of relation with the company for the passenger (if register is true)\n\n- **register** (optional, integer) : for register the passenger\n\nThe Ride have a hash of **Driver** with the following attributes :\n\nThis information is provided when the ride is in_progress status\n\n- **first_name** (optional, string) : Fist Name of the driver\n\n- **phone** (optional, string) : Phone number of the driver\n\n- **latitude** (optional, string) : Latitude of driver\n\n- **longitude** (optional, string) : Longitude of driver\n\nThe Ride have a hash of **Vehicle** with the following attributes :\n\nThis information is provided when the ride is in_progress status\n\n- **manufacturer** (optional, string) : Manufacturer of the vehicle\n\n- **color** (optional, string) : Color of the vehicle\n\n- **model** (optional, string) : Model of the vehicle",
      "name": "Rides"
    },
    {
      "description": "Promotional Codes resource\n\nThe Promotional Codes ressource has the following attributes :\n\n- **id** (required, unique, integer) : ID of the affected promotional code\n\n- **status** (required, string) : Status of the affected promotional code ('used' or 'notused')\n\n- **code** (required, string) : The code of the promotional code\n\n- **label** (required, string) : Label of the promotional code\n\n- **promotional_type** (required, string) : The type of promotional code ('pourcent', 'amount' or 'km')\n\n- **value** (required, float) : the value of the promotional code\n\n- **start_date** (required, date) : Start Date for the promotional code\n\n- **end_date** (required, date) : End Date for the promotional code",
      "name": "Promotional Codes"
    },
    {
      "description": "The Addresses use google API for searching places, and also user favorite or best places.",
      "name": "Adresses"
    },
    {
      "description": "Catchement area resource\n\nThe catchement area ressource has the following attributes :\n\n- **id** (required, unique, integer) : ID of the catchement area\n\n- **label** (required, string) : Label\n\n- **launch_at** (required, date) : Launch date of catchement area\n\n- **coordinates** (required, array) : coordinates\n\n**Coordinates** :\n\n- **id** (required, unique, integer) : ID of the coordinates\n\n- **latitude** (required, float) : Latitude of the coordinates\n\n- **longitude** (required, float) : Longitude of the coordinates\n\n- **rank** (required, integer) : Rank to order coordinates of th catchement area\n\nWe provide json or geojson format",
      "name": "Catchement Areas"
    },
    {
      "description": "Product resource\n\nThe product ressource has the following attributes :\n\n- **id** (required, unique, integer) : ID of the product\n\n- **product_type** (required, string) : Product type (See *TYPES*)\n\n- **name** (required, dastringte) : Name of product\n\n- **description** (required, string) : Description of product\n\n**TYPES** :\n\n- transport_person : On demand transport person\n\n- package_delivery : Package delivery",
      "name": "Products"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "description": "",
        "parameters": [],
        "produces": [
          "application/vnd.siren+json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/vnd.siren+json": {
                "links": {
                  "self": "https://api.ecota.co",
                  "v2": "https://api.ecota.co/v2"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Retrieve the version API",
        "tags": [
          "EcoTa.co API Root"
        ],
        "operationId": ".get"
      }
    },
    "/accounts": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "user": {
                  "addresses": [
                    {
                      "address_complement": null,
                      "city": null,
                      "company_id": null,
                      "country": null,
                      "id": 29,
                      "label": null,
                      "latitude": null,
                      "longitude": null,
                      "postal_code": null,
                      "street": null,
                      "type_address": "home"
                    }
                  ],
                  "auth_token": "c1cb860b4fa68ff9f3d94791d28a8c89f89f4b4eceded8eec9f1e6fc10ee4e8c",
                  "avatar_url": "https://gravatar.com/avatar/45def3303a8c2b379605f3db4f61ebcc.png?s=200&d=http%3A%2F%2Fapp.ecota.co%2Fassets%2Fguest.png",
                  "birth_date": "1983-05-12",
                  "companies": [
                    {
                      "id": 10,
                      "name": "EcoTa.co",
                      "type_relation": "company_manager",
                      "user_id": 18
                    }
                  ],
                  "created_at": "2015-05-25T13:37:43+02:00",
                  "email": "maxime.lenne@ecota.co",
                  "first_name": "Lenne",
                  "free_km_counter": 0,
                  "free_used_km_counter": 0,
                  "id": 18,
                  "language": "fr",
                  "name": "Maxime",
                  "newsletter": "1",
                  "phone": 629453814,
                  "referral_code": "v8dlb",
                  "updated_at": "2015-05-25T15:41:11+02:00"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Get current user",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.get"
      },
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "examples": {
              "application/json": {
                "user": {
                  "addresses": [
                    {
                      "address_complement": null,
                      "city": null,
                      "company_id": null,
                      "country": null,
                      "id": 29,
                      "label": null,
                      "latitude": null,
                      "longitude": null,
                      "postal_code": null,
                      "street": null,
                      "type_address": "home"
                    }
                  ],
                  "auth_token": "c1cb860b4fa68ff9f3d94791d28a8c89f89f4b4eceded8eec9f1e6fc10ee4e8c",
                  "avatar_url": "https://gravatar.com/avatar/45def3303a8c2b379605f3db4f61ebcc.png?s=200&d=http%3A%2F%2Fapp.ecota.co%2Fassets%2Fguest.png",
                  "birth_date": "1983-05-12",
                  "companies": [
                    {
                      "id": 10,
                      "name": "EcoTa.co",
                      "type_relation": "company_manager",
                      "user_id": 18
                    }
                  ],
                  "created_at": "2015-05-25T13:37:43+02:00",
                  "email": "maxime.lenne@ecota.co",
                  "first_name": "Lenne",
                  "free_km_counter": 0,
                  "free_used_km_counter": 0,
                  "id": 18,
                  "language": "fr",
                  "name": "Maxime",
                  "newsletter": "1",
                  "phone": 629453814,
                  "referral_code": "v8dlb",
                  "updated_at": "2015-05-25T15:41:11+02:00"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Create a new account with an application key",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.post"
      },
      "put": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "user": {
                  "addresses": [
                    {
                      "address_complement": null,
                      "city": null,
                      "company_id": null,
                      "country": null,
                      "id": 29,
                      "label": null,
                      "latitude": null,
                      "longitude": null,
                      "postal_code": null,
                      "street": null,
                      "type_address": "home"
                    }
                  ],
                  "auth_token": "c1cb860b4fa68ff9f3d94791d28a8c89f89f4b4eceded8eec9f1e6fc10ee4e8c",
                  "avatar_url": "https://gravatar.com/avatar/45def3303a8c2b379605f3db4f61ebcc.png?s=200&d=http%3A%2F%2Fapp.ecota.co%2Fassets%2Fguest.png",
                  "birth_date": "1983-05-12",
                  "companies": [
                    {
                      "id": 10,
                      "name": "EcoTa.co",
                      "type_relation": "company_manager",
                      "user_id": 18
                    }
                  ],
                  "created_at": "2015-05-25T13:37:43+02:00",
                  "email": "maxime.lenne@ecota.co",
                  "first_name": "Lenne",
                  "free_km_counter": 0,
                  "free_used_km_counter": 0,
                  "id": 18,
                  "language": "fr",
                  "name": "Maxime",
                  "newsletter": "1",
                  "phone": 629453814,
                  "referral_code": "v8dlb",
                  "updated_at": "2015-05-25T15:41:11+02:00"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Update User",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.put"
      }
    },
    "/accounts/password": {
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "examples": {},
            "headers": {}
          }
        },
        "summary": "Forget password with email",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.password.post"
      }
    },
    "/accounts/payment_methods": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "payment_methods": [
                  {
                    "at": "ride_end",
                    "by_id": 13,
                    "by_type": "User",
                    "credit_card_id": 1,
                    "credit_card_label": "perso",
                    "method": "credit_card",
                    "to": "ecotaco"
                  },
                  {
                    "at": "ride_end",
                    "by_id": 7,
                    "by_type": "Company",
                    "credit_card_id": 2,
                    "credit_card_label": "Pro entrep",
                    "method": "credit_card",
                    "to": "ecotaco"
                  },
                  {
                    "at": "month_end",
                    "by_id": 7,
                    "by_type": "Company",
                    "method": "transfer",
                    "to": "ecotaco"
                  },
                  {
                    "at": "ride_end",
                    "by_id": 13,
                    "by_type": "User",
                    "method": "cash",
                    "to": "driver"
                  }
                ]
              }
            },
            "headers": {}
          }
        },
        "summary": "Payment Methods",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.payment_methods.get"
      }
    },
    "/accounts/settings": {
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "user": {
                  "addresses": [
                    {
                      "address_complement": null,
                      "city": null,
                      "company_id": null,
                      "country": null,
                      "id": 29,
                      "label": null,
                      "latitude": null,
                      "longitude": null,
                      "postal_code": null,
                      "street": null,
                      "type_address": "home"
                    }
                  ],
                  "auth_token": "c1cb860b4fa68ff9f3d94791d28a8c89f89f4b4eceded8eec9f1e6fc10ee4e8c",
                  "avatar_url": "https://gravatar.com/avatar/45def3303a8c2b379605f3db4f61ebcc.png?s=200&d=http%3A%2F%2Fapp.ecota.co%2Fassets%2Fguest.png",
                  "birth_date": "1983-05-12",
                  "companies": [
                    {
                      "id": 10,
                      "name": "EcoTa.co",
                      "type_relation": "company_manager",
                      "user_id": 18
                    }
                  ],
                  "created_at": "2015-05-25T13:37:43+02:00",
                  "email": "maxime.lenne@ecota.co",
                  "first_name": "Lenne",
                  "free_km_counter": 0,
                  "free_used_km_counter": 0,
                  "id": 18,
                  "language": "fr",
                  "name": "Maxime",
                  "newsletter": "1",
                  "phone": 629453814,
                  "referral_code": "v8dlb",
                  "updated_at": "2015-05-25T15:41:11+02:00"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Settings",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.settings.post"
      }
    },
    "/accounts/sign_in": {
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "user": {
                  "addresses": [
                    {
                      "address_complement": null,
                      "city": null,
                      "company_id": null,
                      "country": null,
                      "id": 29,
                      "label": null,
                      "latitude": null,
                      "longitude": null,
                      "postal_code": null,
                      "street": null,
                      "type_address": "home"
                    }
                  ],
                  "auth_token": "c1cb860b4fa68ff9f3d94791d28a8c89f89f4b4eceded8eec9f1e6fc10ee4e8c",
                  "avatar_url": "https://gravatar.com/avatar/45def3303a8c2b379605f3db4f61ebcc.png?s=200&d=http%3A%2F%2Fapp.ecota.co%2Fassets%2Fguest.png",
                  "birth_date": "1983-05-12",
                  "companies": [
                    {
                      "id": 10,
                      "name": "EcoTa.co",
                      "type_relation": "company_manager",
                      "user_id": 18
                    }
                  ],
                  "created_at": "2015-05-25T13:37:43+02:00",
                  "email": "maxime.lenne@ecota.co",
                  "first_name": "Lenne",
                  "free_km_counter": 0,
                  "free_used_km_counter": 0,
                  "id": 18,
                  "language": "fr",
                  "name": "Maxime",
                  "newsletter": "1",
                  "phone": 629453814,
                  "referral_code": "v8dlb",
                  "updated_at": "2015-05-25T15:41:11+02:00"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Login with email, password and application key",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.sign_in.post"
      }
    },
    "/accounts/update_password": {
      "put": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "user": {
                  "addresses": [
                    {
                      "address_complement": null,
                      "city": null,
                      "company_id": null,
                      "country": null,
                      "id": 29,
                      "label": null,
                      "latitude": null,
                      "longitude": null,
                      "postal_code": null,
                      "street": null,
                      "type_address": "home"
                    }
                  ],
                  "auth_token": "c1cb860b4fa68ff9f3d94791d28a8c89f89f4b4eceded8eec9f1e6fc10ee4e8c",
                  "avatar_url": "https://gravatar.com/avatar/45def3303a8c2b379605f3db4f61ebcc.png?s=200&d=http%3A%2F%2Fapp.ecota.co%2Fassets%2Fguest.png",
                  "birth_date": "1983-05-12",
                  "companies": [
                    {
                      "id": 10,
                      "name": "EcoTa.co",
                      "type_relation": "company_manager",
                      "user_id": 18
                    }
                  ],
                  "created_at": "2015-05-25T13:37:43+02:00",
                  "email": "maxime.lenne@ecota.co",
                  "first_name": "Lenne",
                  "free_km_counter": 0,
                  "free_used_km_counter": 0,
                  "id": 18,
                  "language": "fr",
                  "name": "Maxime",
                  "newsletter": "1",
                  "phone": 629453814,
                  "referral_code": "v8dlb",
                  "updated_at": "2015-05-25T15:41:11+02:00"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Update Password",
        "tags": [
          "Accounts"
        ],
        "operationId": "accounts.update_password.put"
      }
    },
    "/addresses/places_autocomplete": {
      "post": {
        "description": "For searching places just send the following attributes :\n\n- **longitude** (optional, float) : The location longitude for the seach\n\n- **latitude** (optional, float) : The location latitude for the seach\n\n- **search** (required, string) : The search text (most than 3 char)",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {},
            "headers": {}
          }
        },
        "summary": "Get autocomplete places",
        "tags": [
          "Adresses"
        ],
        "operationId": "addresses.places_autocomplete.post"
      }
    },
    "/addresses/places_details": {
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "city": "Lille",
                "country": "France",
                "formatted_address": "Lille, France",
                "lat": 50.637528,
                "lng": 3.070923,
                "name": "Gare Lille Flandres",
                "postal_code": "59800",
                "reference": "CnRtAAAAnFiSmz9OFYi4ee_IeN8WgX0kjB50NtCCTTxJdTQzz9F33kC5eit_Z2DIW-MyrbwN9_cJ7lkBznVZ6o_Da52wCTzmKvbHvImkYTD24su-vjUfszNnJRWnV2M0ckZEdJ5vpG1S02m6jgzJ_FmOnImI2BIQh6x7kos53RZHQujnMlRkABoU28Ivbhnf72dh3L6yfqeB-oaIHYs",
                "region": null,
                "street": null,
                "street_number": null,
                "vicinity": "Lille"
              }
            },
            "headers": {}
          }
        },
        "summary": "Get autocomplete places details",
        "tags": [
          "Adresses"
        ],
        "operationId": "addresses.places_details.post"
      }
    },
    "/catchement_areas": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/vnd.geo+json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/vnd.geo+json": {
                "features": [
                  {
                    "geometry": {
                      "coordinates": [
                        [
                          [
                            2.653829,
                            50.642377
                          ],
                          [
                            2.648937,
                            50.627461
                          ],
                          [
                            2.780256,
                            50.586548
                          ],
                          [
                            2.900204,
                            50.663704
                          ],
                          [
                            2.831196,
                            50.705252
                          ],
                          [
                            2.778325,
                            50.700468
                          ],
                          [
                            2.653829,
                            50.642377
                          ]
                        ]
                      ],
                      "type": "Polygon"
                    },
                    "properties": {
                      "id": 4,
                      "label": "Lille forbidden"
                    },
                    "type": "Feature"
                  },
                  {
                    "geometry": {
                      "coordinates": [
                        [
                          [
                            2.85468817138667,
                            50.7209296468011
                          ],
                          [
                            2.82172918701167,
                            50.6948395473376
                          ],
                          [
                            2.75512457275386,
                            50.6582890133086
                          ],
                          [
                            2.69401312255854,
                            50.6391321348964
                          ],
                          [
                            2.80318975830073,
                            50.5240267810597
                          ],
                          [
                            2.92953253173823,
                            50.4803527849672
                          ],
                          [
                            3.02772283935542,
                            50.4742352023462
                          ],
                          [
                            3.25980902099604,
                            50.4571891900493
                          ],
                          [
                            3.31817388916011,
                            50.5558832982945
                          ],
                          [
                            3.43709230804438,
                            50.6039001101805
                          ],
                          [
                            3.34576845550532,
                            50.6888041447647
                          ],
                          [
                            3.32585573577876,
                            50.7431491302235
                          ],
                          [
                            3.11780214691157,
                            50.8208614514023
                          ],
                          [
                            2.89120912933345,
                            50.7431491302235
                          ],
                          [
                            2.85468817138667,
                            50.7209296468011
                          ]
                        ]
                      ],
                      "type": "Polygon"
                    },
                    "properties": {
                      "id": 1,
                      "label": "Lille"
                    },
                    "type": "Feature"
                  },
                  {
                    "geometry": {
                      "coordinates": [
                        [
                          [
                            1.34239196777344,
                            43.665388118352
                          ],
                          [
                            1.37603759765625,
                            43.7284369679607
                          ],
                          [
                            1.54838562011719,
                            43.6713483259687
                          ],
                          [
                            1.54220581054688,
                            43.4947753137023
                          ],
                          [
                            1.34925842285156,
                            43.5002543647898
                          ],
                          [
                            1.22085571289062,
                            43.5788986029537
                          ],
                          [
                            1.34239196777344,
                            43.665388118352
                          ]
                        ]
                      ],
                      "type": "Polygon"
                    },
                    "properties": {
                      "id": 2,
                      "label": "Toulouse"
                    },
                    "type": "Feature"
                  },
                  {
                    "geometry": {
                      "coordinates": [
                        [
                          [
                            2.874408,
                            50.702182
                          ],
                          [
                            2.918353,
                            50.753905
                          ],
                          [
                            2.833212,
                            50.772398
                          ],
                          [
                            2.812956,
                            50.702651
                          ],
                          [
                            2.861475,
                            50.656127
                          ],
                          [
                            2.979921,
                            50.661786
                          ],
                          [
                            2.874408,
                            50.702182
                          ]
                        ]
                      ],
                      "type": "Polygon"
                    },
                    "properties": {
                      "id": 3,
                      "label": "Lille exclusive"
                    },
                    "type": "Feature"
                  }
                ],
                "type": "FeatureCollection"
              }
            },
            "headers": {}
          }
        },
        "summary": "List all catchement areas",
        "tags": [
          "Catchement Areas"
        ],
        "operationId": "catchement_areas.get"
      }
    },
    "/catchement_areas/{id}": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Numeric `id` of the Catchement Area",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/vnd.geo+json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/vnd.geo+json": {
                "geometry": {
                  "coordinates": [
                    [
                      [
                        2.85468817138667,
                        50.7209296468011
                      ],
                      [
                        2.82172918701167,
                        50.6948395473376
                      ],
                      [
                        2.75512457275386,
                        50.6582890133086
                      ],
                      [
                        2.69401312255854,
                        50.6391321348964
                      ],
                      [
                        2.80318975830073,
                        50.5240267810597
                      ],
                      [
                        2.92953253173823,
                        50.4803527849672
                      ],
                      [
                        3.02772283935542,
                        50.4742352023462
                      ],
                      [
                        3.25980902099604,
                        50.4571891900493
                      ],
                      [
                        3.31817388916011,
                        50.5558832982945
                      ],
                      [
                        3.43709230804438,
                        50.6039001101805
                      ],
                      [
                        3.34576845550532,
                        50.6888041447647
                      ],
                      [
                        3.32585573577876,
                        50.7431491302235
                      ],
                      [
                        3.11780214691157,
                        50.8208614514023
                      ],
                      [
                        2.89120912933345,
                        50.7431491302235
                      ],
                      [
                        2.85468817138667,
                        50.7209296468011
                      ]
                    ]
                  ],
                  "type": "Polygon"
                },
                "properties": {
                  "id": 1,
                  "label": "Lille"
                },
                "type": "Feature"
              }
            },
            "headers": {}
          }
        },
        "summary": "Get a Catchement Area",
        "tags": [
          "Catchement Areas"
        ],
        "operationId": "catchement_areas.id.get"
      }
    },
    "/credit_cards": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {},
            "headers": {}
          }
        },
        "summary": "List all CreditCards for the current User",
        "tags": [
          "CreditCards"
        ],
        "operationId": "credit_cards.get"
      }
    },
    "/credit_cards/{id}": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Numeric `id` of the Credit Card",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {},
            "headers": {}
          }
        },
        "summary": "Get a CreditCard",
        "tags": [
          "CreditCards"
        ],
        "operationId": "credit_cards.id.get"
      }
    },
    "/products": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": [
                {
                  "product": {
                    "description": "Transport de personne à la demande (VTC / DREAL / Taxi)",
                    "id": 1,
                    "name": "Transport à la demande",
                    "product_type": "transport_person"
                  }
                },
                {
                  "product": {
                    "description": "Transport de colis",
                    "id": 2,
                    "name": "Transport de colis",
                    "product_type": "package_delivery"
                  }
                }
              ]
            },
            "headers": {}
          }
        },
        "summary": "List all products",
        "tags": [
          "Products"
        ],
        "operationId": "products.get"
      }
    },
    "/products/{id}": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Numeric `id` of the Product",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "product": {
                  "description": "Transport de personne à la demande (VTC / DREAL / Taxi)",
                  "id": 1,
                  "name": "Transport à la demande",
                  "product_type": "transport_person"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Get a Product",
        "tags": [
          "Products"
        ],
        "operationId": "products.id.get"
      }
    },
    "/promotional_codes": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": [
                {
                  "promotional_code": {
                    "code": "PROMOCODE",
                    "created_at": "2014-07-02T17:38:42+02:00",
                    "end_date": "2099-01-31T00:00:00+01:00",
                    "id": 4,
                    "label": "Parrainage chauffeur",
                    "promotional_type": "pourcent",
                    "start_date": "2012-11-01T00:00:00+01:00",
                    "status": "notused",
                    "value": 10
                  }
                }
              ]
            },
            "headers": {}
          }
        },
        "summary": "Get all promotional codes for user",
        "tags": [
          "Promotional Codes"
        ],
        "operationId": "promotional_codes.get"
      },
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "examples": {},
            "headers": {}
          }
        },
        "summary": "Add a promotional code",
        "tags": [
          "Promotional Codes"
        ],
        "operationId": "promotional_codes.post"
      }
    },
    "/rides/{id}": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Numeric `id` of Ride",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "ride": {
                  "booking_user_id": 11,
                  "comment": null,
                  "company_id": null,
                  "distance": 10.079,
                  "driver": {
                    "first_name": "Céline",
                    "phone": 629453814
                  },
                  "driver_arrival": null,
                  "duration": 1096,
                  "estimated_end": "2014-06-12T17:03:55+02:00",
                  "estimated_start": "2014-06-12T16:45:39+02:00",
                  "eta": 1357,
                  "flight_number": null,
                  "id": 322,
                  "nb_passengers": 1,
                  "passengers": [
                    {
                      "email": "admin@ecota.co",
                      "first_name": "Jean-Phil",
                      "id": 315,
                      "main": true,
                      "name": "Monslip",
                      "phone": 629453814,
                      "user_id": 11
                    }
                  ],
                  "pick_up_or_tacking_out": false,
                  "points": [
                    {
                      "address": "53-57 Rue Masséna",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Lille",
                      "comment": null,
                      "contacts": [
                        {
                          "email": "",
                          "first_name": "",
                          "last_name": "",
                          "phone": ""
                        }
                      ],
                      "country": "France",
                      "id": 631,
                      "latitude": 50.63217,
                      "longitude": 3.054924,
                      "postal_code": 59800,
                      "type_point": "start",
                      "user_input": "53-57 Rue Masséna"
                    },
                    {
                      "address": "Rue de l'Harmonie",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Villeneuve-d'Ascq",
                      "country": "France",
                      "id": 632,
                      "latitude": 50.60511,
                      "longitude": 3.15199,
                      "postal_code": 59650,
                      "ride_id": 322,
                      "type_point": "end",
                      "user_input": "Rue de l'Harmonie"
                    }
                  ],
                  "price": 19.8,
                  "product_id": 1,
                  "promotional_code_used": null,
                  "real_end": null,
                  "real_start": null,
                  "refused_label": "",
                  "requested_start": "2014-06-12T16:23:02+02:00",
                  "reserved_by_phone": false,
                  "status": "in_progress",
                  "total_price": 19.8,
                  "train_number": null,
                  "vehicle": {
                    "color": "gris",
                    "manufacturer": "Audi",
                    "model": "A4"
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Get a ride",
        "tags": [
          "Rides"
        ],
        "operationId": "rides.id.get"
      }
    },
    "/rides/{id}/cancel": {
      "get": {
        "description": "**Must be authenticate**",
        "parameters": [
          {
            "description": "Numeric `id` of Ride",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "ride": {
                  "booking_user_id": 11,
                  "comment": null,
                  "company_id": null,
                  "created_at": "2014-07-02T17:33:55+02:00",
                  "distance": 24.248,
                  "driver": {
                    "first_name": "Céline",
                    "phone": 629453814
                  },
                  "driver_arrival": null,
                  "duration": 1424,
                  "estimated_end": "2014-07-02T18:05:48+02:00",
                  "estimated_start": "2014-07-02T17:42:04+02:00",
                  "eta": 397,
                  "flight_number": null,
                  "id": 378,
                  "nb_passengers": 1,
                  "passengers": [
                    {
                      "main": true,
                      "user_id": 11
                    },
                    {
                      "company_relation": null,
                      "email": "passager@gmail.com",
                      "first_name": "Non registered",
                      "main": false,
                      "name": "Passenger",
                      "phone": "0606060606",
                      "register": false
                    },
                    {
                      "company_relation": "collaborator",
                      "email": "passager2@gmail.com",
                      "first_name": "To registered",
                      "main": false,
                      "name": "Passenger",
                      "phone": "0606060606",
                      "register": true
                    }
                  ],
                  "pick_up_or_tacking_out": false,
                  "points": [
                    {
                      "address": "53-57 Rue Masséna",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Lille",
                      "comment": null,
                      "contacts": [
                        {
                          "email": "",
                          "first_name": "",
                          "last_name": "",
                          "phone": ""
                        }
                      ],
                      "country": "France",
                      "id": 631,
                      "latitude": 50.63217,
                      "longitude": 3.054924,
                      "postal_code": 59800,
                      "type_point": "start",
                      "user_input": "53-57 Rue Masséna"
                    },
                    {
                      "address": "Rue de l'Harmonie",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Villeneuve-d'Ascq",
                      "country": "France",
                      "id": 632,
                      "latitude": 50.60511,
                      "longitude": 3.15199,
                      "postal_code": 59650,
                      "ride_id": 322,
                      "type_point": "end",
                      "user_input": "Rue de l'Harmonie"
                    }
                  ],
                  "price": 39.8,
                  "promotional_code_used": null,
                  "real_end": null,
                  "real_start": null,
                  "refused_label": "",
                  "requested_start": "2014-07-02T17:35:27+02:00",
                  "reserved_by_phone": false,
                  "status": "cancelled",
                  "total_price": 39.8,
                  "train_number": null,
                  "updated_at": "2014-07-02T17:35:34+02:00",
                  "vehicle": {
                    "color": "gris",
                    "manufacturer": "Audi",
                    "model": "A4"
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Cancel a Ride",
        "tags": [
          "Rides"
        ],
        "operationId": "rides.id.cancel.get"
      }
    },
    "/rides/{id}/cancel_fees": {
      "get": {
        "description": "**Must be authenticate**",
        "parameters": [
          {
            "description": "Numeric `id` of Ride",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "fee_percent": 0,
                "fee_total": 0,
                "message": "No cancellation fee."
              }
            },
            "headers": {}
          }
        },
        "summary": "Cancel fee of a Ride",
        "tags": [
          "Rides"
        ],
        "operationId": "rides.id.cancel_fees.get"
      }
    },
    "/rides/{id}/estimate": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Numeric `id` of Ride",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "ride": {
                  "booking_user_id": 11,
                  "comment": null,
                  "company_id": null,
                  "created_at": "2014-07-02T17:33:55+02:00",
                  "distance": 24.248,
                  "driver": {
                    "first_name": "Céline",
                    "phone": 629453814
                  },
                  "driver_arrival": null,
                  "duration": 1424,
                  "estimated_end": "2014-07-02T18:03:56+02:00",
                  "estimated_start": "2014-07-02T17:40:12+02:00",
                  "eta": 397,
                  "flight_number": null,
                  "id": 378,
                  "nb_passengers": 1,
                  "pick_up_or_tacking_out": false,
                  "points": [
                    {
                      "address": "53-57 Rue Masséna",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Lille",
                      "comment": null,
                      "contacts": [
                        {
                          "email": "",
                          "first_name": "",
                          "last_name": "",
                          "phone": ""
                        }
                      ],
                      "country": "France",
                      "id": 631,
                      "latitude": 50.63217,
                      "longitude": 3.054924,
                      "postal_code": 59800,
                      "type_point": "start",
                      "user_input": "53-57 Rue Masséna"
                    },
                    {
                      "address": "Rue de l'Harmonie",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Villeneuve-d'Ascq",
                      "country": "France",
                      "id": 632,
                      "latitude": 50.60511,
                      "longitude": 3.15199,
                      "postal_code": 59650,
                      "ride_id": 322,
                      "type_point": "end",
                      "user_input": "Rue de l'Harmonie"
                    }
                  ],
                  "price": 39.8,
                  "promotional_code_used": null,
                  "real_end": null,
                  "real_start": null,
                  "refused_label": "",
                  "requested_start": "2014-07-02T17:33:35+02:00",
                  "reserved_by_phone": false,
                  "status": "estimated",
                  "total_price": 39.8,
                  "train_number": null,
                  "updated_at": "2014-07-02T17:34:02+02:00",
                  "vehicle": {
                    "color": "gris",
                    "manufacturer": "Audi",
                    "model": "A4"
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Estimate a ride",
        "tags": [
          "Rides"
        ],
        "operationId": "rides.id.estimate.get"
      }
    },
    "/rides/{id}/reserve": {
      "post": {
        "description": "To book, the ride must belong to the connected user. The ride must have a main passenger at least, the booking user id and the payment hash must be set.\n\n**Must be authenticate**",
        "parameters": [
          {
            "description": "Numeric `id` of Ride",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/json": {
                "ride": {
                  "booking_user_id": 11,
                  "comment": null,
                  "company_id": null,
                  "created_at": "2014-07-02T17:33:55+02:00",
                  "distance": 24.248,
                  "driver": {
                    "first_name": "Céline",
                    "phone": 629453814
                  },
                  "driver_arrival": null,
                  "duration": 1424,
                  "estimated_end": "2014-07-02T18:05:48+02:00",
                  "estimated_start": "2014-07-02T17:42:04+02:00",
                  "eta": 397,
                  "flight_number": null,
                  "id": 378,
                  "nb_passengers": 1,
                  "passengers": [
                    {
                      "main": true,
                      "user_id": 11
                    },
                    {
                      "company_relation": null,
                      "email": "passager@gmail.com",
                      "first_name": "Non registered",
                      "main": false,
                      "name": "Passenger",
                      "phone": "0606060606",
                      "register": false
                    },
                    {
                      "company_relation": "collaborator",
                      "email": "passager2@gmail.com",
                      "first_name": "To registered",
                      "main": false,
                      "name": "Passenger",
                      "phone": "0606060606",
                      "register": true
                    }
                  ],
                  "pick_up_or_tacking_out": false,
                  "points": [
                    {
                      "address": "53-57 Rue Masséna",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Lille",
                      "comment": null,
                      "contacts": [
                        {
                          "email": "",
                          "first_name": "",
                          "last_name": "",
                          "phone": ""
                        }
                      ],
                      "country": "France",
                      "id": 631,
                      "latitude": 50.63217,
                      "longitude": 3.054924,
                      "postal_code": 59800,
                      "type_point": "start",
                      "user_input": "53-57 Rue Masséna"
                    },
                    {
                      "address": "Rue de l'Harmonie",
                      "address_complement": null,
                      "catchement_areas_id": [
                        1
                      ],
                      "city": "Villeneuve-d'Ascq",
                      "country": "France",
                      "id": 632,
                      "latitude": 50.60511,
                      "longitude": 3.15199,
                      "postal_code": 59650,
                      "ride_id": 322,
                      "type_point": "end",
                      "user_input": "Rue de l'Harmonie"
                    }
                  ],
                  "price": 39.8,
                  "promotional_code_used": null,
                  "real_end": null,
                  "real_start": null,
                  "refused_label": "",
                  "requested_start": "2014-07-02T17:35:27+02:00",
                  "reserved_by_phone": false,
                  "status": "sent",
                  "total_price": 39.8,
                  "train_number": null,
                  "updated_at": "2014-07-02T17:35:30+02:00",
                  "vehicle": {
                    "color": "gris",
                    "manufacturer": "Audi",
                    "model": "A4"
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Reserve a ride",
        "tags": [
          "Rides"
        ],
        "operationId": "rides.id.reserve.post"
      }
    },
    "/rides?page={page}&per_page={per_page}": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Number of the page to load",
            "in": "path",
            "name": "page",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "Number of items per page to load",
            "in": "path",
            "name": "per_page",
            "required": true,
            "type": "number",
            "x-example": "1"
          },
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {},
            "headers": {}
          }
        },
        "summary": "Get all user rides",
        "tags": [
          "Rides"
        ],
        "operationId": "rides_page_page_per_page_per_page.get"
      },
      "post": {
        "description": "",
        "parameters": [
          {
            "description": "e.g. application/json",
            "in": "header",
            "name": "Accept",
            "required": false,
            "type": "string",
            "x-example": "application/json"
          },
          {
            "description": "e.g. en",
            "in": "header",
            "name": "Accept-Language",
            "required": false,
            "type": "string",
            "x-example": "en"
          },
          {
            "in": "path",
            "name": "page",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "per_page",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "examples": {
              "application/json": {
                "ride": {
                  "booking_user_id": 11,
                  "comment": null,
                  "company_id": null,
                  "created_at": "2014-07-02T17:33:55+02:00",
                  "distance": null,
                  "driver": {
                    "first_name": "Céline",
                    "phone": 629453814
                  },
                  "driver_arrival": null,
                  "duration": null,
                  "estimated_end": null,
                  "estimated_start": "2014-07-02T17:33:35+02:00",
                  "eta": 0,
                  "flight_number": null,
                  "id": 378,
                  "nb_passengers": 1,
                  "passengers": [],
                  "pick_up_or_tacking_out": false,
                  "points": [
                    {
                      "address": "Rue de l'Harmonie",
                      "city": "Villeneuve-d'Ascq",
                      "comment": "Sonner",
                      "contacts": [
                        {
                          "email": "",
                          "first_name": "",
                          "last_name": "",
                          "phone": ""
                        }
                      ],
                      "country": "France",
                      "latitude": 50.60511,
                      "longitude": 3.15199,
                      "postal_code": 59650,
                      "type_point": "start",
                      "user_input": "Rue de l'Harmonie Villeneuve-d'Ascq France"
                    },
                    {
                      "address": "101 Rue de l'Echauffour..e",
                      "city": "Mouscron",
                      "comment": "Sonner",
                      "country": "Belgium",
                      "latitude": 50.75434,
                      "longitude": 3.181706,
                      "postal_code": 7700,
                      "type_point": "end",
                      "user_input": "101 Rue de l'Echauffour..e"
                    }
                  ],
                  "price": null,
                  "promotional_code_used": null,
                  "real_end": null,
                  "real_start": null,
                  "refused_label": null,
                  "requested_start": "2014-07-02T17:33:35+02:00",
                  "reserved_by_phone": false,
                  "status": null,
                  "total_price": 0,
                  "train_number": null,
                  "updated_at": "2014-07-02T17:33:55+02:00",
                  "vehicle": {
                    "color": "gris",
                    "manufacturer": "Audi",
                    "model": "A4"
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Create a ride",
        "tags": [
          "Rides"
        ],
        "operationId": "rides_page_page_per_page_per_page.post"
      }
    },
    "/{version}": {
      "get": {
        "description": "",
        "parameters": [
          {
            "description": "Ecotaco API version",
            "in": "path",
            "name": "version",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/vnd.siren+json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "examples": {
              "application/vnd.siren+json": {
                "links": {
                  "accounts": "https://api.ecota.co/v2/accounts",
                  "addresses": "https://api.ecota.co/v2/addresses",
                  "catchement_areas": "https://api.ecota.co/v2/catchement_areas",
                  "products": "https://api.ecota.co/v2/products",
                  "promotional_codes": "https://api.ecota.co/v2/promotional_codes",
                  "rides": "https://api.ecota.co/v2/rides",
                  "self": "https://api.ecota.co/v2"
                }
              }
            },
            "headers": {}
          }
        },
        "summary": "Retrieve the Entry Point on Version",
        "tags": [
          "EcoTa.co API Root"
        ],
        "operationId": "version.get"
      }
    }
  },
  "definitions": {
    "Autocomplete_places": {},
    "Autocomplete_places_details": {},
    "Cancel_Ride": {},
    "Cancel_fee": {},
    "Catchement_Area": {},
    "Collection_of_catchement_areas": {},
    "Collection_of_products": {},
    "Credit_card": {},
    "Current_User": {},
    "Endpoint": {},
    "Estimate_Ride": {},
    "Forget_password": {},
    "Login": {},
    "Password": {},
    "Payment_Methods": {},
    "Product": {},
    "Register": {},
    "Reserve_Ride": {},
    "Settings": {},
    "User_Credit_Cards": {},
    "User_Promotional_Codes": {},
    "User_Ride": {},
    "User_Rides": {},
    "Version": {}
  }
}