Access to the Permit E-commerce API is offered as a paid service. Please contact your Autopay representative for details
The operator can grant access to Permit E-commerce API in the Operator mode → Landlords → API Accesses
Permit Management
The Permit E-commerce API can be used by landlords to issue permit allocations to tenants. The API supports creating, updating and deleting permit
allocations as well as creating and querying tenants.
This method allows you to get all available permit definitions for a landlord that can be used to issue permit allocations.
Endpoint
GET https://api.autopay.io/permit/v2/landlord/{landlordId}/permitDefinitions
Request parameters:
The HTTP headers must include a valid access token.
The access token must include operator_id and landlord_id.
landlordId is the ID of the landlord for which this query should be run.
Success response:
HTTP Code: 200 OK
Parameter
Type
Description
landlord_id
string
The ID of the landlord that the following permit definitions belong to.
permit_definitions
array
The actual list of permit definitions that are available under the given landlord.
permit_definition_id
string
Permit definition ID
permit_definition_name
string
Permit definition name
facilities
array
The list of facilities in which this kind of permit is valid.
facility_code
string
The ID (code) of the facility
facility_name
string
The display name of the facility
zones
array
The list of zones within the facility where this kind of permit is valid.
zone_code
string
The ID (code) of the zone
zone_name
string
The display name of the zone
Example success response:
{"landlord_id":"1a6f4e3b-2db6-46ea-a095-a8c76c995596","permit_definitions":[{"permit_definition_id":"37ae77b3-a66d-4bde-ba95-ae66f18f90a9","permit_definition_name":"Free parking from 5 to 9","facilities":[{"facility_code":"34124","facility_name":"Supremax city center","zones":[{"zone_code":"15124","zone_name":"Upper level",}]}]}]}
PUT - Create a new tenant
Creates a new tenant and returns the new tenant's ID. Even though the tenant ID is returned, it might take a couple of seconds for the tenant to be
created in all subsystems. Using the newly created tenant ID in a subsequent request might lead to an error in case the second request is sent in immediately
after the first one. In such case the second request should be retried a few seconds later.
Endpoint
PUT https://api.autopay.io/permit/v2/landlord/{landlordId}/tenant/new
Request parameters:
The HTTP headers must include a valid access token.
The access token must include operator_id and landlord_id.
landlordId is the ID of the landlord under which the new tenant should be created.
Parameter
Type
Description
name
string
The name of the new tenant. This will be set both as tenant name & the display name for the tenant which is visible only for landlords.
manager_email
string
The email address of the new tenant's manager.
type
enum
Sets the type of the new tenant. The possible values are FULL and BASIC.
Use FULL if the tenant is a company, or if they will receive more than one permit
per allocation. Such tenants will have access to other functionality too in autopay.io - like booking and Tap & Park.
BASIC tenant should be used in case the tenant is an individual, and should be receiving
exactly one permit per allocation.
Example request:
{"name":"My new tenant","manager_email":"example@autopay.io","type":"FULL"}
Success response:
HTTP Code: 200 OK
Parameter
Type
Description
tenant_id
string
The ID of the new tenant.
GET - Get a tenant's existing permit allocations
This method returns all existing permit allocations that belong to the given tenant. The list includes
all permit allocations, regardless of whether they were created via this API, or in autopay.io.
Endpoint
GET https://api.autopay.io/permit/v2/landlord/{landlordId}/tenant/{tenantId}
Request parameters:
The HTTP headers must include a valid access token.
The access token must include operator_id and landlord_id.
landlordId is the ID of the landlord which the tenant in question belongs to.
tenantId is the ID of the tenant for which this query should be run.
Success response:
HTTP Code: 200 OK
Parameter
Type
Description
name
string
The display name of the tenant, as set by the tenant manager(s)
tenant_id
string
The ID of the tenant to which the following permit allocations belong.
permit_allocations
array
The list of permit allocations that the tenant has access to.
updated_via_api
boolean
This field is true if the given allocation was created or has been updated via this API. Allocations that have been created directly in autopay.io (and have not been updated by this API) will have this flag set to false.
permit_allocation_id
string
The ID of the permit allocation.
permit_definition_id
string
The ID of the permit definition that this allocation was created with.
parking_spaces_count
number
The number of parking spaces that can be used simultaneously by the users of this permit allocation.
permit_count
number
The number of permits that the tenant is allowed to issue to end-users.
valid_from
ISO date
The day from which this permit allocation is valid.
valid_to
ISO date
The day until which this permit allocation is valid.
time_zone_id
string
The ID of the time zone where the validity dates should be interpreted
The tenant that should be receiving the permit allocation is not fully created yet. This condition should not last more than a few seconds. Retry the request later.
POST - Update permit allocation
Updates an existing permit allocation. If the allocation was originally created via autopay.io (and hence has the
updated_via_api flag set to false), it will cause this flag to be set to
true permanently. It might happen that the update cannot be applied as requested, e.g due to more
permits being issued than the updated number of available permits. In this case the new number is going to be as
close as possible to what was requested. The result of the update is returned in the response.
Endpoint
POST https://api.autopay.io/permit/v2/landlord/{landlordId}/tenant/{tenantId}/permitAllocations/{permitAllocationId}
Request parameters:
The HTTP headers must include a valid access token.
The access token must include operator_id and landlord_id.
landlordId is the ID of the landlord under which the allocation should be updated.
tenantId is the ID of the tenant under which the allocation should be updated.
permitAllocationId is the ID of allocation to be updated.
Parameter
Type
Description
parking_spaces_count
number
The number of parking spaces that can be used simultaneously by the users of this permit allocation. For basic tenants, this should be set to 1.
permit_count
number
The number of permits that the tenant is allowed to issue to end-users. For basic tenants, this should be set to 1.
valid_from
ISO date
The day from which this permit allocation is valid. It can only be changed if the permit allocation has not been activated, meaning the valid_from date has passed. Not required.
valid_to
ISO date
The day until which this permit allocation is valid. The latest date accepted is 2099-01-01, which means no end date.