CloudPark CloudPark Integration API

Certified integrator

Milium

Integration model: Store Integration + Ticket Validation · Full API guide: Store Integration · Full API guide: Ticket Validation

The Milium system first applies the purchase discount and, if there is an amount left, charges it at its own checkout. See the call sequence and the sandbox data.

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.

Discount for the purchasePOST /storevalidation with the ticket and the purchase amount.
Anything left?If minutes_to_exit came back as 0, look up the remaining amount with GET /agreementvalidation/{ticket}.
Chargethe difference at the checkout.
PaymentPOST /agreementvalidation with the amount charged: the exit is released.

Settings for your system

SettingSandbox (testing)Production
Base URLhttps://sandbox.cloudpark.com.br/api/v1/integrationhttps://<parking-lot>.cloudpark.com.br/api/v1/integration
Token (Authorization header)Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4bProvided by CloudPark for each parking lot
Store integration code (integration_id)135745217
Contract code (contract_id)221137600

The calls

1. Apply the discount for the purchase
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.

2. Look up the remaining amount
curl "https://sandbox.cloudpark.com.br/api/v1/integration/agreementvalidation/400045265?contract_id=221137600" \
  -H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
3. Report the payment of the difference
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: 400045265 or the license plate ABC1234 (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

  1. The parking lot agrees on the discount tiers with CloudPark.
  2. CloudPark sends the URL, the token, the store integration code and the contract code.
  3. Set the values in your system and make a test sale with a real ticket.