CloudPark CloudPark Integration API

CloudPark calls your system

Customer Sync

Every day at around 3 a.m., the parking lot local server fetches the customer list from a URL in your system and updates its records.

What it is for

Your system already controls who may use the parking lot (club members, employees, residents) and you do not want to call an API on every change. In that case, you publish a URL with the customer list and CloudPark fetches that list every day, at around 3 a.m. (parking lot time), creating the new customers and updating the existing ones.

Do you need a change to take effect right away (e.g. block a customer now)? Use the Customers API, which has the same fields. To decide access at the moment of entry, see Access Authorization.

How to set it up

  1. Publish the URL. It must answer a GET with the list in the format below.
  2. Define the authentication (optional). Choose an HTTP header name and a value; CloudPark sends this header on every call. The value cannot contain the : character (colon); with it, the sync fails before it starts.
  3. Send the details to CloudPark support: the URL, the authentication header and value and, if you want, the plan customers receive when the list does not specify one.

The call CloudPark makes

GET https://seu-sistema.com.br/clientes-estacionamento
Authorization: Token 3dbde8c0dasbc25f39f18d2badf86ac2480c3b4dwr

The authentication header is the one you agreed on (name and value). Without authentication, the call is sent with no header.

Response format

Respond 200 with a JSON containing the clientes (customers) list:

{
  "clientes": [
    {
      "id": 22977,
      "nome": "João",
      "sobrenome": "Silva",
      "bloqueado": false,
      "plano": "Associado",
      "veiculos": [
        {"tag": "893345852209", "placa": "ABC2357"},
        {"tag": "339821287058", "placa": "AAA1234"}
      ]
    }
  ]
}
FieldTypeDescription
idrequired integer Customer code in your system. CloudPark uses the same code: if it already exists, it updates; otherwise, it creates.
nomerequired string First name.
sobrenomerequired string Last name.
bloqueadorequired boolean Blocked: true blocks the customer's access.
veiculosrequired list Vehicles: placa (license plate) and tag (card or tag number), both required in each vehicle: send "" when there is none. Without one of them, that customer fails. A customer with an empty list is ignored (no error); without the field, the sync stops at that customer. The list replaces the customer's current vehicles.
planooptional string Exact name of one of the parking lot's plans (or plano_id, with the code). Without a plan, the default plan agreed with support applies, if any.
email / phoneoptional string Email and phone number.

The rules for each field and for applying the plan are the same as in creating a customer through the API. In practice, the plan is usually a daily plan with no amount, set up by the parking lot.

Things to watch out for

  • Customers removed from your list are not deleted or blocked at CloudPark. To revoke access, keep the customer on the list with "bloqueado": true.
  • The sync is daily: a change made at 10 a.m. only takes effect at CloudPark the following night.
  • Your URL must be reachable from the internet and respond within a few seconds, even with many customers.

FAQ

Can I test on the sandbox?

No: here it is CloudPark that makes the call. Check your response format against the examples on this page and, if you like, create a test customer through the Customers API on the sandbox to check the fields.

Can it run at another time or more than once a day?

No, the sync runs once a day. For immediate updates, use the Customers API.