Parking API
The Parking API provides endpoints for managing parking locations and their associated plans.
Get Parkings List
Retrieves a list of all parking locations.
Endpoint
GET /api/v3/business/parkings/list
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Response
[
{
"id": 0,
"name": "string",
"address": "string",
"lat": "string",
"lon": "string",
"city": "string",
"status": "string"
}
]
| Field | Type | Description |
|---|---|---|
| id | integer | The ID of the parking location |
| name | string | The name of the parking location |
| address | string | The address of the parking location |
| lat | string | The latitude coordinate |
| lon | string | The longitude coordinate |
| city | string | The city where the parking is located |
| status | string | The current status of the parking location |
Example
curl -X GET \
'https://api.parkup.cl/api/v3/business/parkings/list' \
-H 'Authorization: Bearer \{your_access_token\}'
Get Parking Detail
Retrieves detailed information about a specific parking location.
Endpoint
GET /api/v3/business/parkings/detail
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | The ID of the parking location |
Response
{
"id": 0,
"name": "string",
"address": "string",
"lat": "string",
"lon": "string",
"city": "string",
"status": "string",
"image": "string",
"minutePrice": 0,
"minutePenaltyPrice": 0,
"description": {
"access": {
"driving": "string",
"walking": "string"
},
"observation": {
"text": "string",
"type": "string"
},
"description": "string"
},
"subscriptions": []
}
| Field | Type | Description |
|---|---|---|
| id | integer | The ID of the parking location |
| name | string | The name of the parking location |
| address | string | The address of the parking location |
| lat | string | The latitude coordinate |
| lon | string | The longitude coordinate |
| city | string | The city where the parking is located |
| status | string | The current status of the parking location |
| image | string | The image URL of the parking location |
| minutePrice | integer | The price per minute for parking |
| minutePenaltyPrice | integer | The penalty price per minute |
| description | object | Additional description details |
| subscriptions | array | List of subscriptions associated with the parking |
Example
curl -X GET \
'https://api.parkup.cl/api/v3/business/parkings/detail?id=1' \
-H 'Authorization: Bearer \{your_access_token\}'
Get All Plans
Retrieves all available plans for a specific parking location.
Endpoint
POST /api/v3/business/parkings/plan
Request Body
{
"parkingId": 0
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| parkingId | number | Yes | The ID of the parking location |
Response
[
{
"id": 0,
"price": 0,
"place": 0,
"name": "string"
}
]
| Field | Type | Description |
|---|---|---|
| id | number | The ID of the plan |
| price | number | The price of the plan |
| place | number | The place of the plan |
| name | string | The name of the plan |
Example
curl -X POST \
'https://api.parkup.cl/api/v3/business/parkings/plan' \
-H 'Authorization: Bearer \{your_access_token\}' \
-H 'Content-Type: application/json' \
-d '{
"parkingId": 1
}'
Error Responses
401 Unauthorized
{
"statusCode": 401,
"message": "Unauthorized"
}
This error occurs when:
- The access token is invalid
- The access token has expired
- The access token is missing