How it works
The Milium system uses two integrations in sequence: first it applies the discount for the purchase (Store Integration) and, if the discount does not cover the whole stay, it charges the difference at its own checkout (Ticket Validation). The customer leaves without going through the kiosk.
POST /storevalidation with the ticket and the purchase amount.minutes_to_exit came back as 0, look up the remaining amount with GET /agreementvalidation/{ticket}.POST /agreementvalidation with the amount charged: the exit is released.Settings for your system
| Setting | Sandbox (testing) | Production |
|---|---|---|
| Base URL | https://sandbox.cloudpark.com.br/api/v1/integration | https://<parking-lot>.cloudpark.com.br/api/v1/integration |
Token (Authorization header) | Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b | Provided by CloudPark for each parking lot |
Store integration code (integration_id) | 135745217 | |
Contract code (contract_id) | 221137600 |
The calls
curl -X POST https://sandbox.cloudpark.com.br/api/v1/integration/storevalidation \
-H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b" \
-H "Content-Type: application/json" \
-d '{"integration_id": "135745217", "id": 379924820, "purchase_value": 80.0}'
A response with "minutes_to_exit": 0 means there is still an amount to pay. With a value greater than zero, the exit is already released and the process ends here.
curl "https://sandbox.cloudpark.com.br/api/v1/integration/agreementvalidation/400045265?contract_id=221137600" \
-H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
curl -X POST https://sandbox.cloudpark.com.br/api/v1/integration/agreementvalidation \
-H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b" \
-H "Content-Type: application/json" \
-d '{"ticket_id": 400045265, "contract_id": "221137600", "paid_value": 15.35}'
Test on the sandbox
- Discount:
400045265(released),379924820(amount left over),384745455(already validated),403045263(not found). Purchases from R$ 50.00. - Lookup and payment:
400045265or the license plateABC1234(success),384745455(vehicle has already left),403045263(not found).
The full guides have Try it on the sandbox to send each call from the browser.
Going to production
- The parking lot agrees on the discount tiers with CloudPark.
- CloudPark sends the URL, the token, the store integration code and the contract code.
- Set the values in your system and make a test sale with a real ticket.