CloudPark CloudPark Integration API

Certified integrator

TOTVS Consinco

Integration model: TOTVS POS (native integration) · Full API guide: Store Integration

The TOTVS POS validates the ticket at the end of the sale through its "Parking Ticket" feature. See which URL to enter and what the operator sees.

How it works at the checkout

The TOTVS POS already has the CloudPark integration through the Ticket de Estacionamento no Final da Venda feature (parking ticket at the end of the sale): there is nothing to develop. At the end of the sale, the POS talks to CloudPark in steps and shows each question to the operator:

Question"Cliente deseja validar ticket estacionamento?" (Does the customer want to validate a parking ticket? Sim / Não).
ReadingOn Sim (Yes), the POS asks "Passe o TICKET no Leitor" (scan the ticket) and the operator reads the barcode.
DiscountCloudPark applies the discount according to the sale total and the parking lot's tiers.
ReceiptThe POS prints "TICKET 400045265 LIBERADO ATE: 24/11 - 15:30".

If the ticket is not found, the POS asks whether to read it again. For other errors, it shows the message with an OK button and the sale continues normally.

Set up the POS

Enable the Ticket de Estacionamento no Final da Venda feature as described in the TOTVS documentation and enter the CloudPark service URL:

Service URL
Sandbox (testing)https://sandbox.cloudpark.com.br/api/v1/integration/pdvtotvs
ProductionProvided by CloudPark for each parking lot, in the format https://<parking-lot>.cloudpark.com.br/api/v1/integration/pdvtotvs
  • Authentication: none. The call does not use a token; keep the URL restricted to the store.
  • Network: the POS terminals must reach the URL over HTTPS (port 443).
  • Reader: the ticket field accepts up to 14 characters. Send the code as printed on the ticket, including the final check digit.

The dialog, step by step

This part is handled by the POS; it is a reference for checking the logs. Every call is a JSON POST to the URL above, and the operator's answer goes in the Response field.

StepThe POS sendsCloudPark returns
1. End of the saleEmpty ResponseMessage with the Sim ("1") and Não ("2") buttons.
2. Operator answersResponse = "1", with the sale ID and Sale.TotalRequest to read the ticket (cctGetValue, up to 14 characters). With "2", it ends (cetCompleted).
3. Ticket readResponse = code read, with the same IDReceipt in vouchersPrint and cetCompleted; or an error message.
Step 3 response (discount applied)
{
  "version": 1,
  "execution": "cetCompleted",
  "vouchersPrint": [
    {"text": "          RECIBO TICKET ESTACIONAMENTO \nTICKET 400045265 LIBERADO ATE: 24/11 - 15:30"}
  ]
}

The messages come without accents, because some terminals cannot display them.

Messages shown on the POS

MessageWhat to do
Receipt "TICKET ... LIBERADO ATE" (ticket released until)Nothing: the customer can leave until the printed time.
Codigo X nao encontrado. Deseja tentar novamente? (code not found, try again?)Read the barcode again (Sim) or continue without the discount (Não).
Valor da compra nao da abono ao estacionamento (purchase amount does not qualify for a parking discount)The purchase does not reach the lowest tier. The customer pays for parking normally.
Esse ticket ja foi validado (ticket already validated)The ticket has already received the discount. Reading it again does not apply the discount twice.
Valor pendente, valide no estacionamento (amount pending, validate at the parking lot)The discount does not cover the whole stay; the customer pays the difference at the parking lot's checkout or kiosk.

Test on the sandbox

With the POS pointing to the sandbox, make test sales with these tickets (the sandbox gives a discount for sales from R$ 50.00):

TicketResult with a sale of R$ 50.00 or more
400045265Discount applied; prints the receipt.
379924820"Valor pendente, valide no estacionamento" (amount pending).
384745455"Esse ticket já foi validado" (ticket already validated).
403045263Not found; offers to read it again.

To simulate the POS from the browser, send the scenarios below in order (1, 2 and 3):

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.

POST
POS dialog step/api/v1/integration/pdvtotvs

Going to production

  1. Agree on the discount tiers with the parking lot; CloudPark sets them up.
  2. Ask CloudPark for the parking lot's URL and set it on the POS terminals.
  3. Make a real test sale with a parking ticket and check the discount at the exit kiosk.