How it works
The PWI Sistemas system is already integrated with CloudPark through Ticket Validation: the parking fee is charged at your own checkout (ticket office, POS, app) and the exit is released.
Lookup
GET /agreementvalidation/{ticket}: how much the customer owes.Chargeat the checkout, using your system's payment methods.
Validation
POST /agreementvalidation with the amount paid: 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 |
Contract code (contract_id) | 221137600 |
The calls
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}'
The lookup also accepts the license plate instead of the ticket, or the QR Code (?qr_code=). Fields, responses and errors are in the full Ticket Validation guide.
Test on the sandbox
| Ticket or license plate | Result |
|---|---|
400045265 or ABC1234 | Lookup and validation succeed. |
384745455 | Vehicle has already left (400). |
379924820 | Ticket deleted (400). |
403045263 | Not found (404). |
You can send these scenarios from the browser in the guide's Try it on the sandbox section.
Going to production
- CloudPark sends the parking lot's URL, token and contract code.
- Set the three values in your system and make a test charge with a real ticket.