Status API

The Status API allows you to integrate with Autopay to get the current number of available parking spaces and in progress parking sessions in a specific parking zone.

By accessing or using the API, the integrator agrees to be bound by the terms and conditions of Status API.

Available resources

Access requirements

  • A valid authentication token is required to access the API. How to authenticate your application
  • Access to the Status API is offered as a paid service. Please contact your Autopay representative for details.
  • For one Status API access (client_id), the usage is limited to one query per 10 seconds per zone.

GET - Get status

This method allows you to read the number of available parking spaces, number of in progress regular parking sessions and number of in progress parking sessions with permits. Sessions older than one month are not included.

Endpoint

GET https://api.autopay.io/status/v1/zone/{zone_code}

Request parameters

  • The HTTP headers must include a valid access token with scope: zone_status.
  • The path must include parking zone code.

Example request

GET https://api.autopay.io/status/v1/zone/27

Success response

HTTP Code: 200 OK

Parameter Type Description
timestamp datetime (ISO 8601) Timestamp of the request result
available_spaces integer Number of available parking spaces
short_term_sessions integer Number of regular (short term) parking vehicles currently in the zone
permit_sessions integer Number of vehicles with a permit
reserved_spaces integer Number of reserved spaces in zone

Example success response

{
    "timestamp": "2018-02-13T13:12:17.324Z",
    "available_spaces": 300,
    "short_term_sessions": 150,
    "permit_sessions": 50,
    "reserved_spaces": 13
}

GET - Get zone details

This method allows you to fetch in progress parking sessions

Endpoint

GET https://api.autopay.io/status/v1/zone_details/{zone_code}

Request parameters

  • The HTTP headers must include a valid access token with scope: zone_status.
  • The path must include parking zone code.

Example request

GET https://api.autopay.io/status/v1/zone_details/1111

Success response

HTTP Code: 200 OK

Parameter Type Description
datetime (ISO 8601) string Time of the request
available_spaces integer Number of available parking spaces
short_term_parkings integer Number of regular (short term) parking vehicles currently in the zone
permit_parkings integer Number of vehicles with a permit
reserved_spaces integer Number of reserved spaces in zone
parkings array of Parkings
Parking
parking_id string Parking's unique identifier
parking_type string Determines the type of parking. Supported values: REGULAR, PERMIT, BOOKING
start_time datetime (Y-m-d H:i:s) Parking start time

Example success response

{
    "timestamp":"2019-04-15T11:52:07+0300",
    "available_spaces":8,
    "short_term_parkings":1,
    "permit_parkings":1,
    "reserved_spaces":13,
    "parkings":[
        {
            "parking_id":"556op",
            "parking_type":"PERMIT",
            "start_time":"2019-03-19 12:19:00"
        },
        {
            "parking_id":"592op",
            "parking_type":"REGULAR",
            "start_time":"2019-03-19 12:19:00"
        }
    ]
}

Error messages

Parameter Type Description
error_id string Specific code of error. See below for possible values
message string Description of error
description string Optional value. Additional description of error.

Example error response

{
    "error_id": "authentication_error",
    "message": "No access token present in header!"
}

Possible error ids

Error id Explanation
forbidden Unauthorized
internal_server_error Internal server error
missing_property A required property in request is missing
message_not_readable A problem with the request body
method_not_supported Used REST method not supported
argument_type_mismatch A request argument is of incorrect type
zone_not_found_error Requested zone doesn't belong to current landlord.
query_limit_error Too many queries
operator_not_found_error Operator not found
landlord_not_found_error Landlord not found