Available resources:
- GET - Get operating modes for a zone
- POST - Add an operating mode
- PUT - Update an existing operating mode
- DELETE - Delete an operating mode
- Error handling
Access requirements
- A valid authentication token is required to access the API. How to authenticate your application
GET Get operating modes for a zone
The method provides a list of all operating modes for the zone.
Endpoint
GET https://api.autopay.io/operating/v1/zone_operating_modes/{zoneCode}
Request parameters
- The HTTP headers must include a valid access token with scope:
operating_mode
.. - The access token must include operator and landlord_id
Success response
HTTP Code: 200 OK
Parameter | Type | Description |
---|---|---|
id | integer | ID of the operating mode |
zone_code | string | Code of the zone for the operating mode |
type | string | Type of the operating mode. Supported values: NORMAL , RESERVED , CLOSED , SPECIAL |
name | string | Name of the operating mode |
default_product | integer | ID of the default product activated by the operating mode |
electric_vehicle_product | integer | ID of the product activated for the electric vehicles by the operating mode |
validity_periods | Specific periods during which the operating mode is active | |
valid_from | datetime (ISO 8601) | Time and date from which the operating mode is active |
valid_to | datetime (ISO 8601) | Time and date until which the operating modes is active |
recurring_validity_periods | Recurring times of the day when the operating mode is active | |
valid_from | time | Time of the day from which the operating mode is active |
valid_to | time | Time of the day until which the operating modes is active |
days | array of strings | Days of the week for which the operating mode is active. Supported values: MONDAY , TUESDAY , WEDNESDAY , THURSDAY , FRIDAY , SATURDAY , SUNDAY |
parking_restrictions | Parking restrictions applicable to the operating mode. | |
allow_parking_only_for_clients_with_automatic_payment_option | boolean | Parking is allowed only if the client has an automatic billing option available |
allow_parking_only_for_clients_with_permit | boolean | Parking is allowed only if the client has a permit |
deny_entry_when_concurrent_parking_limit_is_exceeded | boolean | Parking is denied if the client has a permit, but the concurrent parking limit is exceeded |
Example success response
[
{
"id": 65,
"zone_code": "1111",
"type": "RESERVED",
"default_product": "7",
"name": "My mode",
"validity_periods": [
{
"valid_from": "2018-10-10T06:10:10+0200",
"valid_to": "2019-12-12T09:12:12+0200"
}
],
"recurring_validity_periods": [],
"parking_restrictions": {
"allow_parking_only_for_clients_with_automatic_payment_option": false,
"allow_parking_only_for_clients_with_permit": true,
"deny_entry_when_concurrent_parking_limit_is_exceeded": true
}
}
]
POST Create an operating mode for a zone
The method allows for creating a new operating mode for the zone.
Endpoint
POST https://api.autopay.io/operating/v1/zone_operating_mode
Request parameters
- The request body must be in JSON format and HTTP headers must include
Content-Type: application/json
. - The HTTP headers must include a valid access token with scope:
operating_mode
.
Parameter | Type | Mandatory | Description |
---|---|---|---|
zone_code | string | yes | Code of the zone for the operating mode |
type | string | yes | Type of the operating mode. Supported values: NORMAL , RESERVED , CLOSED , SPECIAL |
name | string | no | Name of the operating mode |
default_product | integer | no | ID of the default product activated by the operating mode |
electric_vehicle_product | integer | no | ID of the product activated for the electric vehicles by the operating mode |
validity_periods | no | Specific periods during which the operating mode is active | |
valid_from | datetime (ISO 8601) | yes | Date and time from which the operating mode is active |
valid_to | datetime (ISO 8601) | yes | Date and time until which the operating modes is active |
recurring_validity_periods | no | Recurring times of the day during which the operating mode is active | |
valid_from | Time | no | Time of the day from which the operating mode is active |
valid_to | Time | no | Time of the day until which the operating modes is active |
days | array of strings | no | Days of the week for which the operating mode is active. Supported values: MONDAY , TUESDAY , WEDNESDAY , THURSDAY , FRIDAY , SATURDAY , SUNDAY |
parking_restrictions | no | Parking restrictions applicable to the operating mode | |
allow_parking_only_for_clients_with_automatic_payment_option | boolean | yes | Parking is allowed only if the client has an automatic billing option available |
allow_parking_only_for_clients_with_permit | boolean | yes | Parking is allowed only if the client has a permit |
deny_entry_when_concurrent_parking_limit_is_exceeded | boolean | yes | Parking is denied if the client has a permit, but the concurrent parking limit is exceeded |
Request example
{
"zone_code": "1111",
"type": "RESERVED",
"default_product": "7",
"name": "My mode",
"recurring_validity_periods": [
{
"valid_from": "15:15:00",
"valid_to": "22:10:30",
"days": ["MONDAY", "FRIDAY"]
}
],
"parking_restrictions": {
"allow_parking_only_for_clients_with_automatic_payment_option": false,
"allow_parking_only_for_clients_with_permit": true,
"deny_entry_when_concurrent_parking_limit_is_exceeded": true
}
}
Success response
HTTP Code: 200 OK
Parameter | Type | Description |
---|---|---|
id | integer | ID of the operating mode |
zone_code | string | Code of the zone for the operating mode |
type | string | Type of the operating mode. Supported values: NORMAL , RESERVED , CLOSED , SPECIAL |
name | string | Name of the operating mode |
default_product | integer | ID of the default product activated by the operating mode |
electric_vehicle_product | integer | ID of the product activated for the electric vehicles by the operating mode |
validity_periods | Specific periods during which the operating mode is active | |
valid_from | datetime (ISO 8601) | Time and date from which the operating mode is active |
valid_to | datetime (ISO 8601) | Time and date until which the operating modes is active |
recurring_validity_periods | Recurring times of the day when the operating mode is active | |
valid_from | time | Time of the day from which the operating mode is active |
valid_to | time | Time of the day until which the operating modes is active |
days | array of strings | Days of the week for which the operating mode is active. Supported values: MONDAY , TUESDAY , WEDNESDAY , THURSDAY , FRIDAY , SATURDAY , SUNDAY |
parking_restrictions | Parking restrictions applicable to the operating mode. | |
allow_parking_only_for_clients_with_automatic_payment_option | boolean | Parking is allowed only if the client has an automatic billing option available |
allow_parking_only_for_clients_with_permit | boolean | Parking is allowed only if the client has a permit |
deny_entry_when_concurrent_parking_limit_is_exceeded | boolean | Parking is denied if the client has a permit, but the concurrent parking limit is exceeded |
Example success response
{
"id": 65,
"zone_code": "1111",
"type": "RESERVED",
"default_product": "7",
"name": "My mode",
"recurring_validity_periods": [
{
"valid_from": "15:15:00",
"valid_to": "22:10:30",
"days": ["MONDAY", "FRIDAY"]
}
],
"parking_restrictions": {
"allow_parking_only_for_clients_with_automatic_payment_option": false,
"allow_parking_only_for_clients_with_permit": true,
"deny_entry_when_concurrent_parking_limit_is_exceeded": true
}
}
PUT Update operating mode
The method allows to update the operating mode for the zone.
Endpoint
PUT https://api.autopay.io/operating/v1/zone_operating_mode/{id}
Request parameters
- The request body must be in JSON format and HTTP headers must include
Content-Type: application/json
. - The HTTP headers must include a valid access token with scope:
operating_mode
. - The path must include the operating mode ID.
Parameter | Type | Mandatory | Description |
---|---|---|---|
zone_code | string | yes | Code of the zone for the operating mode |
type | string | yes | Type of the operating mode. Supported values: NORMAL , RESERVED , CLOSED , SPECIAL |
name | string | no | Name of the operating mode |
default_product | integer | no | ID of the default product activated by the operating mode |
electric_vehicle_product | integer | no | ID of the product activated for the electric vehicles by the operating mode |
validity_periods | no | Specific periods during which the operating mode is active | |
valid_from | datetime (ISO 8601) | yes | Date and time from which the operating mode is active |
valid_to | datetime (ISO 8601) | yes | Date and time until which the operating modes is active |
recurring_validity_periods | no | Recurring times of the day during which the operating mode is active | |
valid_from | Time | no | Time of the day from which the operating mode is active |
valid_to | Time | no | Time of the day until which the operating modes is active |
days | array of strings | no | Days of the week for which the operating mode is active. Supported values: MONDAY , TUESDAY , WEDNESDAY , THURSDAY , FRIDAY , SATURDAY , SUNDAY |
parking_restrictions | no | Parking restrictions applicable to the operating mode | |
allow_parking_only_for_clients_with_automatic_payment_option | boolean | yes | Parking is allowed only if the client has an automatic billing option available |
allow_parking_only_for_clients_with_permit | boolean | yes | Parking is allowed only if the client has a permit |
deny_entry_when_concurrent_parking_limit_is_exceeded | boolean | yes | Parking is denied if the client has a permit, but the concurrent parking limit is exceeded |
Request example
{
"zone_code":"1111",
"type":"RESERVED",
"name":"My mode",
"default_product":7,
"electric_vehicle_product":null,
"validity_periods":[
{
"valid_from":"2011-09-13T00:00:00+0200",
"valid_to":"2099-09-13T23:59:59+0200"
}
],
"parking_restrictions":{
"allow_parking_only_for_clients_with_permit":true,
"allow_parking_only_for_clients_with_automatic_payment_option":false,
"deny_entry_when_concurrent_parking_limit_is_exceeded":true
}
}
Success response
HTTP Code: 200 OK
Parameter | Type | Description |
---|---|---|
id | integer | ID of the operating mode |
zone_code | string | Code of the zone for the operating mode |
type | string | Type of the operating mode. Supported values: NORMAL , RESERVED , CLOSED , SPECIAL |
name | string | Name of the operating mode |
default_product | integer | ID of the default product activated by the operating mode |
electric_vehicle_product | integer | ID of the product activated for the electric vehicles by the operating mode |
validity_periods | Specific periods during which the operating mode is active | |
valid_from | datetime (ISO 8601) | Time and date from which the operating mode is active |
valid_to | datetime (ISO 8601) | Time and date until which the operating modes is active |
recurring_validity_periods | Recurring times of the day when the operating mode is active | |
valid_from | time | Time of the day from which the operating mode is active |
valid_to | time | Time of the day until which the operating modes is active |
days | array of strings | Days of the week for which the operating mode is active. Supported values: MONDAY , TUESDAY , WEDNESDAY , THURSDAY , FRIDAY , SATURDAY , SUNDAY |
parking_restrictions | Parking restrictions applicable to the operating mode. | |
allow_parking_only_for_clients_with_automatic_payment_option | boolean | Parking is allowed only if the client has an automatic billing option available |
allow_parking_only_for_clients_with_permit | boolean | Parking is allowed only if the client has a permit |
deny_entry_when_concurrent_parking_limit_is_exceeded | boolean | Parking is denied if the client has a permit, but the concurrent parking limit is exceeded |
Example success response
{
"id": 70,
"zone_code": "1111",
"type": "RESERVED",
"name": "My mode",
"default_product": 7,
"electric_vehicle_product": null,
"validity_periods": [
{
"valid_from": "2011-09-13T00:00:00+0200",
"valid_to": "2099-09-13T23:59:59+0200"
}
],
"parking_restrictions": {
"allow_parking_only_for_clients_with_permit": true,
"allow_parking_only_for_clients_with_automatic_payment_option": false,
"deny_entry_when_concurrent_parking_limit_is_exceeded": true
}
}
DELETE Delete operating mode for a zone
The method allows removing the operating mode for the zone.
Endpoint
DELETE https://api.autopay.io/operating/v1/zone_operating_mode/{id}
Request parameters
- The HTTP headers must include a valid access token with scope:
operating_mode
. - The path must include the operating mode ID.
Success response
HTTP Code: 200 OK
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 id-s:
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 |
create_operating_modes_error | Error creating operator modes. |
get_operating_modes_error | Error fetching operator modes. |
update_operating_modes_error | Error updating operator modes. |
delete_operating_modes_error | Error deleting operator mode. |
operator_not_found_error | Operator not found |
operator_not_found_in_token_error | Operator not found in token |