Parking Permits
Parking permits management allows external providers to create, update, and manage parking permits with flexible check-in capabilities.
The system supports both traditional permits with predefined license plates and dynamic permits that require check-in with specific registration numbers.
Integration Guide
This guide explains how to integrate with the parking permits API based on different permit configurations. Understanding these patterns will help you implement the correct flow for your specific use case.
Permit Types Overview
There are two main permit types, distinguished by the checkin_required field:
1. Standard Permits (checkin_required: false)
Standard permits have predefined registration numbers. Vehicles with these registration numbers are automatically allowed to park during the permit's valid period without any additional action.
- Registration numbers must be provided when creating the permit.
- The permit is immediately active for all specified vehicles.
- No check-in/check-out flow is needed.
2. Check-in Required Permits (checkin_required: true)
Check-in permits do not have predefined registration numbers. Instead, vehicles must be explicitly checked in before they are allowed to park.
- Do not provide
registration_numberswhen creating the permit. - Use the check-in endpoint to register a vehicle when parking begins.
- Only one vehicle can be checked in at a time per permit.
- Update the check-in with an
end_attime when parking ends, or leave it open-ended.
Time Validity Configuration
Permits can be configured with different time validity rules:
Full Validity (24/7)
When no days restrictions are specified, the permit is valid at all times within the start_at and end_at date range.
Day and Time Restrictions
When days are specified, the permit is only valid during those specific days and times. For example, a permit with Monday 08:00-18:00 is only valid on Mondays between
those hours, even if the overall permit period spans several months.
- Multiple time slots can be defined for the same day.
- Time slots on the same day cannot overlap.
- Days can be specified as:
mon-sun,monday-sunday, or0-6(where 0 = Sunday).
Common Integration Scenarios
Scenario A: Resident Parking
A resident has a parking permit valid 24/7 for their registered vehicle.
{
"ticket_id": "resident-permit-123",
"parking_lot_ids": [12],
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-12-31T23:59:59Z",
"registration_numbers": ["ABC123"],
"checkin_required": false
}
Scenario B: Employee Parking with Work Hours
An employee can park Monday to Friday during work hours only.
{
"ticket_id": "employee-permit-456",
"parking_lot_ids": [12, 15],
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-12-31T23:59:59Z",
"registration_numbers": ["XYZ789"],
"checkin_required": false,
"days": [
{ "day": "monday", "start_at": "07:00", "end_at": "18:00" },
{ "day": "tuesday", "start_at": "07:00", "end_at": "18:00" },
{ "day": "wednesday", "start_at": "07:00", "end_at": "18:00" },
{ "day": "thursday", "start_at": "07:00", "end_at": "18:00" },
{ "day": "friday", "start_at": "07:00", "end_at": "18:00" }
]
}
Scenario C: Flexible Visitor Parking
A company has visitor parking spots. Visitors must check in when they arrive.
Step 1: Create the permit (once)
{
"ticket_id": "visitor-permit-789",
"parking_lot_ids": [12],
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-12-31T23:59:59Z",
"checkin_required": true
}
Step 2: Check in a visitor when they arrive
{
"registration_number": "VISITOR1",
"start_at": "2024-03-15T09:00:00Z",
"end_at": "2024-03-15T17:00:00Z",
"parking_lot_id": 12
}
Step 3: Update the check-in if the visitor leaves early or stays longer
{
"registration_number": "VISITOR1",
"end_at": "2024-03-15T15:30:00Z",
"parking_lot_id": 12
}
Scenario D: Flexible Workplace with Day Restrictions
An employee can check in any vehicle, but only on their assigned days.
{
"ticket_id": "flex-permit-321",
"parking_lot_ids": [12],
"start_at": "2024-01-01T00:00:00Z",
"end_at": "2024-12-31T23:59:59Z",
"checkin_required": true,
"days": [
{ "day": "tuesday", "start_at": "07:00", "end_at": "19:00" },
{ "day": "thursday", "start_at": "07:00", "end_at": "19:00" }
]
}
Updating Permits
To update an existing permit, send a new POST request with the same ticket_id. The system will update the permit with the new values. Note that:
- Parking lots will be replaced with the new list.
- Days will be replaced with the new list.
- For standard permits, registration numbers will be synced (new ones added, removed ones deleted).
Deleting Permits
When a permit is deleted, all associated data (registration numbers, day restrictions, parking lot associations) is permanently removed.
Create or update permit
This endpoint creates or updates a parking permit in the system.
Permits can be configured with specific parking lots, license numbers, time restrictions, and check-in requirements.
Headers
-
- Name
- Authorization
- Type
- Bearer
- Description
-
Apply your authentication token here.
-
- Name
- Accept
- Type
- application/json
- Description
-
Tell the server that you want to receive JSON responses.
Parameters
-
- Name
- ticket_id
- Type
- string Required
- Description
-
Your unique identifier for the permit.
-
- Name
- parking_lot_ids
- Type
- array
- Description
-
Array of parking lot IDs (our ID's) where the permit is valid
-
- Name
- start_at
- Type
- string<date-time> Required
- Description
-
Start date and time of the permit in ISO 8601 format.
-
- Name
- end_at
- Type
- string<date-time>
- Description
-
End date and time of the permit in ISO 8601 format.
-
- Name
- registration_numbers
- Type
- array
- Description
-
Array of license plate numbers allowed for this permit. Required unless checkinRequired is true.
-
- Name
- checkin_required
- Type
- boolean
- Description
-
Whether the permit requires check-in with registration numbers. Defaults to false.
-
- Name
- days
- Type
- array
- Description
-
Array of days with start and end times for the permit
-
- Name
- day
- Type
- string
- Description
-
Day of the week (mon-sun, monday-sunday, or 0-6)
- Possible values
- mon tue wed thu fri sat sun monday tuesday wednesday thirsday friday saturday sunday 0 1 2 3 4 5 6
-
- Name
- start_at
- Type
- string<time>
- Description
-
Start time for the day (e.g., '08:00')
-
- Name
- end_at
- Type
- string<time>
- Description
-
End time for the day (e.g., '18:00')
-
- Name
- price
- Type
- object
- Description
-
Cost information for the permit
-
- Name
- amount_incl_vat
- Type
- int
- Description
-
The total amount of the permit including VAT in cents
-
- Name
- vat_rate
- Type
- int
- Description
-
VAT rate for the permit
-
- Name
- currency_code
- Type
- string
- Description
-
The currency code for the permit. For example SEK.
Request Example
curl -X POST 'https://gavle.parkeraisverige.com/api/v2/actions/permits' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"ticket_id": "01985f6f-eafd-7203-b14b-aad5c6c1e253",
"parking_lot_ids": [
12,
15
],
"start_at": "2023-10-01T08:00:00Z",
"end_at": "2023-12-31T18:00:00Z",
"registration_numbers": [
"ABC123",
"XYZ789"
],
"checkin_required": false,
"days": [
{
"day": "monday",
"start_at": "08:00",
"end_at": "18:00"
},
{
"day": "friday",
"start_at": "08:00",
"end_at": "16:00"
}
],
"price": {
"amount_incl_vat": 50000,
"vat_rate": 25,
"currency_code": "SEK"
}
}'
2xx Successful response
{
"data": {
"ticket_id": "01985f6f-eafd-7203-b14b-aad5c6c1e253",
"start_at": "2023-10-01T08:00:00+02:00",
"end_at": "2023-12-31T18:00:00+01:00",
"price": {
"amount_incl_vat": 2000,
"vat_rate": 25,
"currency_code": "SEK"
},
"checkin_required": false,
"parking_lots": [
{
"id": 12,
"name": "Example Parking Lot",
"zone_number": 2200
}
],
"registration_numbers": [
{
"registration_number": "ABC123",
"start_at": null,
"end_at": null
}
],
"days": [
{
"day": {
"day_of_week": 1,
"name": "monday"
},
"start_at": "08:00",
"end_at": "18:00"
}
]
}
}
3xx Redirect
401 Unauthorized
403 Forbidden
422 Validation Error
Delete permit
This endpoint deletes a parking permit and all associated data from the system.
Once deleted, the permit and all related check-in records will be permanently removed.
Headers
-
- Name
- Authorization
- Type
- Bearer
- Description
-
Apply your authentication token here.
-
- Name
- Accept
- Type
- application/json
- Description
-
Tell the server that you want to receive JSON responses.
Path Parameters
-
- Name
- ticket_id
- Type
- string Required
- Description
-
Your unique identifier of the permit to delete.
Request Example
curl -X DELETE 'https://gavle.parkeraisverige.com/api/v2/actions/permits/01985f6f-eafd-7203-b14b-aad5c6c1e253' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
204 No Content
401 Unauthorized
403 Forbidden
422 Validation Error
Check-in registration number
This endpoint creates a new check-in record for a permit that requires check-in functionality.
Use this for permits where checkin_required is true to register specific vehicles for parking sessions.
Headers
-
- Name
- Authorization
- Type
- Bearer
- Description
-
Apply your authentication token here.
-
- Name
- Accept
- Type
- application/json
- Description
-
Tell the server that you want to receive JSON responses.
Path Parameters
-
- Name
- ticket_id
- Type
- string Required
- Description
-
Your unique identifier of the permit.
Parameters
-
- Name
- registration_number
- Type
- string Required
- Description
-
Registration number to check in.
-
- Name
- start_at
- Type
- string<date-time> Required
- Description
-
Start time for the check-in session in ISO 8601 format.
-
- Name
- end_at
- Type
- string<date-time>
- Description
-
End time for the check-in session in ISO 8601 format.
-
- Name
- parking_lot_id
- Type
- int Required
- Description
-
Our unique identifier of the parking lot where the check-in is registered.
Request Example
curl -X POST 'https://gavle.parkeraisverige.com/api/v2/actions/permits/01985f6f-eafd-7203-b14b-aad5c6c1e253/check-in' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"registration_number": "ABC123",
"start_at": "2023-10-01T12:00:00Z",
"end_at": "2023-10-01T18:00:00Z",
"parking_lot_id": 12
}'
2xx Successful response
{
"data": {
"registration_number": "ABC123",
"start_at": "2023-10-01T12:00:00+02:00",
"end_at": "2023-10-01T18:00:00+02:00",
"parking_lot_id": 12
}
}
422 Validation Error
Update registration check-in
This endpoint updates an existing check-in record for a permit.
Use this to modify the start or end times of an active check-in session.
Headers
-
- Name
- Authorization
- Type
- Bearer
- Description
-
Apply your authentication token here.
-
- Name
- Accept
- Type
- application/json
- Description
-
Tell the server that you want to receive JSON responses.
Path Parameters
-
- Name
- ticket_id
- Type
- string Required
- Description
-
Your unique identifier of the permit.
Parameters
-
- Name
- registration_number
- Type
- string Required
- Description
-
Registration number of the check-in record to update (max 20 characters).
-
- Name
- start_at
- Type
- string<date-time>
- Description
-
New start time for the check-in session in ISO 8601 format.
-
- Name
- end_at
- Type
- string<date-time>
- Description
-
New end time for the check-in session in ISO 8601 format.
-
- Name
- parking_lot_id
- Type
- int Required
- Description
-
Our unique identifier of the parking lot where the check-in is registered.
Request Example
curl -X PUT 'https://gavle.parkeraisverige.com/api/v2/actions/permits/01985f6f-eafd-7203-b14b-aad5c6c1e253/check-in' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"registration_number": "ABC123",
"start_at": "2023-10-01T12:00:00Z",
"end_at": "2023-10-01T20:00:00Z",
"parking_lot_id": 12
}'
2xx Successful response
{
"data": {
"id": 456,
"registration_number": "ABC123",
"start_at": "2023-10-01T12:00:00+02:00",
"end_at": "2023-10-01T20:00:00+02:00",
"parking_lot_id": 12
}
}