What it is for
It is the classic "spend over R$ X and get Y hours of parking". When the customer pays at the store checkout, your system (POS, checkout front end, app) sends CloudPark the parking ticket and the purchase amount. CloudPark finds the discount tier that the amount reaches and applies the discount (free time) to the ticket.
- Who uses it: supermarkets, department stores, malls and any business with a partnership with the parking lot.
- What the store charges: nothing for parking. If the discount does not cover the whole stay, the customer pays the difference at the parking lot's checkout or kiosk.
- If the store charges the full parking fee at its own checkout, use Ticket Validation.
How the discount is chosen
The parking lot sets up a store integration in the CloudPark Dashboard with purchase amount tiers, each linked to an amount of free time. CloudPark applies the highest tier that the purchase amount reaches:
| Configured tier | Discount | R$ 80.00 purchase |
|---|---|---|
| from R$ 30.00 | 1 hour | |
| from R$ 50.00 | 2 hours | applied |
| from R$ 100.00 | 3 hours |
If the purchase does not reach any tier, the API returns 400 and nothing is applied. The tiers, the times and the usage rules (e.g. whether it can be combined with another discount, the deadline to validate after entering, the occupancy limit) are defined by the parking lot and cannot be changed through the API.
The deadline to validate refuses the call with 400 once it has passed. The occupancy limit (how many cars with this discount can be in the parking lot at the same time) does not refuse: above the limit, the ticket is priced with another price table set by the parking lot and the response is 200, usually with minutes_to_exit equal to 0.
Flow
integration_id.minutes_to_exit: exit released or amount due.Validate the ticket
/api/v1/integration/storevalidationApplies the discount to the ticket according to the purchase amount.
Request body
| Field | Type | Description |
|---|---|---|
integration_idrequired |
string (numeric ID) | Store integration code, sent as a string (e.g. "135745217"). In production, codes can have up to 19 digits; see Large IDs. On the sandbox: "135745217". In production, the parking lot looks it up in the CloudPark Dashboard (Settings > Store Integration) or you list it with the lookup endpoint. |
id |
integer | Ticket number, as printed in the barcode (with the final check digit, which is required: without it the ticket is not found). Send only one of the two: id or qr_code. |
qr_code |
string | Full content of the ticket's QR Code, e.g. https://c2p.uk/1?p=1&d=.... Do not send it together with id: with both fields the call is refused with 400. A valid QR Code always identifies the ticket: if the ticket is not on the server yet (e.g. the entry has not synced), CloudPark creates it from the QR Code data. |
purchase_valuerequired |
number | Total purchase amount, in reais, with a decimal point (e.g. 80.5). |
Example
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": 400045265, "purchase_value": 80.0}'
import requests
response = requests.post(
"https://sandbox.cloudpark.com.br/api/v1/integration/storevalidation",
json={"integration_id": "135745217", "id": 400045265, "purchase_value": 80.0},
headers={"Authorization": "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"},
timeout=15,
)
data = response.json()
if response.status_code == 200 and data["minutes_to_exit"] > 0:
print(f"Exit released: the customer has {data['minutes_to_exit']} minutes to leave.")
elif response.status_code == 200:
print("Discount applied, but there is still an amount to pay at the parking lot checkout.")
else:
print("Not validated:", data.get("message") or data.get("detail"))
const response = await fetch("https://sandbox.cloudpark.com.br/api/v1/integration/storevalidation", {
method: "POST",
headers: {
"Authorization": "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b",
"Content-Type": "application/json",
},
body: JSON.stringify({ integration_id: "135745217", id: 400045265, purchase_value: 80.0 }),
});
const data = await response.json();
if (response.ok && data.minutes_to_exit > 0) {
console.log(`Exit released: ${data.minutes_to_exit} minutes to leave.`);
} else if (response.ok) {
console.log("Discount applied, but there is still an amount to pay at the parking lot checkout.");
} else {
console.log("Not validated:", data.message || data.detail);
}
Success response (200)
{
"expiration_date": "2026-11-23T18:42:10.512000Z",
"minutes_to_exit": 15,
"message": "Validado com sucesso"
}
| Field | Type | Description |
|---|---|---|
expiration_date |
date/time | Until when the customer can leave without paying anything else. In UTC (ending in Z). |
minutes_to_exit |
integer | Minutes the customer has to leave. 0 means the discount was applied but did not cover the whole stay: the customer must pay the difference at the parking lot's checkout or kiosk. |
message |
string | Description of what happened, to show to the operator. |
The three possible successes:
| Situation | minutes_to_exit | message |
|---|---|---|
| Discount applied and covers the whole stay | greater than 0 | Validado com sucesso (validated successfully) |
| Discount applied, but there is still an amount due | 0 | Valor pendente, valide no estacionamento (amount due, validate at the parking lot) |
| The ticket already had a discount and this integration's discount is not cumulative | what is left of the previous discount | Esse ticket já foi validado (this ticket has already been validated) |
Errors
| HTTP | When it happens | Response |
|---|---|---|
| 400 | integration_id, purchase_value or the ticket (id/qr_code) is missing. |
{"message": "Deve ser informado os campos: 'integration_id', 'id' e 'purchase_value'"} |
| 400 | The integration_id does not exist at this parking lot. |
{"message": "'integration_id' inválido"} |
| 400 | The purchase amount does not reach any discount tier. | {"message": "Valor da compra não da abono ao estacionamento"} |
| 400 | You sent id and qr_code together. Send only one of the two. |
{"message": "'NoneType' object has no attribute 'count'"} |
| 400 | The QR Code could not be decoded (wrong check digit, incomplete or cut off). Other defects (e.g. text that is not a CloudPark QR Code) also return 400, but with a technical message in message: decide by the HTTP status code. |
{"message": "Não foi possível decodificar o QRCode para identificar o movimento"} |
| 400 | The vehicle has already left the parking lot. The message shows the ticket number without its last digit. | {"message": "O movimento com o código 40304526 já foi dado saída", "code": 7} |
| 400 | The ticket was deleted by the parking lot. | {"message": "O movimento com o código 40304526 já foi excluído", "code": 8} |
| 400 | A parking lot rule prevented the discount (e.g. validation deadline has passed, unique discount already applied). | {"message": "Motivo"} |
| 401 | Token missing or invalid. | {"detail": "Token inválido."} |
| 404 | Ticket not found. The message shows the number you sent without its last digit (e.g. 403045263 becomes 40304526). |
{"message": "Código 40304526 não encontrado"} |
Look up store integrations
Read-only support endpoints. Useful to find the integration_id or to show the discount tiers in your system. The parking lot creates and changes the integrations in the CloudPark Dashboard.
List store integrations
/api/v1/integration/storeintegrationlistcurl https://sandbox.cloudpark.com.br/api/v1/integration/storeintegrationlist \
-H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
[
{"name": "Loja Exemplo", "id": "135745217"}
]
In this lookup id comes as a string. Send it the same way, as a string, in the validation's integration_id field.
Get a store integration
/api/v1/integration/storeintegration/{id}curl https://sandbox.cloudpark.com.br/api/v1/integration/storeintegration/135745217 \
-H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
{
"id": "135745217",
"name": "Loja Exemplo",
"cnpj_nfce": "12345678000199",
"contract": "221137600",
"stamp_is_unique": false,
"stamp_is_cumulative": false,
"items": [
{"purchase_value": 50.0, "minutes": 60},
{"purchase_value": 150.0, "minutes": 180}
]
}
| Field | Type | Description |
|---|---|---|
items |
list | Discount tiers: minimum purchase amount (purchase_value) and minutes of free time (minutes). |
stamp_is_cumulative |
boolean | Whether the discount can be combined with other discounts on the same ticket. |
stamp_is_unique |
boolean | Whether the ticket can receive only one discount from this integration. |
contract |
string | Contract (price table) used to calculate the ticket with the discount. |
cnpj_nfce |
string | The store's CNPJ (Brazilian company tax ID), when the integration checks the CNPJ on the receipt. |
If the integration does not exist, the response is 404 with no body.
Test data (sandbox)
Use integration_id "135745217" and a purchase_value of at least 50 (the only sandbox tier starts at R$ 50.00).
id | qr_code | Result |
|---|---|---|
400045265 | https://c2p.uk/1?p=1&d=45l4kk*6vz7ma*sm6rdq*AAA111*37nq65*0.00*0*sm6rek*sm6s2q*71 | 200: validated, 15 minutes to leave |
379924820 | https://c2p.uk/2?p=1&d=45l4kk*6vz7ma*sm6rdq*AAA222*37nq65*0.00*0*sm6rek*sm6s2q*71 | 200: validated, with an amount due (minutes_to_exit = 0) |
384745455 | https://c2p.uk/3?p=1&d=45l4kk*6vz7ma*sm6rdq*AAA333*37nq65*0.00*0*sm6rek*sm6s2q*71 | 200: ticket already validated |
403045263 | — | 404: Código 40304526 não encontrado |
| — | a QR Code with a wrong check digit (https://c2p.uk/1?p=1&d=45l4kk*6vz7ma*sm6rdq*AAA111*37nq65*0.00*0*sm6rek*sm6s2q*72) | 400: the QR Code could not be decoded |
400045265 | the QR Code above, together | 400: id and qr_code together |
| any of the above | with purchase_value below 50: 400, amount does not earn a discount |
FAQ
What does minutes_to_exit: 0 mean?
It is not an error. The discount was applied, but the customer stayed longer than the discount covers. They must pay the difference at the parking lot's checkout or kiosk before leaving.
How do I find my store's integration_id?
The parking lot creates it in the CloudPark Dashboard (Settings > Store Integration). Ask the parking lot, or look it up with your token at GET /storeintegrationlist.
Can I create or change the discount tiers through the API?
No. The tiers and the usage rules belong to the parking lot and are kept in the CloudPark Dashboard. Through the API you can only look them up.
The store has two kinds of discount (e.g. purchase and bill payment). What do I do?
The parking lot creates one store integration for each kind, each with its own integration_id. Your system sends the integration_id that matches the type of operation.
The discount "stopped working" for some customers. Is it a bug?
Check the message in the response. The parking lot may have set a deadline to validate after entering; once it has passed, the API refuses with 400 and explains why. If the response is 200 with minutes_to_exit 0, it may be the occupancy limit: above it, the ticket is priced with another price table and the customer pays the difference at the parking lot.
Should I use the ticket number or the QR Code?
Either one: use whatever your reader captures, but send only one of the two. The number is the one in the barcode printed on the ticket. The QR Code must be sent in full, exactly as read.
Try it on the sandbox
Send the real request to the sandbox and see the response right here. Pick a test scenario or edit the fields; the test token is already filled in.
/api/v1/integration/storevalidation
Same call in cURL
/api/v1/integration/storeintegrationlist
Same call in cURL
/api/v1/integration/storeintegration/{id}
Same call in cURL