A collection which is meant to help the implementators to understand the logic, structure and internal processes of GREENCenter parking system API. Contains a set of folders, each related to a certain use cases.
General introduction:
Technical terms:
Card: is any media which can be used to identify the customer (parking ticket, proximity card, NEDAP tag, …)
Access: is a set of predefined properties or template of properties, which are assgined to the card during activation process. These properties specify a lot of things, but most importantly it defines where the card can pass ( available zones) and tarrif to be applied when calculating the price for parking. Furtermore it specifies if the card has to be assgined to an owner, if the card can enter the parking even though the zone is already fully occupied, if the system changes the occupancy after passage of card, how much pre-paid time the card gets upon activation, how much time to leave the card has after the payment, if the card should be dectivated upon exit from parking (shortterm / longterm), if the credit is deduced based on the time spent on parking…
Zone: is an enclosed area bordered by entry, exit or passage terminals. Each zone is uniquely represented by the ZoneID.
Host: is any parking control device (entry/exit terminal, automatic pay machine, zone unit, charger station…). Each host is uniquely represented by HAP address.
Owner: is an object consisting of First name, Surname and distinction, specifying the person or a company for whom the cards will be registered if the given “Owner” is chosen.
Card number: is typically 13 digit long number representing specific card within the parking system. Different media types can be identified based on the hexadecimal prefix of the number.
Most often used pre-fixes:
Unlike CardID it does not have to necessarily be unique, only condition for uniquenes is, there can be only one valid card with the given number. For example, the reactivation process deactivates the old card record, then makes a new one with the same card number, but different cardID and other properties. The card number is not equal to BARCode number, as the card number is constructed from multiple values including the car park identification.
CardID: is an unique sequential card identificator, all internal connections of properties and events related to the card are based on the CardID.
EntryTime: is dependent on card type / card access, specifically if the credit is deduced based on time spent on the parking. However in general it represents the time of when the card has entered the parkingthe last time, but for example in case of longterm cards, the entry time will match the ValidFrom as the credit is not deduced based on time spent on the parking.
Turn time: is a time [min] in which the customer can leave the parking without paying or doing anything else but leaving the parking. Typically is about 5-10 minutes and is used for cases when the customer just drops off someone or when the customer doesn’t want or cannot park in the parking. The turn time is not accounted into the price calculation.
Free credit: is a prepaid time [min] which the customer can spend on the parking for free. This time is accounted into the tariff calculation. (eg. Tariff 10,-/hour, free credit 60 min, the price after 100 minutes will be 10,-, if free credit was 120 min, then the price would be 0,-)
ExitTime: represents the very last moment until when the card can leave the parking without having to pay again.
ExitTime = EntryTime + Free credit / turn time
ExitTime = EntryTime + paid Till + TimeToLeave
PaidTill: represents the time until when the card was paid. After entry, the value is updated based on free credit and turn time.
ValidFrom: is the earliest possible date and time for the card to be used within the system
ValidTill: is the latest possible date and time for the card to be used within the system. After the ValidTill the card is deactivated by periodical process (run around midnight). The card remains deactivated/invalid for period of DelayAfterDeactivation (property of access), after this period the card number is deleted from the DB and becomes inactive/unknown.
For working with date and time values, theese are available datetime formats:
UTC: YYYY-MM-DDTHH:mm:ss.sssZ (eg. 2023-06-17T07:43:42.764Z)
TImeZone: YYYY-MM-DDTHH:mm:ss.xxx+02 (eg. 2023-06-17T09:43:42.764+02, 2023-06-17T09:43:42.764+01, 2023-06-17T09:43:42.764-05…)
(more on topic WIKIPEDIA ISO 8601)
Alias: is an alternative card number, which can be used to state the PIN, secondary card, or other kinds of tag number. The alias is attached to the primary card by idCard.
CardNotice: is a free text value stored with the card record, can be used to store 3rd party UUIDs and etc.
In this folder you can find several cases of payment, each for different situation or level of complexity.
1) Getting the card number
can be either read from the entry ticket (under QR/BARCode )
can be obtained from the first endpoint based on the barCode/QRCode data (recommended), alias, card notice or LPN
it is recommended to use GET Card Info BARCode endpoint to make the search for the card record
2) Getting the card price info
you can specify the time (amount of minutes) to pay for, or time until when the card should be paid, or you can request to pay the card tilll now. If future time is provided, the card will be pre-paid.
as an asnwer for this endpoint you will receive the price calculated according to the respective tariff of the card and according the parameters specified in the request body
use the values obtained from the price info request in confirm payment request
3) Confirmation of the payment, using the data provided as answer in step 2.
Complex: specify the items to be paid and apply the discounts within the payment
4) OPTIONAL: Make receipt for the payment
1) Getting the card number
- can be either read from the entry ticket (under QR/BARCode )
- can be obtained from the first endpoint based on the barCode/QRCode data (recommended), alias, card notice or LPN
- it is recommended to use GET Card Info BARCode endpoint to make the search for the card record
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
2) Getting the card price info
- you can specify the time (amount of minutes) to pay for, or time until when the card should be paid, or you can request to pay the card tilll now. If future time is provided, the card will be pre-paid.
- as an asnwer for this endpoint you will receive the price calculated according to the respective tariff of the card and according the parameters specified in the request body
- use the values obtained from the price info request in confirm payment request
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/payment?addCredit=1440&payTillPreset=true"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?addCredit=1440&payTillPreset=true HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
3) Confirmation of the payment, using the data provided as answer in step 2.
Simple: just make the payment till current time
The card payment does not produce a receipt, receipt for the payment is created by standalone endpoint.
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTillNow=true"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTillNow=true HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
3) Confirmation of the payment, using the data provided as answer in step 2.
Items: specify the items to be paid (parking, charging, car wash fee…)
The card payment does not produce a receipt, receipt for the payment is created by standalone endpoint.
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
Use this endpoint to confirm the payment, using the data provided as answer in step 2.
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amoutn of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": [ {
"type" : "ReceiptItemCard",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 26.03,
"priceWithVAT" : 150.0,
"count" : 1,
"description" : "Parking fee",
"adjustment" : null,
"notice" : "Card item notice",
"cardFrom" : "12345",
"cardTo" : "12345",
"validFrom" : "2023-07-19T10:52:34.3760654+02:00",
"validTo" : "2023-07-19T10:52:34.3780604+02:00",
"paidFrom" : "2023-07-19T10:52:34.3780604+02:00",
"paidTo" : "2023-07-19T10:52:34.3780604+02:00",
"accessName" : "access",
"cardNotice" : "notice",
"licensePlate" : "LPN"
}, {
"type" : "ReceiptItemValue",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 8.68,
"priceWithVAT" : 50.0,
"count" : 1,
"description" : "Lost card",
"adjustment" : null,
"notice" : "Value item notice",
"value" : 1
} ],
"vats" : [ {
"idReceiptVAT" : 1,
"charge" : 21.0,
"base" : 140.50,
"value" : 29.50
} ]
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amoutn of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": [ {
"type" : "ReceiptItemCard",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 26.03,
"priceWithVAT" : 150.0,
"count" : 1,
"description" : "Parking fee",
"adjustment" : null,
"notice" : "Card item notice",
"cardFrom" : "12345",
"cardTo" : "12345",
"validFrom" : "2023-07-19T10:52:34.3760654+02:00",
"validTo" : "2023-07-19T10:52:34.3780604+02:00",
"paidFrom" : "2023-07-19T10:52:34.3780604+02:00",
"paidTo" : "2023-07-19T10:52:34.3780604+02:00",
"accessName" : "access",
"cardNotice" : "notice",
"licensePlate" : "LPN"
}, {
"type" : "ReceiptItemValue",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 8.68,
"priceWithVAT" : 50.0,
"count" : 1,
"description" : "Lost card",
"adjustment" : null,
"notice" : "Value item notice",
"value" : 1
} ],
"vats" : [ {
"idReceiptVAT" : 1,
"charge" : 21.0,
"base" : 140.50,
"value" : 29.50
} ]
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
3) Confirmation of the payment, using the data provided as answer in step 2.
Complex: specify the items to be paid and apply the discounts within the payment.
The card payment does not produce a receipt, receipt for the payment is created by standalone endpoint.
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
Use this endpoint to confirm the payment, using the data provided as answer in step 2.
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amoutn of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items":[ {
"type" : "ReceiptItemCard",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 26.03,
"priceWithVAT" : 150.0,
"count" : 1,
"description" : "Parking fee",
"adjustment" : null,
"notice" : "Card item notice",
"cardFrom" : "12345",
"cardTo" : "12345",
"validFrom" : "2023-07-19T10:52:34.3760654+02:00",
"validTo" : "2023-07-19T10:52:34.3780604+02:00",
"paidFrom" : "2023-07-19T10:52:34.3780604+02:00",
"paidTo" : "2023-07-19T10:52:34.3780604+02:00",
"accessName" : "access",
"cardNotice" : "notice",
"licensePlate" : "LPN"
}, {
"type" : "ReceiptItemDiscount",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : -1.74,
"priceWithVAT" : -10.0,
"count" : 1,
"description" : "Use discount",
"adjustment" : null,
"notice" : "Discount item notice",
"discountCardNumber" : "12345",
"relative" : 0,
"absolute" : -10.0,
"name" : "dicount name"
}, {
"type" : "ReceiptItemValue",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 8.68,
"priceWithVAT" : 50.0,
"count" : 1,
"description" : "Lost card",
"adjustment" : null,
"notice" : "Value item notice",
"value" : 1
}, {
"type" : "ReceiptItemVoucher",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : -3.47,
"priceWithVAT" : -20.0,
"count" : 1,
"description" : "Use voucher",
"adjustment" : null,
"notice" : "Voucher item notice",
"number" : "1234567890",
"price" : -20.0,
"issuedWhen" : "2023-07-19T10:52:34.3800106+02:00",
"issuedBy" : 4
} ]
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amoutn of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items":[ {
"type" : "ReceiptItemCard",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 26.03,
"priceWithVAT" : 150.0,
"count" : 1,
"description" : "Parking fee",
"adjustment" : null,
"notice" : "Card item notice",
"cardFrom" : "12345",
"cardTo" : "12345",
"validFrom" : "2023-07-19T10:52:34.3760654+02:00",
"validTo" : "2023-07-19T10:52:34.3780604+02:00",
"paidFrom" : "2023-07-19T10:52:34.3780604+02:00",
"paidTo" : "2023-07-19T10:52:34.3780604+02:00",
"accessName" : "access",
"cardNotice" : "notice",
"licensePlate" : "LPN"
}, {
"type" : "ReceiptItemDiscount",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : -1.74,
"priceWithVAT" : -10.0,
"count" : 1,
"description" : "Use discount",
"adjustment" : null,
"notice" : "Discount item notice",
"discountCardNumber" : "12345",
"relative" : 0,
"absolute" : -10.0,
"name" : "dicount name"
}, {
"type" : "ReceiptItemValue",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : 8.68,
"priceWithVAT" : 50.0,
"count" : 1,
"description" : "Lost card",
"adjustment" : null,
"notice" : "Value item notice",
"value" : 1
}, {
"type" : "ReceiptItemVoucher",
"typeId" : null,
"vatCharge" : 21.0,
"vatValue" : -3.47,
"priceWithVAT" : -20.0,
"count" : 1,
"description" : "Use voucher",
"adjustment" : null,
"notice" : "Voucher item notice",
"number" : "1234567890",
"price" : -20.0,
"issuedWhen" : "2023-07-19T10:52:34.3800106+02:00",
"issuedBy" : 4
} ]
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Once the payment is finished, you can create a receipt for the payment.
Receipt is generated on the server side, however you need to provide a few details to successfully created a valid receipt. For request body, it is recommended to use the data returned by the GET Price info endpoint. For the receipt creation you also need to specify the station number for which the receipt will be created. Either list the available stations (config module) or ask GREENCenter for the correct station id.
Authorization: KERNEL_RECEIPTS
Use this endpoint in order to create a simplified receipt record.
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"idCard": {{C_idCard}},
"number": {{C_Number}},
"addCredit": {{C_addCredit}},
"priceWithVAT": {{C_priceWithVAT}},
"vatCharge": {{C_vatCharge}},
"vatValue": {{C_vatValue}},
"cardState": {{C_cardState}},
"items": [{{C_items}}]
}
' "{{baseUrl}}/api/v1/kernel/receipts/station/:id/simple?currencyId=1&paymentkindId=1&receiptItemName=Parking fee"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/receipts/station/:id/simple?currencyId=1&paymentkindId=1&receiptItemName=Parking fee HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idCard": {{C_idCard}},
"number": {{C_Number}},
"addCredit": {{C_addCredit}},
"priceWithVAT": {{C_priceWithVAT}},
"vatCharge": {{C_vatCharge}},
"vatValue": {{C_vatValue}},
"cardState": {{C_cardState}},
"items": [{{C_items}}]
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
In this folder you can find endpoints related to zone info, like name, occupancy and capacity.
The zone is a group of parking spaces. The zone is an area physically restricted by barriers, gates or traffic signs. Each zone has its name, capacity for visitors (indicated as others), capacity for reserved spaces (reserved capacity), number of occupied spaces for others, number of occupied spaces that has been reserved. Further, the zone has the Visible attribute that determines whether the zone can be viewed within the system by the attending staff. If capacities are set to the value of -1, the number of occupied parking spaces is not counted in the zone. There is a special zone in each system indicated as the “Off zone” with idZone = 0. This zone represents an area outside of a car park. The number of occupied spaces can technically exceed the zone capacity. On the contrary, the number of occupied spaces cannot be less than zero.
Get all zones info - will list all zones configured in the system
Get info about specific zone - will return a info about single zone specified by the zoneID
Get zones journal - will return the zone journal for the zone specified by the zoneID, zone journal is a list of time stamped occupancy records
Get specific zone event stream - will register the client to a SSE stream with specific zone occupancy change events.
Get zones event stream - will register the client to a SSE stream with occupancy change events for all zones
Update zone parameters - will update the parameters of the zone, can be used to manage the parking occupancy and reserved places
Get all zones info - will list all zones configured in the system
With this endpoint you can obtain a list of all zones and their parameters like idZone, name, capacity, engaged places and more.
In order to calculate the free available places (“Free others”) for visitors or customers use this formula:
Free others = capacity - reservationCapacity - engage
Authorization: CONFIGURATION_VIEWER
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/config/zones"
GET %7B%7BbaseUrl%7D%7D/api/v1/config/zones HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Get info about specific zone - will return a info about single zone specified by the zoneID
In order to calculate the free available places (“Free others”) for visitors or customers use this formula:
Free others = capacity - reservationCapacity - engage
Authorization: CONFIGURATION_VIEWER
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/config/zones/:ZoneID"
GET %7B%7BbaseUrl%7D%7D/api/v1/config/zones/:ZoneID HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
Get zones journal - will return the zones journal for all zones.
Zone journal is a list of time stamped occupancy records
let now = new Date();
let days = 100;
now.setDate(now.getDate() - days); // A day 100 days before today
let timeStampcreatedWhen = now.toISOString();
pm.collectionVariables.set("createdWhen", timeStampcreatedWhen);
console.log(pm.collectionVariables.get("createdWhen"));
let filterObject = {
"operator":"and",
"operands": [
//DATE BASED FILTER
{
"operator":"gte",
"field":"engageWhen",
//"values": ["1", "2", "3", "4"] //1 - activation, 2 - deactivation, 3 - payment, 4 - pass
//"values": ["202"] //1 - activation, 2 - deactivation, 3 - payment, 4 - pass
//"value": "0"
"value": pm.collectionVariables.get("createdWhen")
},
// RECORD ID BASED FILTER
// {
// "operator":"gte",
// "field":"idZoneJournal",
// //"values": ["1", "2", "3", "4"] //1 - activation, 2 - deactivation, 3 - payment, 4 - pass
// //"values": ["202"] //1 - activation, 2 - deactivation, 3 - payment, 4 - pass
// //"value": "0"
// "value": "250"
// },
// ZONE ID FILTER
{
"operator":"eq",
"field":"zoneId",
"value": "1" // The ID of the zone to be filtered
}
]
};
let encodedFilterObject = encodeURIComponent(JSON.stringify(filterObject));
pm.environment.set("encodedFilterObject", encodedFilterObject);
Authorization: JOURNAL_ZONE
Fields: idZoneJournal, zoneId, capacity, engage, engageWhen, reservationCapacity, reservationEngage
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/journal/zones?offset=0&limit=500&filter={{encodedFilterObject}}&sortBy=asc(idZoneJournal)"
GET %7B%7BbaseUrl%7D%7D/api/v1/journal/zones?offset=0&limit=500&filter={{encodedFilterObject}}&sortBy=asc(idZoneJournal) HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Get specific zone event stream - will register the client to a SSE stream with specific zone occupancy change events
Authorization: EVENT_ZoneEventsSSE and (EVENT_ZONE_<zoneId> or EVENT_ZONE_ALL)
curl -X GET -H "Accept: text/event-stream" "{{baseUrl}}/api/v1/event/sse/zones/:ZoneID"
GET %7B%7BbaseUrl%7D%7D/api/v1/event/sse/zones/:ZoneID HTTP/1.1
Host:
Accept: text/event-stream
| Status | 200 OK |
|---|---|
| Content-Type | text/event-stream |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Get zone event stream - will register the client to a SSE stream with zone occupancy change events
Authorization: EVENT_ZoneEventsSSE and EVENT_ZONE_ALL
curl -X GET -H "Accept: text/event-stream" "{{baseUrl}}/api/v1/event/sse/zones"
GET %7B%7BbaseUrl%7D%7D/api/v1/event/sse/zones HTTP/1.1
Host:
Accept: text/event-stream
| Status | 200 OK |
|---|---|
| Content-Type | text/event-stream |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Update zone parameters - will update the parameters of the zone, can be used to manage the parking occupancy and reserved places.
Authorization: KERNEL_ZONES
Use this endpoint to modify the occupancy (free others) for given zone.
3 options:
curl -X PUT -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/zones/:id/other?value=&increase=&decrease="
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/zones/:id/other?value=&increase=&decrease= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
The endpoint in this folder are related to gathering the information about cards.
GET Card Info BARcode endpoint is used to identify the card record based on BARcode or QRCod data retrieved from the scarnner. STX (2) & ETX (3) can be included, the server will parse them out from the data.
GET Card info Alias endpoint is used to identify the card record based on Alias number of the card. The alias number is an alternative card number, which can be used to state the PIN, secondary card, or other kinds of tag number.
GET Card Info LPN endpoint is used to identify the card record based on cars licence plate registration number. No spaces, no dashes, only letters and numbers.
GET Card Info Notice endpoint is used to identify the card record based on the value of card notice, which is a free text value stored with the record. Can be used to store 3rd party IDs and etc.
GET Card Info search (by partial number) endpoint is uset to identify the card record based on just a part of the card number. It is recomended to use at least 3-5 last digits of the card number. The first X digits will be the same for the majority of active cards of the same type.
GET Journals - Card passages is an endpoint which will return list of passages for the card specified by the cardID in the pre-request script. This endpoint runs the SQL command on CardJournal table in DB, so the user can specify the column names, column relations and values to be used in the SQL request.
Card properties:
Number - Card numbers identify cards in the system. A card number has to be unique among all active cards within the system.
Access - The access differentiates among various types of cards.
ValidFrom - The beginning of a card validity.
ValidTill - The end of a card validity.
EntryTime - The time of a card entry to the car park. It can be either the time of the first entry or of the last entry (the passage through the entry terminal), according to the access setting. This parameter can (but not necessarily) be null, if the card is not located in the car park.
ExitTime - A defined time until that the card can leave the car park (pass through the exit terminal). This time is ultimate. The system includes all factors there – a credit, turnover, time for exit, etc.
EntryType - This parameter states the type of a vehicle recognized upon the card dispensing or set upon the card generating.
Credit - The credit of a card in minutes. The credit is stated for all types of cards used for short-term, residential, prepaid and congress parking.
Valid - The attribute stating whether the card is still valid in the system; 1 valid, 0 invalid.
Blocked - The attribute stating whether the card is blocked in the system. A blocked card is still valid but cannot be used. (1 = blocked, 0 = in use).
LicencePlate - A licence plate number of a card upon the card dispensing or generating. There can be more licence plate numbers in which case they need to be separated by semicolons. Licence plate consists of letters and numbers, no spaces, no dashes.
CardNotice - Any kind of note related to a card. Not to be mistaken with a note on a receipt.
Zone - The last zone where the card has changed the occupancy. This parameter can be null.
Reservation - The zone where the card has its reservation. This parameter can be null.
Owner - A card owner ID. This parameter can be null according to the access settings.
Alias: is an alternative card number, which can be used to state the PIN, secondary card, or other kinds of tag number.
CardNotice: is a free text value stored with the card record, can be used to store 3rd party UUIDs and etc.
TimeMark - A time mark stating when the last change of card parameters has been made. (UTC0)
GET Card Info BAR/QR code endpoint is used to identify the card record based on BARcode or QRcode data retrieved from the scarnner. STX (2) & ETX (3) can be included, the server will parse them out from the data.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:barCode"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:barCode HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET Card info Alias endpoint is used to identify the card record based on Alias number of the card. The alias number is an alternative card number, which can be used to state the PIN, secondary card, or other kinds of tag number.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?cardNumber=:CardAlias"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?cardNumber=:CardAlias HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET Card Info LPN endpoint is used to identify the card record based on cars licence plate registration number. No spaces, no dashes, only letters and numbers.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?lpn=:LPN"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?lpn=:LPN HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET Card Info Notice endpoint is used to identify the card record based on Notice property of the card. This value is commonly used to store the 3rd party UUID, however can be used for whatever additional info you need to store with the card.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?notice=:notice"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?notice=:notice HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET Card Info search (by partial number) endpoint is uset to identify the card record based on just a part of the card number. It is recomended to use 3-5 last digits of the card number. The first X digits will be the same for the majority of active cards of the same type. Max size of returned list is 50 records.
Authorization: KERNEL_CARDS
Use this endpoint to search for specific card based on Alias, BAR code, QR code, LPN, SMS code, Token, card number or a part of the card number. Use only one of available identifiers at a time.
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards?search="
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards?search= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET Journals - Card passages is an endpoint which will return list of passages for the card specified by the cardID in the pre-request script. This endpoint runs the SQL command on CardJournal table in DB, so the user can specify the column names, column relations and values to be used in the SQL request.
The endpoint has a filterNode object in json, so the object has to be URL encoded, here is an example javascript to use in pre-request:
let filterObject = {
"operator":"and",
"operands": [
{
"operator":"eq",
"field":"cardId",
"value": 1 //insert the cardID of the card for which you want to obtain the list of events
},
{
"operator":"eq",
"field":"action",
//"values": ["1", "2", "3", "4"] //1 - activation, 2 - deactivation, 3 - payment, 4 - pass
"value": "4"
},
{
"operator":"gte",
"field":"idCardJournal",
"value": "1"
}
]
};
let encodedFilterObject = encodeURIComponent(JSON.stringify(filterObject));
Here is a Actions table:
| Action | Name |
|---|---|
| 1 | Activation |
| 2 | Deactivation |
| 3 | Payment |
| 4 | Pass |
| 5 | Free pass |
| 6 | Stay in zone |
| 7 | Blocking |
| 8 | Unblocking |
| 10 | Change properties |
| 13 | Duplicate |
| 14 | Processing by card checker |
| 15 | Ask for price |
| 16 | LPN disagreement |
| 17 | Zero card pass |
| 18 | Rejected by server |
| 19 | Accepted by server |
| 20 | Command from card checker |
| 21 | Rejected by host |
| 22 | Ask for card information |
| 23 | Ask for card aliases |
| 24 | LPN match |
| 25 | Open for card |
| 26 | Read known card |
| 27 | Card modified by application GPWI |
| 28 | Card was deleted from all zones |
| 29 | Card was added into zone |
| 30 | Decrease credit of multiple entry |
| 31 | First entry of single interval |
| 37 | LPN Disagreement operation |
Authorization: JOURNAL_CARD
Fields: idCardJournal, cardId, action, subAction, hap, zoneIdFrom, zoneIdTo, stayingTime, station, createdBy, createdWhen, reason, price, cardNumber, lpn, photoKeyIMG, photoKeyLPN, timeMark, entryType, description, type, vatCharge, vatValue, count, notice, number, year, passActivationType
This journal is the set of records of parking system events. It can be filtered by query parameter filter. The filter parameter is the structured object FilterNode in json format. Object must be URL encoded. Syntax is following:
FilterNode:
{
"field": "
"value": "
"values": [ "
"operator": "< eq | gt | gte | in | lt | lte | ne | nin | and | or | not >",
"operands": "[ FilterNode ]
}
Possible operations are described below:
Operators:
eq("=") matches values in field that are equal to a specified value.
gt(">") matches values in field that are greater than a specified value.
gte(">=") matches values in field that are greater than or equal to a specified value.
in("IN") matches in field any of the values specified in an array of values.
lt("<") matches values in field that are less than a specified value.
lte("<=") matches values in field that are less than or equal to a specified value.
ne("<>") matches all values in field that are not equal to a specified value.
nin("NOT IN") matches none of the values in field specified in an array of values.
and("AND") and operation for all operands.
or("OR"), or operations for all operands
not("NOT"); not operation for the first element in operands
The filtered journal can be also filtered by query parameter sortBy. The multiple sort elements can be separated by ",". The syntax is below:
Sort by:
asc(
desc(
Example:
/api/v1/journal/cards?filter={ "operator":"and", "operands": [ { "operator":"in", "field":"action", "values": ["1", "2", "3", "4"]}, { "operator":"gt", "field":"idCardJournal", "value": "1" } ]}&sortBy=asc(idCardJournal)
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/journal/cards?offset=0&limit=500&filter={{encodedFilterObject}}&sortBy=asc(idCardJournal)"
GET %7B%7BAPIUrl%7D%7D/api/v1/journal/cards?offset=0&limit=500&filter={{encodedFilterObject}}&sortBy=asc(idCardJournal) HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
This folder contains the endpoints related to the card groups and its management.
The card group is an artificial object grouping a user specified set of cards together, so the system then can preform certain changes or actions over it. However, the main functionality is to restrict concurrent stay of cards assigned to the same group within the specified zone. Usually is used for situation when the end customer rents some amount of parking places, but has more available access cards then paid places. The card group functionality can then restrict the amount of cards parking at the same time from the same group based on the group capacity. Card group defined in off zone is an option which resluts in card group effect on all zones.
Simply said the cards that are member of group can enter the zone only if there are available free spaces in the card group, regardless of the free (other) spaces in zone.
First you should identify if there are any existing card groups in the system by using the first endpoint GET Card groups list
GET Card groups list endpoint is used to obtain a complete list of card groups exisitng in the system.
If the targed card group is not listed in answer from previous request, you may create a new card group record.
POST Create new card group endpoint is used to make a new card group.
When the group exists, the cards can be assgined to the group. You can either specify one or multiple card groups to be assigned to the card specified.
PUT Assign set of card groups endpoint is used to assign the specific card record to be a member of listed card groups.
PUT Add card to card group endpoint is used to assign card record to be a member of a specific card group.
If the card no longer belongs to the group, you may delete it from the list of card group members.
PUT Remove card from Card group endpoint is used to remove card record from the list of a specific card group members.
You can obtain the list of card groups to which the card specified is registered to.
GET List of assigned card groups endpoint is used to obtain the list of card groups to which the card specified is assigned to.
To update the card group properties like capacity, current occupancy or zone assginement use
PUT update card group properties endpoint is used to change/update properties of a card group specified (capacity, occupancy and zone).
You may delete it by following endpoint.
DEL Delete card group endpoint is used to delete the existing card group from the DB.
The card group cannot be deleted if there are members assigned to it. The existance of card group journals may also cause the same problem.
GET Card group members - use to obtain a list of cards registered for specific card group.
GET Card groups list endpoint is used to obtain a complete list of card groups exisitng in the system.
If the targed card group is not listed in answer from previous request, you may create a new card group record.
Authorization: CONFIGURATION_VIEWER
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/config/cardGroups?showAll=false"
GET %7B%7BbaseUrl%7D%7D/api/v1/config/cardGroups?showAll=false HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
POST Create new card group endpoint is used to make a new card group.
When the group exists, the cards can be assgined to the group. You can either specify one or multiple card groups to be assigned to the card specified. However, you should not assign the card to multiple groups in the same zone, as it would result in an undefined behavior.
Authorization: CONFIGURATION_EDITOR
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"idGroup": "",
"name": "",
"zoneId": "",
"capacity": "",
"engage": ""
}' "{{baseUrl}}/api/v1/config/cardGroups"
POST %7B%7BbaseUrl%7D%7D/api/v1/config/cardGroups HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idGroup": "",
"name": "",
"zoneId": "",
"capacity": "",
"engage": ""
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
PUT Assign set of card groups endpoint is used to assign the specific card record to be a member of listed card groups.
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"groupIds": [
"",
""
]
}' "{{baseUrl}}/api/v1/kernel/cards/:id/groups"
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/groups HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"groupIds": [
"",
""
]
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
PUT Add card to card group endpoint is used to assign card record to be a member of a specific card group.
If the card no longer belongs to the group, you may delete it from the list of card group members.
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"groupId": ""
}' "{{baseUrl}}/api/v1/kernel/cards/:id/groups/add"
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/groups/add HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"groupId": ""
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
PUT Remove card from Card group endpoint is used to remove card record from the list of a specific card group members.
You can obtain the list of card groups to which the card specified is registered to.
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"groupId": ""
}' "{{baseUrl}}/api/v1/kernel/cards/:id/groups/remove"
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/groups/remove HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"groupId": ""
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
GET List of card groups assigned to specific card endpoint is used to obtain the list of card groups to which the card specified is assigned to.
To update the card group properties like capacity, current occupancy or zone assginement use
Authorization: CONFIGURATION_VIEWER
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards/:idCard"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/:idCard HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
PUT update card group properties endpoint is used to change/update properties of a card group specified (capacity, occupancy and zone).
Authorization: CONFIGURATION_EDITOR
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"idGroup": "",
"name": "",
"zoneId": "",
"capacity": "",
"engage": ""
}' "{{baseUrl}}/api/v1/config/cardGroups/:id"
PUT %7B%7BbaseUrl%7D%7D/api/v1/config/cardGroups/:id HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idGroup": "",
"name": "",
"zoneId": "",
"capacity": "",
"engage": ""
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
DEL Delete card group endpoint is used to delete the existing card group from the DB.
The card group cannot be deleted if there are members assigned to it. The existance of card group journals may also cause the same problem.
Authorization: KERNEL_CARD_GROUPS
DOC
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cardGroups/:id/cards"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cardGroups/:id/cards HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
This folder contains the endpoints related to the card owners management.
The owner is an object specifying specific person or company, which in default configuration consists of first name, last name (surname) and distinction (to prevent duplicit values)
First you should check if the owner you are about to create doesn’t already exist in the DB.
Now, before you start making the owners, you should know that some cards must have an owner and some others don’t, and it all depends on the “afOwnerRequired” parameter of Access assigned to the card. If the “afOwnerRequired” is true, then the card has to have an OwnerID specified. If selected card access does not require the owner, then you may use card property “notice” to store UUID to pair your records with ours. Having an owner may be an advantage for customer as it makes it easier to search and identify cards by the customers name.
GET Get List of owners endpoint is used to obtain the list of exisitng card owner records.
If the owner doesn’t exist you may proceed to create a new owner record.
POST Create new owner endpoint is used to create a new owner record.
It is important to have unique combination of first name, last name and distinction, otherwise the system will not take the entry as unique record and will reject your post request.
If you need to change the properties of an existing owner record, you should first find out the ownerID. Either find it in the list obtained from the first request in this folder, or look at the card properties, the value of onwer is ownerID.
GET Get specific owner info endpoint is used to obtain the details about specific owner record based on the ownerID.
PUT Update specific owner properties endpoint is used to update the owner record properties.
Before the updated values are stored, the system checks if the new values are unique or not. If not, then the server rerturns an error.
PUT Change owner assigned to specific card is an endpoint by which you can change a ownerId assigned to a card to some other existing ownerId.
DELETE Invalidate owner is an endpoint by which you can invalidate specific ownerId, which prevents the owner to be assigned to any cards in future.
GET Cards assigned to owner is an endpoint to return the list of cards registered to a specific owner.
The owner properties have 2 levels, the standard and extended owner properties.
Standard owner properties are FirstName, SecondName, Distinction. Other properties like licence plate, notices, place and phone number are available only if the system has the extended owners parameter enabled. Last thing to mention is the licence plate number property of owner has no affect on the car park operation, it is just an informational property. The licence plate number to be used for the licence plate based passages has to be registered with the card record.
GET Get List of owners endpoint is used to obtain the list of exisitng card owner records.
If the owner doesn’t exist you may proceed to create a new owner record.
Fields with no value will be used as wild card, which means if you state only the FirstName and Distinction, the server will return all available permutations.
eg. First name : Peter, Distinction : Accounting would return results :
Peter Smith Accounting
Peter Barley Accounting
Authorization: KERNEL_OWNERS
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/owners?showAll=false&firstName=&secondName=&distinction="
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/owners?showAll=false&firstName=&secondName=&distinction= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
POST Create new owner endpoint is used to create a new owner record.
It is important to have unique combination of first name, last name and distinction, otherwise the system will not take the entry as unique record and will reject your post request.
Authorization: KERNEL_OWNERS
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"idOwner": "",
"firstName": "",
"secondName": "",
"distinction": "",
"valid": "",
"licencePlate": "",
"place": "",
"phone1": "",
"phone2": "",
"notice1": "",
"notice2": "",
"notice3": "",
"createdBy": "",
"createdWhen": "",
"invalidatedBy": "",
"invalidatedWhen": ""
}' "{{baseUrl}}/api/v1/kernel/owners"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/owners HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idOwner": "",
"firstName": "",
"secondName": "",
"distinction": "",
"valid": "",
"licencePlate": "",
"place": "",
"phone1": "",
"phone2": "",
"notice1": "",
"notice2": "",
"notice3": "",
"createdBy": "",
"createdWhen": "",
"invalidatedBy": "",
"invalidatedWhen": ""
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET Get specific owner info endpoint is used to obtain the details about specific owner record based on the ownerID.
Authorization: KERNEL_OWNERS
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/owners/:id"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/owners/:id HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
PUT Update specific owner properties endpoint is used to update the owner record properties.
Before the updated values are stored, the system checks if the new values are unique or not. If not, then the server rerturns an error.
Authorization: KERNEL_OWNERS
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"idOwner": "",
"firstName": "",
"secondName": "",
"distinction": "",
"valid": "",
"licencePlate": "",
"place": "",
"phone1": "",
"phone2": "",
"notice1": "",
"notice2": "",
"notice3": "",
"createdBy": "",
"createdWhen": "",
"invalidatedBy": "",
"invalidatedWhen": ""
}' "{{baseUrl}}/api/v1/kernel/owners/:id"
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/owners/:id HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idOwner": "",
"firstName": "",
"secondName": "",
"distinction": "",
"valid": "",
"licencePlate": "",
"place": "",
"phone1": "",
"phone2": "",
"notice1": "",
"notice2": "",
"notice3": "",
"createdBy": "",
"createdWhen": "",
"invalidatedBy": "",
"invalidatedWhen": ""
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
PUT Change owner assigned to specific card is an endpoint by which you can change a ownerId assigned to a card to some other existing ownerId.
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"ownerId": ""
}' "{{baseUrl}}/api/v1/kernel/cards/:id/owner"
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/owner HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"ownerId": ""
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
DELETE Invalidate owner is an endpoint by which you can invalidate specific ownerId, which prevents the owner to be assigned to any cards in future.
Use this endpoint to get the list of cards registered to a specific owner.
Authorization: KERNEL_OWNERS
Use this endpoint to get the list of cards registered to a specific owner.
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/owners/:id/cards"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/owners/:id/cards HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
The LPNRecords are standalone licence plate records serving multiple purposes, based on the type. Licence plate records are considered before the card records, if matching licence plate record is found, the system does not consider card records. Simply said the LPNRecord has priority before the card record.
| ID | Type |
|---|---|
| 1 | White list |
| 2 | Grey list |
| 3 | Black list |
| 4 | Multiple entry |
| 5 | Yellow list |
| 6 | Registered |
White list - each licence plate registered with this type is allowed to pass thru any unit which has the white list function enabled, without any requirements but the matching LPN and record validity.
Intended usage: Ambulances and similar high priority cars, where where there is a passage speed priority. Passages are not stored in DB, thus its not possible to reliably report them.
\========================================================================
Grey list - Licence plates registered with this type will be issued cards with access specified in the LPNRecord. By access pre-specification you may achieve different behaviour of the card, which includes the pricing.
Intended usage: Known suppliers can obtain a cards with lower pricing for the stay, or different amount of free credit, so they have more time to unload their goods and leave within the extended free period.
\========================================================================
Black list - each licence plate listed with this type is prevented from making passage thru any unit which has the black list function enabled.
Intended usage: Visitors who broke the rules of the parking or someone who caused damage and left without explanation. Generally put there any LPN that should not be able to enter or leave the parking.
\========================================================================
Multiple entry - when a car with lpn registered on this list requestes to issue a new card, the system first considers the time already spend on the parking within defined (in DB) period. Then it decreases the free credit issued by the amount already spent on the parking within the period. For example the shopping mall offers 5 hours for free per day (the period). If the customer spend 2 hours on the parking in the morning, if he then returns later the same day, the newly issued card will have only 3 hours of free credit instead of the full 5 hours. The period can be also defined to watch the time spend outside of the parking instead. In such case, if the customer returned in no less then 30 minutes outside (the period), then he is eligible to obtain the full free credit again.
Intended usage: Limit the free time used by the customers / visitors within defined period, either by defining the maximum amount of free time per period or by specifying the minimal time out off the parking before the customer is eligible to obtain full free credit again.
\========================================================================
Yellow list - passage of licence plates registered on this list can trigger sound alarm or/and be highlighted in the events window of GPSW_Cash
Intended usage: This function raises the operator awarenes of presence of certain card right upon pasage. Usually is used to notify the operators that boss is comming, just before he opens the door :)
\========================================================================
Registered - licence plates registered on this list will be issued cards with properties predefined by the lpn record. For example the card issued for lpn specified on the list can have predefined access, pin and credit
Intended usage: When LPN registered on this list arrives to the parking for the first time, the visitor will obtain a printed ticket with properties defined in the registration request. This gives physical identification media in the hands of customer, which he can use in case the LPN registered has been changed or when the LPR system doesn’t work.
\========================================================================
LPNRecords - Get list - will return LPN records registered in DB, use checkValidity to speficy if only valid records or all records
COLLECTION - Get LPN records - will return LPN records regardless of validity or other parameters, like other journal endpoints, the result set can be modified by offset and limit request parameters.
Authorization: KERNEL_LPNRECORDS
Use this endpoint to obtain a complete LPN records list.
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/lpnRecords?checkValidity=false"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/lpnRecords?checkValidity=false HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: COLLECTION_LPNRECORDS
Fields: idRecord, type, lpn, dateFrom, dateTill, accessId, credit, createdWhen, notice, cardNumber
This collection is the set of parking system objects. It can be filtered by query parameter filter. The filter parameter is the structured object FilterNode in json format. Object must be URL encoded. Syntax is following:
FilterNode:
{
"field": "",
"value": "",
"values": [ "", "", "", ...],
"operator": "< eq | gt | gte | in | lt | lte | ne | nin | and | or | not >",
"operands": "[ FilterNode ]
}
Possible operations are described below:
Operators:
eq("=") matches values in field that are equal to a specified value.
gt(">") matches values in field that are greater than a specified value.
gte(">=") matches values in field that are greater than or equal to a specified value.
in("IN") matches in field any of the values specified in an array of values.
lt("<") matches values in field that are less than a specified value.
lte("<=") matches values in field that are less than or equal to a specified value.
ne("<>") matches all values in field that are not equal to a specified value.
nin("NOT IN") matches none of the values in field specified in an array of values.
and("AND") and operation for all operands.
or("OR"), or operations for all operands
not("NOT"); not operation for the first element in operands
The filtered collection can be also filtered by query parameter sortBy. The multiple sort elements can be separated by ",". The syntax is below:
Sort by:
asc()
desc()
Example:
/api/v1/collection/lpnRecords?filter={ "operator":"and", "operands": [ { "operator":"in", "field":"type", "values": ["1","2"]}, { "operator":"gt", "field":"dateFrom", "value": "2023-01-01" } ]}&sortBy=asc(number)
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/collection/lpnRecords?offset=0&limit=500"
GET %7B%7BbaseUrl%7D%7D/api/v1/collection/lpnRecords?offset=0&limit=500 HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
Use this endpoint to create a new LPN record. There are multiple types of LPN records, each has its own behaviour. The LPN records are not connected with cards in any way. The LPN record has priority over the card record.
Authorization: KERNEL_LPNRECORDS
Use this endpoint to create a new LPN record. There are multiple types of LPN records, each has its own behaviour. The LPN records are not connected with cards in any way. The LPN record has priority over the card record.
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"type": 1,
"lpn": "{{C_randLPN}}",
"dateFrom": "{{validFrom}}",
"dateTill": "{{validTill}}",
"notice": "WHITE LIST"
}
' "{{baseUrl}}/api/v1/kernel/lpnRecords"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/lpnRecords HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"type": 1,
"lpn": "{{C_randLPN}}",
"dateFrom": "{{validFrom}}",
"dateTill": "{{validTill}}",
"notice": "WHITE LIST"
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
GET LPN records for specific LPN - will return LPN records registered in DB for LPN specified in request, use checkValidity to speficy if only valid records or all records
Authorization: KERNEL_LPNRECORDS
Use this endpoint to obtain a LPN records list for specific LPN.
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/lpnRecords?lpn=&checkValidity=false"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/lpnRecords?lpn=&checkValidity=false HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Use this endpoint to modify the parameters of an existing LPN record. Changes record type, validity and other properties.
Authorization: KERNEL_LPNRECORDS
Use this endpoint to modify the parameters of an existing LPN record. Changes record type, validity and other properties.
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d ' {
"idRecord": {{C_IdRecord}},
"type": 1,
"lpn": "{{C_randLPN}}",
"dateFrom": "{{validFrom}}",
"dateTill": "{{validTill}}",
"notice": "WHITE LIST UPDATE VALIDITY AND CHAGE LPN"
}' "{{baseUrl}}/api/v1/kernel/lpnRecords/{{C_IdRecord}}"
PUT %7B%7BbaseUrl%7D%7D/api/v1/kernel/lpnRecords/%7B%7BC_IdRecord%7D%7D HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idRecord": {{C_IdRecord}},
"type": 1,
"lpn": "{{C_randLPN}}",
"dateFrom": "{{validFrom}}",
"dateTill": "{{validTill}}",
"notice": "WHITE LIST UPDATE VALIDITY AND CHAGE LPN"
}
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
Use this endpoint to get information about LPN record specified by it's idRecord.
Authorization: KERNEL_LPNRECORDS
Use this endpoint to get information about LPN record specified by it's ID.
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/lpnRecords/{{C_IdRecord}}"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/lpnRecords/%7B%7BC_IdRecord%7D%7D HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
Use this endpoint to terminate the validity of LPN record specified by it's idRecord.
Authorization: KERNEL_LPNRECORDS
Use this endpoint to terminate the validity of LPN record specified by it's idRecord.
curl -X DELETE "{{baseUrl}}/api/v1/kernel/lpnRecords/{{C_IdRecord}}"
DELETE %7B%7BbaseUrl%7D%7D/api/v1/kernel/lpnRecords/%7B%7BC_IdRecord%7D%7D HTTP/1.1
Host:
| Status | 200 OK |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
this folder contains endpoints which can be used to simulate or replace the operation of CardChecker device, which is a simple terminal which can read the card and based on the hardware setup and configuration, the device either preforms an automated action, or the operator can select from up to 4 choices by selecting one of 4 available buttons.
This device is usually used to provide discount in places like cinema, gym or any other place where customer spent some portion of park time.
For example, the parking standardly provides only 3 hours for free, but if you visit the cinema, you can get extra 2 hours for free by using the CardChecker device.
The sub-folders are related to each standard funciton of the CardChecker device.
Use this procedure to pay the card till now.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTillNow=true"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTillNow=true HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTillNow=true"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTillNow=true HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Use this procedure to pay the card till time specified in path variable payTill=.
Available datetime formats are
UTC: YYYY-MM-DDTHH:mm:ss.sssZ (eg. 2023-06-17T07:43:42.764Z)
TImeZone: YYYY-MM-DDTHH:mm:ss.xxx+02 (eg. 2023-06-17T09:43:42.764+02)
(more on topic WIKIPEDIA ISO 8601)
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTill="
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTill= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTill="
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTill= HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Use this procedure to pay the card till the time specified in the configuration on the server side.
This function is usually used in case of P+R (park and ride) type of parking, where there is usually a fixed price for whole day, so the customer can pay anytime thru out the day.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTillPreset=true"
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTillPreset=true HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTillPreset=true"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTillPreset=true HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Use this procedure to add specific amount of credit for the card.
Can be used as a partial payment of parking fee, so this can be viewed as sort of a discount product.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/payment?addCredit="
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?addCredit= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment?addCredit="
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?addCredit= HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Use this procedure to extend the validity of the card.
If the card is present on the parking, it is necessary to use path variable force=true
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}"
}' "{{APIUrl}}/api/v1/kernel/cards/:id/validity?force=true"
PUT %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/:id/validity?force=true HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}"
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
Use this procedure to change the access of the card.
As metioned in the introduction, the access is a set of predefined properties or template of properties, which are assgined to the card during activation process. These properties specify a lot of things, but most importantly it defines where the card can pass ( available zones) and tarrif to be applied when calculating the price for parking. By changing the card access you are changing the card behaviour and passage options.
Authorization: KERNEL_CARDS
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards?barCode=:BarCodeData"
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards?barCode=:BarCodeData HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: CONFIGURATION_VIEWER
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/config/accesses?showAll=false"
GET %7B%7BbaseUrl%7D%7D/api/v1/config/accesses?showAll=false HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"accessId": "3"
}' "{{APIUrl}}/api/v1/kernel/cards/:id/accesses?force=1"
PUT %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/:id/accesses?force=1 HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"accessId": "3"
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|
This folder contains use cases related to the short term cards. (single use cards)
The shortterm card is a single use card deactivated upon the exit from the parking.
Before the activation of the shortterm card you should know which accessID you can use for your cards, best practice is to request GREENCenter to create a standalone access which will be used only by the cards activated by the API. This makes it easier for the customer to differentiate between standard cards and cards made over API, however you can choose any of exisitng accesses.
Default access table:
| AccessID | Access name | Usage |
|---|---|---|
| 1 | Longterm | can be used thru out its validity, usually unpaid |
| 2 | Shortterm | single use card, usually paid |
| 3 | Congress | anonymous multi-use card with limited validity and option to pay for time spent over prepaid value |
| 4 | Cheque | anonymous multi-use card, limited by the prepaid credit and validity, whichever expires first. Once the credit is insufficient to cover whole last stay, the customer is asked to pay the extra. |
Use this procedure to generate a prepaid short term card, which can enter and leave the parking within the prepaid time, or pay for the time the customer spend over the prepaid value.
The ValidFrom and ValidTill define the earliest and latest possible time to use the card, but the time it can spend on the parking for free, is defined by the value of credit.
Parameter zoneID marks the zone in which the card will be activated, must match the physical location of the customer. In this case, the recomended zoneId = 0, which means “Off zone” = outside of the parking. This will enable the customer to enter the parking based on the card created by the API.
Recommended: mediaPrefix=0x01 (BARCode)
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"accessId": 2,
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}",
"credit": 60,
"cardNotice": "SHORT TERM CARD PREPAID 60",
"zoneId": 0
}
' "{{APIUrl}}/api/v1/kernel/cards/activate?generate=true&mediaPrefix=0x01"
POST %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/activate?generate=true&mediaPrefix=0x01 HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"accessId": 2,
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}",
"credit": 60,
"cardNotice": "SHORT TERM CARD PREPAID 60",
"zoneId": 0
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Use this procedure to generate a prepaid short term card, which can leave the parking within the prepaid time, or pay for the time the customer spend over the prepaid value.
The ValidFrom and ValidTill define the earliest and latest possible time to use the card, but the time it can spend on the parking for free, is defined by the value of credit.
Parameter zoneID marks the zone in which the card will be activated, must match the physical location of the customer. In this case, the recomended zoneId = 1, which is default zone “Parking” = inside of the parking zone . This will enable the customer to enter the parking based on the card created by the API. You may need to use different idZone, according the setup of the system you are integrating.
Recommended: mediaPrefix=0x01 (BARCode)
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"accessId": 2,
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}",
"credit": 60,
"cardNotice": "EXIT CARD PREPAID 60",
"zoneId": 1
}
' "{{APIUrl}}/api/v1/kernel/cards/activate?generate=true&mediaPrefix=0x01"
POST %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/activate?generate=true&mediaPrefix=0x01 HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"accessId": 2,
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}",
"credit": 60,
"cardNotice": "EXIT CARD PREPAID 60",
"zoneId": 1
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
This folder contains use cases related to the long term cards. (multiple use cards)
Activation :
Shows how to activate longerm type card in different situations and purposes.
POST Card - Generate virtual card - use to generate a card ( “virtual card” )
POST Card - Activate card - use to activate a card ( physical medium )
Passage emulation :
Shows how to emulate a card passage or just check the possibility of making the passage.
GET Card - Can card pass - check if the card is eligible to make a pass thru certain terminal.
POST Card - Make pass - emulate the passage thru unit
Passage info :
Use this to find out the card passage history.
GET Collection - filter Card - use to obtain list of card passages from card journal records
Extend validity - paid :
Two step validity extenstion process, first step to identify the amount to be collected for the time period desired, second to confirm the payment and process the validity extension.
GET Get Card Price - TillTime - use to obtain the price to be paid
POST Pay the card - PayTill - use to confirm the payment
Extend validity - unpaid :
Simple validity adjustment, no payment, no other fuss.
PUT Card - change validity - use to change the card validity
When activating the longterm type card you should first think of what purpose the card will serve, which zones should be accessible with the card and the rate accoding which the card will be priced. All of these are defined by the card property Access.
Table of default accesses:
| AccessID | Access name | Usage |
|---|---|---|
| 1 | Longterm | can be used thru out its validity, usually unpaid, owner required |
| 2 | Shortterm | single use card, usually paid |
| 3 | Congress | anonymous multi-use card with limited validity and option to pay for time spent over prepaid value |
| 4 | Cheque | anonymous multi-use card, limited by the prepaid credit and validity, whichever expires first. Once the credit is insufficient to cover whole last stay, the customer is asked to pay the extra. |
Please keep in mind that this is a default configuration, so on production server the setup may differ.
If you are not certain which accessId you should use, or if there is no access matchning your needs available, it is recommended to contact GREENCenter support team, who can help you make a new access or select from one of those already available.
In order to get a list of accesses you can use endpoint GET ACCESS - Get list (you need authorization for config module)
Now, when you have a specific idea of the card properties, you may proceed to the activation process.
Next you have to choose the endpoint based on if you are activating a physical or virtual card.
Card - Virual card is used in case the end user has no physical media ( proximity card, radio remote, printed code…) to pair the card record with, usually used in LPN based operation. The downside of this is the user has no alternative identification available in case the LPR process fails to match his licence plate with any of registered records. In such case, it is recommended to use the Card - Generate virual card, which is able to generate the card number based on the prefix provide in the request, recommended prefix value are:
| Media | Prefix |
|---|---|
| Printed card | 0x01 |
| Proximity card | 0x03 |
| PIN code | 0x16 |
The server will return not only the card number, but also a QRCode data, so you may use those to generate a QR code to the enduser, which he can then use as alternative identificator.
Card - Activate card is used in case you have code of end user physical medium available.
Important card properties:
Number - Card numbers identify cards in the system. A card number has to be unique among all active cards within the system.
Access - The access differentiates among various types of cards.
ValidFrom - The beginning of a card validity.
ValidTill - The end of a card validity.
EntryTime - The time of a card entry to the car park. It can be either the time of the first entry or of the last entry (the passage through the entry terminal), according to the access setting. This parameter can (but not necessarily) be null, if the card is not located in the car park.
ExitTime - A defined time until that the card can leave the car park (pass through the exit terminal). This time is ultimate. The system includes all factors there – a credit, turnover, time for exit, etc.
EntryType - This parameter states the type of a vehicle recognized upon the card dispensing or set upon the card generating.
Credit - The credit of a card in minutes. The credit is stated for all types of cards used for short-term, residential, prepaid and congress parking.
Valid - The attribute stating whether the card is still valid in the system; 1 valid, 0 invalid.
Blocked - The attribute stating whether the card is blocked in the system. A blocked card is still valid but cannot be used. (1 = blocked, 0 = in use).
LicencePlate - A licence plate number of a card upon the card dispensing or generating. There can be more licence plate numbers in which case they need to be separated by semicolons. Licence plate consists of letters and numbers, no spaces, no dashes.
CardNotice - Any kind of note related to a card. Not to be mistaken with a receipt notice.
Zone - The last zone where the card has changed the occupancy. This parameter can be null.
Reservation - The zone where the card has its reservation. This parameter can be null.
Owner - A card owner ID. This parameter can be null according to the access settings.
TimeMark - A time mark stating when the last change of card parameters has been made. (UTC0)
Alias: is an alternative card number, which can be used to state the PIN, secondary card, or other kinds of tag number. The alias is attached to the primary card by idCard.
Authorization: CONFIGURATION_VIEWER
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/config/accesses?showAll=true"
GET %7B%7BAPIUrl%7D%7D/api/v1/config/accesses?showAll=true HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"accessId": 3,
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}",
"credit": 0,
"cardNotice": "APITEST",
"zoneId": 0
}
' "{{APIUrl}}/api/v1/kernel/cards/activate?generate=true&mediaPrefix=0x16"
POST %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/activate?generate=true&mediaPrefix=0x16 HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"accessId": 3,
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}",
"credit": 0,
"cardNotice": "APITEST",
"zoneId": 0
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards/activate?generate=false"
POST %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/activate?generate=false HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Occasionaly, you may need to make a virtual passage to recover the card zones after system failure, or in case the customer did use other means to leave the parking, so now the system thinks the card is in different zone then the customer really is, or simply to test the card setup and system configuration.
GET Card - Can card pass - check if the card is eligible to make a pass thru certain terminal.
POST Card - Make pass - emulate the passage thru unit
The option ABC or “EntryType” is a 3 bit input value (based on vehicle height sensors and loops) converted to a decadic number representing the vehicle type. Recommended values 0, but depends on the setup of access, specifically on OptionA,B,C and physical presence of vehicle type sensors in terminals. If 0 doesn’t work, try using value 7 (bin 111).
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
This endpoint tests if, the card is able to make a passage thru the specified terminal based on current carpark setup and card properties.
curl -X GET -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/pass/:hap?exitZoneId=&optionABC="
GET %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/pass/:hap?exitZoneId=&optionABC= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
Simulates the passage thru the spefied host.
curl -X POST -H "Accept: application/json" "{{baseUrl}}/api/v1/kernel/cards/:id/pass/:hap?exitZoneId="
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/pass/:hap?exitZoneId= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
In order to obtain the card journal info by the endpoint in this folder you need an authorization for Journals module.
GET Journals - Card passages is an endpoint which will return list of passages for the card specified by the cardID in the pre-request script. This endpoint runs the SQL command on CardJournal table in DB, so the user can specify the column names, column relations and values to be used in the SQL request.
The endpoint has a filterNode object in json, so the object has to be URL encoded, here is an example javascript to use in pre-request:
let filterObject = {
"operator":"and",
"operands": [
{
"operator":"eq",
"field":"cardId",
"value": 1 //insert the cardID of the card for which you want to obtain the list of events
},
{
"operator":"eq",
"field":"action",
//"values": ["1", "2", "3", "4"] //1 - activation, 2 - deactivation, 3 - payment, 4 - pass
"value": "4"
},
{
"operator":"gte",
"field":"idCardJournal",
"value": "1"
}
]
};
let encodedFilterObject = encodeURIComponent(JSON.stringify(filterObject));
Actions table:
| Action | Name |
|---|---|
| 1 | Activation |
| 2 | Deactivation |
| 3 | Payment |
| 4 | Pass |
| 5 | Free pass |
| 6 | Stay in zone |
| 7 | Blocking |
| 8 | Unblocking |
| 10 | Change properties |
| 13 | Duplicate |
| 14 | Processing by card checker |
| 15 | Ask for price |
| 16 | LPN disagreement |
| 17 | Zero card pass |
| 18 | Rejected by server |
| 19 | Accepted by server |
| 20 | Command from card checker |
| 21 | Rejected by host |
| 22 | Ask for card information |
| 23 | Ask for card aliases |
| 24 | LPN match |
| 25 | Open for card |
| 26 | Read known card |
| 27 | Card modified by application GPWI |
| 28 | Card was deleted from all zones |
| 29 | Card was added into zone |
| 30 | Decrease credit of multiple entry |
| 31 | First entry of single interval |
| 37 | LPN Disagreement operation |
Available fields to filter by:
Fields: idCardJournal, cardId, action, subAction, hap, zoneIdFrom, zoneIdTo, stayingTime, station, createdBy, createdWhen, reason, price, cardNumber, lpn, photoKeyIMG, photoKeyLPN, timeMark, entryType, description, type, vatCharge, vatValue, count, notice, number, year, passActivationType
This journal is the set of records of parking system events. It can be filtered by query parameter filter. The filter parameter is the structured object FilterNode in json format. Object must be URL encoded. Syntax is following:
FilterNode:
{
}
Possible operations are described below:
Operators:
The filtered journal can be also filtered by query parameter sortBy. The multiple sort elements can be separated by “,”. The syntax is below:
Sort by:
Example:
/api/v1/journal/cards?filter={ “operator”:“and”, “operands”: [ { “operator”:“in”, “field”:“action”, “values”: [“1”, “2”, “3”, “4”]}, { “operator”:“gt”, “field”:“idCardJournal”, “value”: “1” } ]}&sortBy=asc(idCardJournal)
Authorization: JOURNAL_CARD
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/journal/cards?offset=0&limit=500&filter={{encodedFilterObject}}&sortBy=asc(idCardJournal)"
GET %7B%7BAPIUrl%7D%7D/api/v1/journal/cards?offset=0&limit=500&filter={{encodedFilterObject}}&sortBy=asc(idCardJournal) HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
This folder contains the endpoints for the paid validity extension. Usually used for customers who pay periodical fee for the possibility of parking.
Paid validity extension is a two step process. First step to identify the amount to be collected for the time period desired, the second step is to confirm the payment and process the validity extension.
Use the data from GET Get card price answer body from the in request body for POST Pay the card endpoint.
GET Get card price - TillTime - is used to identify the amount to be collected for the extended time period
POST Pay the card - PayTill - is used to confirm the payment process
POST Create simple receipt - is use to create a receipt record for the payment
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X GET -H "Accept: application/json" "{{APIUrl}}/api/v1/kernel/cards/:id/payment?payTill="
GET %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTill= HTTP/1.1
Host:
Accept: application/json
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_CARDS and (CARD_ACCESS_ or CARD_ACCESS_ALL)
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}' "{{baseUrl}}/api/v1/kernel/cards/:id/payment?payTill="
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/cards/:id/payment?payTill= HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"addCredit": "", // amount of minutes to be paid
"payTill": "", // time till when the card is paid
"priceWithVAT": "", // Price of the receipt, should equal to collected money
"items": []
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 404 Not Found |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
Authorization: KERNEL_RECEIPTS
Use this endpoint in order to create a simplified receipt record.
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"idCard": {{C_idCard}},
"number": {{C_Number}},
"addCredit": {{C_addCredit}},
"priceWithVAT": {{C_priceWithVAT}},
"vatCharge": {{C_vatCharge}},
"vatValue": {{C_vatValue}},
"cardState": {{C_cardState}},
"items": [{{C_items}}]
}
' "{{baseUrl}}/api/v1/kernel/receipts/station/:id/simple?currencyId=1&paymentkindId=1&receiptItemName=Parking fee"
POST %7B%7BbaseUrl%7D%7D/api/v1/kernel/receipts/station/:id/simple?currencyId=1&paymentkindId=1&receiptItemName=Parking fee HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"idCard": {{C_idCard}},
"number": {{C_Number}},
"addCredit": {{C_addCredit}},
"priceWithVAT": {{C_priceWithVAT}},
"vatCharge": {{C_vatCharge}},
"vatValue": {{C_vatValue}},
"cardState": {{C_cardState}},
"items": [{{C_items}}]
}
| Status | 201 Created |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 500 Internal Server Error |
|---|
This folder contains the endpoints for the change of cards validity. Usually used for employees or other personel. This procedure can also be used to decrease the validity to a certain date and time.
PUT Card - change validity - used to modify the ValidFrom and ValidTill parameters of the card.
Authorization: KERNEL_CARDS and (CARD_ACCESS_<id> or CARD_ACCESS_ALL)
curl -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}"
}' "{{APIUrl}}/api/v1/kernel/cards/{{C_idCard}}/validity?force=true"
PUT %7B%7BAPIUrl%7D%7D/api/v1/kernel/cards/%7B%7BC_idCard%7D%7D/validity?force=true HTTP/1.1
Host:
Content-Type: application/json
Accept: application/json
{
"validFrom": "{{validFrom}}",
"validTill": "{{validTill}}"
}
| Status | 200 OK |
|---|---|
| Content-Type | application/json |
|
|
| Status | 400 Bad Request |
|---|
| Status | 403 Forbidden |
|---|
| Status | 404 Not Found |
|---|
| Status | 500 Internal Server Error |
|---|