CloudPark CloudPark Integration API

Developer documentation

Getting started

Authentication, environments (sandbox and production), message format and error handling. Start here.

How it works

The CloudPark API is a REST API: your system makes HTTP requests and receives JSON responses. All integrations follow the same authentication, format and error rules, explained on this page. Then open the guide for the integration you are going to use.

Test on the sandboxUse the public test token and the sample data in each guide.
Ask for activationCloudPark support enables the integration module at the parking lot.
Get the token and the addressEach parking lot has its own token and URL.
Switch the URL and the tokenThe rest of the integration stays exactly as you tested it.

Environments

Sandbox (testing)

A public test environment that simulates a parking lot. It responds with the same formats as production and has sample tickets, customers and QR Codes for each scenario (success, ticket not found, ticket that has already left, etc.). The list is in the Test data section of each guide.

FieldTypeDescription
Base URL string https://sandbox.cloudpark.com.br
Token string Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

Production

Each parking lot has its own address and its own token. To get them, the parking lot must have the integration module contracted; then ask CloudPark support for:

  • the parking lot's production token;
  • the parking lot's address (see below which one to use);
  • the configuration codes the integration uses, such as integration_id (Store Integration) and contract_id (Ticket Validation). The parking lot sets them up in the CloudPark Dashboard.

The parking lot can be reached at two addresses. The API and the responses are the same on both:

AddressExampleWhen to use
Local (parking lot server)http://192.168.0.10Recommended when your system is on the same network as the parking lot (e.g. the POS of a store in the mall). It does not depend on the internet and the effect on the kiosks is immediate. Use HTTP.
Cloudhttps://1234.cloudpark.com.brWhen your system is outside the parking lot's network. Use HTTPS. The data reaches the kiosks through synchronization, which may take a few minutes.

Authentication

Every call carries the token in the HTTP Authorization header, prefixed by the word Token and a space:

Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

Without the header, or with an invalid token, the API responds 401:

{"detail": "As credenciais de autenticação não foram fornecidas."}

First call

This example validates a ticket on the sandbox Store Integration. Copy it and run it in your terminal:

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

BASE_URL = "https://sandbox.cloudpark.com.br/api/v1/integration"
HEADERS = {"Authorization": "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"}

response = requests.post(
    f"{BASE_URL}/storevalidation",
    json={"integration_id": "135745217", "id": 400045265, "purchase_value": 80.0},
    headers=HEADERS,
    timeout=15,
)
print(response.status_code, response.json())
const BASE_URL = "https://sandbox.cloudpark.com.br/api/v1/integration";

const response = await fetch(`${BASE_URL}/storevalidation`, {
  method: "POST",
  headers: {
    "Authorization": "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ integration_id: "135745217", id: 400045265, purchase_value: 80.0 }),
});
console.log(response.status, await response.json());

Expected response:

{
  "expiration_date": "2026-11-23T18:42:10.512345Z",
  "minutes_to_exit": 15,
  "message": "Validado com sucesso"
}

Message format

  • Send the body of POST requests as JSON, with the Content-Type: application/json header.
  • Text is UTF-8. Response messages are in Portuguese.
  • Numbers are sent as JSON numbers, without quotes: 15.35, not "15,35". Amounts in reais (R$) use a dot as the decimal separator.
  • Dates and times in responses come in UTC, in ISO-8601 format ending in Z (e.g. 2026-11-23T18:42:10Z or, with fractions of a second, 2026-11-23T18:42:10.512345Z). Convert them to local time before showing them to the customer: 18:42:10Z is 15:42:10 in Brasília time. Parse them with a date library instead of slicing the text. The date fields you send use the format given in each guide.
  • IDs of CloudPark records can be large numbers. See Large IDs.
TypeExample
integer20
number (decimal)10.50
string"ABC1234"
booleantrue / false
string (numeric ID)"721458963214587937"

Large IDs

The IDs of records created by CloudPark (contract, store integration, plan, customer) are integers with up to 19 digits, such as 721458963214587937. These numbers exceed what JavaScript (and other languages that use floating point) can hold without error: JSON.parse turns 721458963214587937 into 721458963214587900, and the next call uses an ID that does not exist.

  • When sending: send the fields marked as string (numeric ID) as JSON strings, in quotes: "contract_id": "721458963214587937". The API accepts the ID as a string in these fields.
  • When reading: some IDs come as numbers in the responses (e.g. id in GET /customer, customer_id in /prepaid, contract in GET /customerplan). Store them as strings in your system. In JavaScript, do not use the default JSON.parse to read these responses: use a library that preserves large integers, such as json-bigint (JSONbig({ storeAsString: true }).parse(await response.text())). In Python, the standard json module already reads these numbers without loss.

Errors

The API uses the HTTP status code to tell whether the call succeeded. 2xx responses are success; in the others, the reason comes in the message field (or detail, for authentication and query parameter errors).

HTTPWhen it happensResponse
200 Success. Some APIs add notes in the message field (e.g. ticket already validated).
201 Record created (new customer registration).
400 Business rule or data error: missing field, invalid value, ticket that has already left the parking lot, etc. {"message": "Motivo do erro"}
401 Token missing or invalid. {"detail": "Token inválido."}
403 The token is not allowed to perform this operation, or the feature is not enabled at the parking lot. {"detail": "..."}
404 Record not found (ticket, contract, customer). {"message": "Código 323054 não encontrado"}
409 The lookup found more than one record (e.g. two customers with the same license plate). {"message": "..."}
500 Unexpected error at the parking lot. Try again; if it persists, contact support.

Besides the errors documented in each guide, production has situations the sandbox does not simulate (parking lot settings, usage limits, etc.). They follow the same pattern: 400 with the reason in message.

Best practices

  • Timeout: use 15 to 30 seconds. The parking lot server may be under load at peak times.
  • Retries: do not repeat a call that writes data (validation, top-up, customer record) just because the response did not arrive. Some operations record everything again on each call. Look up first and follow the guidance in each integration's guide.
  • Logs: record the request, the HTTP code and the response body. That is what support will ask for to analyze a case.
  • Show the message: when an error happens, show the message field to the operator. It explains what happened (e.g. "O movimento com o código 123 já foi dado saída", meaning the ticket has already exited).

Glossary

TermMeaning
Ticket / movementA vehicle's stay at the parking lot, from entrance to exit. The ticket number is printed on the paper ticket (barcode) or in the QR Code.
Validate the ticketReport that the parking fee was paid or waived, releasing the exit until a deadline (expiration_date).
Discount / stampFree time granted to the ticket (e.g. 2 free hours).
ContractThe parking lot's price table. Ticket Validation uses a contract to calculate how much the customer owes.
Customer / registered customerA person registered at the parking lot (monthly, prepaid, daily), with their vehicles (license plate) and cards (tag).
PlanThe customer's billing rule: monthly, daily, prepaid, stay, etc.
CloudPark DashboardThe parking lot management system, where the records and the integration settings are kept.

Next steps

Choose the integration in the side menu or on the home page. Each guide has the complete flow, the fields, the possible responses, the test data and a console to call the sandbox from your browser.