NAV Navbar
http
  • Introduction
  • Accounts
  • Areas
  • Area Groups
  • Drivers
  • Odometer Reading
  • Reservations
  • Trips
  • Vehicles
  • Vehicle events
  • Vehicle Groups
  • Vehicle History
  • Vehicle Locations
  • Vehicle Presences
  • Vehicle Commands
  • Introduction

    The GSMauto API is a RESTful web service for developers to programmatically interact with GSMauto data.

    The GSMauto API is organized around REST. Every bit of data exchanged between clients and the API is JSON over HTTPS. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate for all requests.

    The base URL for the GSMauto API is https://api.gsmauto.eu/.

    If you have questions about using the API, or have come across a bug you'd like to report, write us an email at <>.

    Authentication

    For clients to authenticate, the token key should be included in the Authorization HTTP header.

    The key should be prefixed by the string literal "Token", with whitespace separating the two strings.

    Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

    Unauthenticated responses that are denied permission will result in an HTTP 401 Unauthorized response with an appropriate WWW-Authenticate header.

    WWW-Authenticate: Token

    Obtaining authentication tokens

    To obtain a authentication token the fallowing HTTP request has to be performed.

    The request returns JSON structured like this:

    {
      "token": "7e9917ffg57b043b9527711395c013761b2113c7"
    }
    

    HTTP Request

    POST https://api.gsmauto.eu/authenticate/

    Query Parameters

    Parameter Type Required Description
    username String yes The email used during signup
    password String yes The password set for that username

    Errors

    GSMauto uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, a charge failed, etc.), and codes in the 5xx range indicate an error with GSMauto's servers.

    Status code Status text Description
    200 OK Everything worked as expected.
    400 Bad Request Often missing a required parameter.
    401 Unauthorized No valid API key provided.
    402 Request Failed Parameters were valid but request failed.
    404 Not Found The requested item doesn't exist.
    429 Too Many Requests Too many requests hit the API too quickly.
    50* Server Errors Something went wrong on our end.

    Accounts

    List Accounts

    Returns a array of accounts that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "14d820c1-a959-4da1-bac6-e5a199c69f52",
            "url": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "name": "GSMauto",
            "default_language": "et",
            "timezone": "Europe/Tallinn",
            "reference": "13210368600"
        }
    ]
    

    GET https://api.gsmauto.eu/accounts/

    Attributes

    Attribute Type Description
    id String Account unique identifier
    url String Unique URL for the resource
    name String Name of the account
    default_language String
    timezone String
    reference String

    Retrieve a specific Account

    GET https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/

    Areas

    List Areas

    Returns a array of Areas that the user has access to.

    The request returns JSON structured like this:

    [
          {
            "id": "eb246522-7167-440e-b094-920890d98aac",
            "url": "https://api.gsmauto.eu/areas/eb246522-7167-440e-b094-920890d98aac/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "area_groups": [
                "https://api.gsmauto.eu/area_groups/1888b436-5970-4a1c-ba4a-53067210319b/"
            ],
            "name": "Gas station",
            "type": "poi",
            "in_reports": true,
            "in_projects": false,
            "in_notifications": false,
            "active": true,
            "trip_type": "work_trip",
            "radius": 13,
            "geometry": {
                "type": "Point",
                "coordinates": [
                    24.6285688877106,
                    59.3545570644573
                ]
            },
            "created_at": "2016-10-26T13:08:20.756898Z"
          }
    ]
    

    GET https://api.gsmauto.eu/areas/

    Attribute Type Description
    id String Area unique identifier
    url String Unique URL for the resource
    account String URL of the account resource
    area_groups Array List of area groups which includes given area
    name String
    type String
    in_reports Boolean
    in_projects Boolean
    in_notifications Boolean
    active Boolean
    trip_type String
    radius Integer
    geometry Object
    created_at String

    Retrieve a specific Area

    GET https://api.gsmauto.eu/areas/eb246522-7167-440e-b094-920890d98aac/

    Create Area

    Request to create a new Area with the parameters provided.

    Example POST request JSON data:

    {
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "area_groups": [
            "https://api.gsmauto.eu/area_groups/1888b436-5970-4a1c-ba4a-53067210319b/"
        ],
        "name": "Gas station",
        "type": "poi",
        "in_reports": true,
        "in_projects": false,
        "in_notifications": false,
        "active": true,
        "trip_type": "work_trip",
        "radius": 13,
        "geometry": {
            "type": "Point",
            "coordinates": [
                24.6285688877106,
                59.3545570644573
            ]
        }
    }
    

    The request returns JSON of the created Area structured like this:

      {
        "id": "eb246522-7167-440e-b094-920890d98aac",
        "url": "https://api.gsmauto.eu/areas/eb246522-7167-440e-b094-920890d98aac/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "area_groups": [
            "https://api.gsmauto.eu/area_groups/1888b436-5970-4a1c-ba4a-53067210319b/"
        ],
        "name": "Gas station",
        "type": "poi",
        "in_reports": true,
        "in_projects": false,
        "in_notifications": false,
        "active": true,
        "trip_type": "work_trip",
        "radius": 13,
        "geometry": {
            "type": "Point",
            "coordinates": [
                24.6285688877106,
                59.3545570644573
            ]
        },
        "created_at": "2016-10-26T13:08:20.756898Z"
    }
    

    POST https://api.gsmauto.eu/areas/

    Request parameters

    Parameter Type Required Description
    account String Yes URL of the account resource
    area_groups Array No List of area groups which includes given area
    name String Yes
    type String Yes
    in_reports Boolean No
    in_projects Boolean No
    in_notifications Boolean No
    active Boolean No
    trip_type String Yes
    radius Integer No
    geometry Object Yes

    Update Area

    Request to update a Area. We will change the name and in_reports status as an example.

    Example PATCH request JSON data:

    {
        "name": "station",
        "in_reports": false
    }
    

    The request returns JSON of the updated Area structured like this:

      {
        "id": "eb246522-7167-440e-b094-920890d98aac",
        "url": "https://api.gsmauto.eu/areas/eb246522-7167-440e-b094-920890d98aac/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "area_groups": [
            "https://api.gsmauto.eu/area_groups/1888b436-5970-4a1c-ba4a-53067210319b/"
        ],
        "name": "station",
        "type": "poi",
        "in_reports": false,
        "in_projects": false,
        "in_notifications": false,
        "active": true,
        "trip_type": "work_trip",
        "radius": 13,
        "geometry": {
            "type": "Point",
            "coordinates": [
                24.6285688877106,
                59.3545570644573
            ]
        },
        "created_at": "2016-10-26T13:08:20.756898Z"
    }
    

    PATCH https://api.gsmauto.eu/areas/e2f96722-e2c6-4f81-af89-07a01e444fa6/

    Area Groups

    List Area Group

    Returns a array of Area Groups that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "89acf47b-44ab-4cc7-8862-1d68b4121283",
            "url": "https://api.gsmauto.eu/area_groups/89acf47b-44ab-4cc7-8862-1d68b4121283/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "name": "parkla",
            "area_count": null
        }
    ]
    

    GET https://api.gsmauto.eu/area_groups/

    Attribute Type Description
    id String Area Group unique identifier
    url String Unique URL for the resource
    account String URL of the account resource
    name String Name of the Area Group
    area_count Integer Number of areas in this area group

    Retrieve a specific Area Group

    GET https://api.gsmauto.eu/area_groups/89acf47b-44ab-4cc7-8862-1d68b4121283/

    Create Area Group

    Request to create a new Area Group with the parameters provided.

    Example POST request JSON data:

    {
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "parkla"
    }
    

    The request returns JSON of the created Order structured like this:

      {
        "id": "89acf47b-44ab-4cc7-8862-1d68b4121283",
        "url": "https://api.gsmauto.eu/area_groups/89acf47b-44ab-4cc7-8862-1d68b4121283/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "parkla",
        "area_count": null
    }
    

    POST https://api.gsmauto.eu/area_groups/

    Request parameters

    Parameter Type Required Description
    account String Yes URL of the account resource
    name String Yes

    Update Area Group

    Request to update a Area Group. We will change the name as an example.

    Example PATCH request JSON data:

    {
        "name": "parking lot"
    }
    

    The request returns JSON of the updated Area Group structured like this:

      {
        "id": "89acf47b-44ab-4cc7-8862-1d68b4121283",
        "url": "https://api.gsmauto.eu/area_groups/89acf47b-44ab-4cc7-8862-1d68b4121283/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "parking lot",
        "area_count": 0
    }
    

    PATCH https://api.gsmauto.eu/area_groups/89acf47b-44ab-4cc7-8862-1d68b4121283/

    Drivers

    List Drivers

    Returns a array of Drivers that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "b6061e1d-fea9-4479-9318-8fdca2ccc14b",
            "url": "https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "name": "Tom",
            "email": "Tom@example.ee",
            "phone": "+37259999999",
            "active": false,
            "identifier": ""
        }
    ]
    

    GET https://api.gsmauto.eu/drivers/

    Attribute Type Description
    id String Driver unique identifier
    url String Unique URL for the resource
    account String URL of the account resource
    name String Name of the driver
    email String Drivers email
    phone String Drivers phone
    active Boolean
    identifier String

    Retrieve a specific Driver

    GET https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/

    Create Driver

    Request to create a new Driver with the parameters provided.

    Example POST request JSON data:

    {
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "Tom",
        "email": "Tom@example.ee",
        "phone": "+37259999999",
        "active": false,
        "identifier": ""
    }
    

    The request returns JSON of the created Driver structured like this:

      {
        "id": "b6061e1d-fea9-4479-9318-8fdca2ccc14b",
        "url": "https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "Tom",
        "email": "Tom@example.ee",
        "phone": "+37259999999",
        "active": false,
        "identifier": ""
    }
    

    POST https://api.gsmauto.eu/drivers/

    Request parameters

    Parameter Type Required Description
    account String Yes URL of the account resource
    name String Yes
    email String No
    phone String No
    active Boolean No
    identifier String No

    Update Driver

    Request to update a Driver. We will change the phone and active status as an example.

    Example PATCH request JSON data:

    {
        "phone": "+37258888888",
        "active": true
    }
    

    The request returns JSON of the updated Driver structured like this:

      {
        "id": "b6061e1d-fea9-4479-9318-8fdca2ccc14b",
        "url": "https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "Tom",
        "email": "Tom@example.ee",
        "phone": "+37258888888",
        "active": true,
        "identifier": ""
    }
    

    PATCH https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/

    Odometer Reading

    List Odometer Readings

    Returns a array of Odometer Readings that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "69f3ec98-3a37-4d28-945a-294b25943f5d",
            "url": "https://api.gsmauto.eu/odometer_readings/69f3ec98-3a37-4d28-945a-294b25943f5d/",
            "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
            "time": "2016-10-27T13:54:39Z",
            "distance": 2000
        }
    ]
    

    GET https://api.gsmauto.eu/odometer_readings/

    Attribute Type Description
    id String Odometer Reading unique identifier
    url String Unique URL for the resource
    vehicle String URL of the vehicle resource
    time String The time when the odometer reading was created
    distance Integer

    Retrieve a specific Odometer Reading

    GET https://api.gsmauto.eu/odometer_readings/69f3ec98-3a37-4d28-945a-294b25943f5d/

    Create Odometer Reading

    Request to create a new Odometer Reading with the parameters provided.

    Example POST request JSON data:

    {
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "time": "2016-10-27T13:54:39Z",
        "distance": 2000
    }
    

    The request returns JSON of the created Odometer Reading structured like this:

      {
        "id": "69f3ec98-3a37-4d28-945a-294b25943f5d",
        "url": "https://api.gsmauto.eu/odometer_readings/69f3ec98-3a37-4d28-945a-294b25943f5d/",
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "time": "2016-10-27T13:54:39Z",
        "distance": 2000
    }
    

    POST https://api.gsmauto.eu/odometer_readings/

    Request parameters

    Parameter Type Required Description
    vehicle String Yes URL of the vehicle resource
    time String Yes The time when the odometer reading was created
    distance Integer Yes

    Reservations

    List Reservation

    Returns a array of Reservations that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "875d3f58-29ce-45ae-8e3d-e0ea8491f3d8",
            "url": "https://api.gsmauto.eu/reservations/875d3f58-29ce-45ae-8e3d-e0ea8491f3d8/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
            "driver": "https://api.gsmauto.eu/drivers/591b27a3-6fde-45b9-94c0-bc08e916b7a2/",
            "trip_type": "work_trip",
            "start_time": "2016-10-27T08:00:00Z",
            "end_time": "2016-10-27T18:00:00Z",
            "comment": "reservation",
            "attributes": "{}",
            "created_at": "2016-10-27T07:21:26.049630Z"
        }
    ]
    

    GET https://api.gsmauto.eu/reservations/

    Attribute Type Description
    id String Reservation unique identifier
    url String Unique URL for the resource
    account String URL of the account resource
    vehicle String
    driver String
    trip_type String
    start_time Boolean
    end_time String
    comment String
    attributes String
    created_at String

    Retrieve a specific Reservation

    GET https://api.gsmauto.eu/reservations/875d3f58-29ce-45ae-8e3d-e0ea8491f3d8/

    Create Reservation

    Request to create a new Reservation with the parameters provided.

    Example POST request JSON data:

    {
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "driver": "https://api.gsmauto.eu/drivers/591b27a3-6fde-45b9-94c0-bc08e916b7a2/",
        "trip_type": "work_trip",
        "start_time": "2016-10-27T08:00:00Z",
        "end_time": "2016-10-27T18:00:00Z",
        "comment": "reservation"
    }
    

    The request returns JSON of the created Reservation structured like this:

      {
        "id": "875d3f58-29ce-45ae-8e3d-e0ea8491f3d8",
        "url": "https://api.gsmauto.eu/reservations/875d3f58-29ce-45ae-8e3d-e0ea8491f3d8/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "driver": "https://api.gsmauto.eu/drivers/591b27a3-6fde-45b9-94c0-bc08e916b7a2/",
        "trip_type": "work_trip",
        "start_time": "2016-10-27T08:00:00Z",
        "end_time": "2016-10-27T18:00:00Z",
        "comment": "reservation",
        "attributes": "{}",
        "created_at": "2016-10-27T07:21:26.049630Z"
    }
    

    POST https://api.gsmauto.eu/reservations/

    Request parameters

    Parameter Type Required Description
    account String Yes URL of the account resource
    vehicle String Yes URL of the vehicle
    driver String Yes URL of the driver
    trip_type String Yes
    start_time Boolean Yes
    end_time String Yes
    comment String No

    Update Reservation

    Request to update a Reservation. We will change the start_time and end_time as an example.

    Example PATCH request JSON data:

    {
        "start_time": "2016-10-28T08:00:00Z",
        "end_time": "2016-10-28T18:00:00Z"
    }
    

    The request returns JSON of the updated Reservation structured like this:

      {
        "id": "875d3f58-29ce-45ae-8e3d-e0ea8491f3d8",
        "url": "https://api.gsmauto.eu/reservations/875d3f58-29ce-45ae-8e3d-e0ea8491f3d8/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "driver": "https://api.gsmauto.eu/drivers/591b27a3-6fde-45b9-94c0-bc08e916b7a2/",
        "trip_type": "work_trip",
        "start_time": "2016-10-28T08:00:00Z",
        "end_time": "2016-10-28T18:00:00Z",
        "comment": "reservation",
        "attributes": "{}",
        "created_at": "2016-10-27T07:21:26.049630Z"
    }
    

    PATCH https://api.gsmauto.eu/reservations/875d3f58-29ce-45ae-8e3d-e0ea8491f3d8/

    Trips

    List Trip

    Returns a array of Trips that the user has access to.

    Attribute Required Description
    vehicle Yes Filter by vehicle

    The request returns JSON structured like this:

    [
        {
            "id": "00000000-0000-0000-0000-000000000001",
            "url": "https://api.gsmauto.eu/trips/00000000-0000-0000-0000-000000000001/",
            "vehicle": "https://api.gsmauto.eu/vehicles/b49bf177-4912-460f-943e-078fd9090133/",
            "driver": null,
            "start_time": "2012-10-31T08:45:10.631000Z",
            "end_time": "2012-10-31T09:10:00.140000Z",
            "start_location": null,
            "end_location": null,
            "start_address": "Eesti, Harju maakond, Tallinn, Suur-Sõjamäe 4",
            "end_address": "Eesti, Harju maakond, Tallinn, Paldiski maantee 102",
            "trip_type": "work_trip",
            "distance": "10.111",
            "comment": null,
            "confirmed": false,
            "created_at": "2012-11-13T08:45:10.080631Z"
        }
    ]
    

    GET https://api.gsmauto.eu/trips/?vehicle=b49bf177-4912-460f-943e-078fd9090133

    It's possible to filter the trips returned by providing the following URL query parameters with the request.

    Attribute Description
    account Filter by account
    vehicle Filter by vehicle
    driver Filter by driver
    start_time Filter by start_time
    end_time Filter by end_time
    created_at Filter by created_at

    GET https://api.gsmauto.eu/trips/?vehicle=b49bf177-4912-460f-943e-078fd9090133&account=14d820c1-a959-4da1-bac6-e5a199c69f52

    Attribute Type Description
    id String Trip unique identifier
    url String Unique URL for the resource
    vehicle Strgin URL of the vehicle
    driver Strgin URL of the driver
    start_time Strgin
    end_time Strgin
    start_location Object
    end_location Object
    start_address String
    end_address String
    trip_type String
    distance String
    comment String
    confirmed Boolean
    created_at String

    Retrieve a specific Trip

    GET https://api.gsmauto.eu/trips/00000000-0000-0000-0000-000000000001/

    Vehicles

    List Vehicle

    Returns a array of Vehicles that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "2acb2267-57a4-4598-9d2e-aef121bbde0a",
            "url": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "vehicle_groups": [
                "https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/"
            ],
            "registration": "123ABC",
            "name": "Car",
            "driver": "https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/",
            "engine": "petrol",
            "make": "",
            "model": "",
            "type": "",
            "manufacturing_year": 2015,
            "manufacturing_date": "2015-09-07",
            "vin": null,
            "active": true,
            "switched_by_ignition": false
        }
    ]
    

    GET https://api.gsmauto.eu/vehicles/

    Attribute Type Description
    id String Vehicle unique identifier
    url String Unique URL for the resource
    account String URL of the account resource
    vehicle_groups Array List of vehicle groups in which the vehicle belongs
    registration String
    name String
    driver String
    engine String
    make String
    model String
    type String
    manufacturing_year Integer
    manufacturing_date String
    vin String
    active Boolean
    switched_by_ignition Boolean

    Retrieve a specific Vehicle

    GET "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/"

    Update Vehicle

    Request to update a Vehicle. We will add vin and model as an example.

    Example PATCH request JSON data:

    {
        "vin": "1HGCM82633A004352",
        "make": "Mitsubishi"
    }
    

    The request returns JSON of the updated Vehicle structured like this:

        {
            "id": "2acb2267-57a4-4598-9d2e-aef121bbde0a",
            "url": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "vehicle_groups": [
                "https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/"
            ],
            "registration": "123ABC",
            "name": " Car",
            "driver": "https://api.gsmauto.eu/drivers/b6061e1d-fea9-4479-9318-8fdca2ccc14b/",
            "engine": "petrol",
            "make": "Mitsubishi",
            "model": "",
            "type": "",
            "manufacturing_year": 2015,
            "manufacturing_date": "2015-09-07",
            "vin": "1HGCM82633A004352",
            "active": true,
            "switched_by_ignition": false
        }
    

    PATCH https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/

    Vehicle events

    List Vehicle event

    Returns a array of Vehicle events that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "00000000-0000-0000-0000-0000000e1035",
            "url": "https://api.gsmauto.eu/vehicle_events/00000000-0000-0000-0000-0000000e1035/",
            "vehicle": "https://api.gsmauto.eu/vehicles/b16cb9ca-3912-4ffc-bd85-64cca8999aef/",
            "message": "Süüde keerati sisse",
            "value": "1.0",
            "area": null,
            "address": null,
            "location": {
                "type": "Point",
                "coordinates": [
                    24.879728,
                    59.4427584
                ]
            },
            "created_at": "2013-05-27T18:00:02.080000Z"
        }
    ]
    

    GET https://api.gsmauto.eu/vehicle_events/

    Attribute Type Description
    id String Vehicle event unique identifier
    url String Unique URL for the resource
    vehicle String URL of the vehicle
    message String
    value String
    area String
    address String
    location Object
    created_at String

    Retrieve a specific Vehicle event

    GET https://api.gsmauto.eu/vehicle_events/00000000-0000-0000-0000-0000000e1035/

    Vehicle Groups

    List Vehicle Groups

    Returns a array of Vehicle Groups that the user has access to.

    The request returns JSON structured like this:

      [
        {
            "id": "0d70d8f7-1dde-42eb-bfc6-03c780cb999e",
            "url": "https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/",
            "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
            "name": "company",
            "active": true,
            "vehicle_count": 0
        }
    ]
    

    GET https://api.gsmauto.eu/vehicle_groups/

    Attribute Type Description
    id String Vehicle Group unique identifier
    url String Unique URL for the resource
    account String URL of the account resource
    name String Name of the Vehicle Group
    active Boolean
    vehicle_count String Number of vehicles in Vehicle Group

    Retrieve a specific Vehicle Group

    GET https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/

    Create Vehicle Group

    Request to create a new Vehicle Group with the parameters provided.

    Example POST request JSON data:

    {
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "company",
        "active": true
    }
    

    The request returns JSON of the created Vehicle Group structured like this:

      {
        "id": "0d70d8f7-1dde-42eb-bfc6-03c780cb999e",
        "url": "https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "company",
        "active": true,
        "vehicle_count": null
    }
    

    POST https://api.gsmauto.eu/vehicle_groups/

    Request parameters

    Parameter Type Required Description
    account String Yes URL of the account resource
    name String Yes
    active Boolean Yes

    Update Vehicle Group

    Request to update a Vehicle Group. We will change the name as an example.

    Example PATCH request JSON data:

    {
        "name": "changed company"
    }
    

    The request returns JSON of the updated Vehicle Group structured like this:

      {
        "id": "0d70d8f7-1dde-42eb-bfc6-03c780cb999e",
        "url": "https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/",
        "account": "https://api.gsmauto.eu/accounts/14d820c1-a959-4da1-bac6-e5a199c69f52/",
        "name": "changed company",
        "active": true,
        "vehicle_count": 0
    }
    

    PATCH https://api.gsmauto.eu/vehicle_groups/0d70d8f7-1dde-42eb-bfc6-03c780cb999e/

    Vehicle History

    List Vehicle History

    Returns a array of Vehicle History that the user has access to.

    Attribute Required Description
    vehicle Yes Filter by vehicle
    start_time Yes Filter by start_time
    end_time Yes Filter by end_time
    min_degrees No Exclude successive data points with less than min_degrees of arc distance between them
    min_seconds No Exclude successive data points with less than min_seconds of time between them

    The request returns JSON structured like this:

    [
        {
            "id": "1ef2290c-285e-43fb-a0be-a563e6474f13|2016-10-26T11:02:13Z",
            "vehicle": "https://api.gsmauto.eu/vehicles/1ef2290c-285e-43fb-a0be-a563e6474f13/",
            "time": "2016-10-26T11:02:13Z",
            "location": {
                "type": "Point",
                "coordinates": [
                    27.459705,
                    59.363085
                ]
            },
            "speed": 79,
            "heading": 279,
            "ignition": true,
            "fuel_level": null,
            "battery_voltage": "14.54",
            "odometer": null
        }
    ]
    

    GET https://api.gsmauto.eu/vehicle_history/?vehicle=1ef2290c-285e-43fb-a0be-a563e6474f13&start_time=2016-10-26T11:02:08.784Z&end_time=2016-10-27T11:02:08.785Z&min_seconds=60&min_degrees=0.00005

    Attribute Type Description
    id String Vehicle History unique identifier
    vehicle String URL of the vehicle
    time String
    location Object
    speed Integer
    heading Integer
    ignition Boolean
    fuel_level Integer
    battery_voltage String
    odometer String

    Vehicle Locations

    List Vehicle Location

    Returns a array of Vehicle Locations that the user has access to.

    Attribute Description
    account Filter by account
    vehicle Filter by vehicle
    vehicles Filter by vehicles

    The request returns JSON structured like this:

      [
        {
            "id": "2acb2267-57a4-4598-9d2e-aef121bbde0a|2015-09-07T12:01:22Z",
            "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
            "time": "2015-09-07T12:01:22Z",
            "location": {
                "type": "Point",
                "coordinates": [
                    24.641255,
                    59.3867033
                ]
            },
            "speed": 0,
            "heading": 0,
            "ignition": false,
            "fuel_level": null,
            "battery_voltage": null,
            "odometer": null,
            "parking_started_at": "2015-09-07T12:01:22Z",
            "received_at": "2015-09-07T12:01:29.745374Z"
        }
    ]
    

    GET https://api.gsmauto.eu/vehicle_locations/?vehicle=2acb2267-57a4-4598-9d2e-aef121bbde0a

    GET https://api.gsmauto.eu/vehicle_locations/?account=14d820c1-a959-4da1-bac6-e5a199c69f52

    Attribute Type Description
    id String Vehicle Location unique identifier
    vehicle String URL of the vehicle
    time String
    location Object
    speed Integer
    heading Integer
    ignition Boolean
    fuel_level Integer
    battery_voltage String
    odometer String
    parking_started_at String
    received_at String

    Vehicle Presences

    List Area Group

    Returns a array of Vehicle Presences that the user has access to.

    Attribute Required Description
    location Yes Filter by location
    account No Filter by account
    vehicle No Filter by vehicle
    vehicles No Filter by vehicles
    active No Filter by active

    The request returns JSON structured like this:

      [
        {
            "vehicle": "https://api.gsmauto.eu/vehicles/01dcceea-cb63-4d6d-97cc-d6dc6f7bf978/",
            "time": "2016-10-27T05:30:47Z"
        },
        {
            "vehicle": "https://api.gsmauto.eu/vehicles/1c6f04f5-7d3d-4f12-83f1-385bc032ac28/",
            "time": "2016-10-27T05:30:41Z"
        },
        {
            "vehicle": "https://api.gsmauto.eu/vehicles/1ef2290c-285e-43fb-a0be-a563e6474f13/",
            "time": "2016-10-27T04:30:10Z"
        },
        {
            "vehicle": "https://api.gsmauto.eu/vehicles/cae14707-af75-4593-8fc5-b3d233cc90e9/",
            "time": "2016-10-24T07:37:42Z"
        }
    ]
    

    GET https://api.gsmauto.eu/vehicle_presences/?account=25a998a2-daa7-4a61-8311-8fd4d9959417&active=True&location=POINT(24.549636840820312%2059.38515729448965)

    Vehicle Commands

    List Vehicle Command

    Returns a array of Vehicle Commands that the user has access to.

    The request returns JSON structured like this:

    [
        {
            "id": "44a8ee5a-3686-47bd-a6e3-fe6da58c697f",
            "url": "https://api.gsmauto.eu/vehicle_commands/44a8ee5a-3686-47bd-a6e3-fe6da58c697f/",
            "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
            "command": "lock_doors",
            "state": "sent",
            "sent_at": "2016-10-27T11:28:08.749749Z",
            "failed_at": null,
            "created_at": "2016-10-27T11:28:03.721187Z",
            "updated_at": "2016-10-27T11:28:08.750333Z"
        }
    ]
    

    GET https://api.gsmauto.eu/vehicle_commands/

    Attribute Type Description
    id String Vehicle Command unique identifier
    url String Unique URL for the resource
    vehicle String URL of the vehicle
    command String
    state String
    sent_at String
    failed_at String
    created_at String
    updated_at String

    Retrieve a specific Vehicle Command

    GET https://api.gsmauto.eu/vehicle_commands/44a8ee5a-3686-47bd-a6e3-fe6da58c697f/

    Create Vehicle Command

    Request to create a new Vehicle Command with the parameters provided.

    Example POST request JSON data:

    {
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "command": "lock_doors"
    }
    

    The request returns JSON of the created Vehicle Command structured like this:

      {
        "id": "44a8ee5a-3686-47bd-a6e3-fe6da58c697f",
        "url": "https://api.gsmauto.eu/vehicle_commands/44a8ee5a-3686-47bd-a6e3-fe6da58c697f/",
        "vehicle": "https://api.gsmauto.eu/vehicles/2acb2267-57a4-4598-9d2e-aef121bbde0a/",
        "command": "lock_doors",
        "state": "sent",
        "sent_at": "2016-10-27T11:28:08.749749Z",
        "failed_at": null,
        "created_at": "2016-10-27T11:28:03.721187Z",
        "updated_at": "2016-10-27T11:28:08.750333Z"
    }
    

    POST https://api.gsmauto.eu/vehicle_commands/

    Request parameters

    Parameter Type Required Description
    vehicle String Yes URL of the vehicle
    command String Yes lock_doors or unlock_doors