Reference

The API our own app runs on.

REST over JSON. Below is authentication and one worked example of issuing a document - enough to work out how long an integration takes. The full reference, route by route, lives inside the platform once you have signed in. Delivery notes that arrive by email are issued through this same API.

Authentication

A dispatch system presents its key in x-api-key. The key belongs to one customer and can only act on that customer: the tenant never travels in the body or the URL, because the caller writes both.

A person presents a token from their own directory in Authorization: Bearer. What they may do is decided by the role their administrator granted, never by a claim in the token.

Security and limits

HTTPS only, with TLS 1.2 or later. Every request first passes a web application firewall with the OWASP rule set and bot protection, which refuses more than 600 requests a minute from one address.

Each key has its own allowance per minute, set by the edition contracted: from 60 to 420 requests. Past it the answer is 429, with Retry-After and the RateLimit-* headers saying when to try again.

One key per dispatch system, kept as a secret and revoked from the platform as soon as it is no longer used. It is shown once, and we keep only its hash.

To report a vulnerability, follow our disclosure policy.

Issue a document

The one call that covers 90% of integrations. It returns the identifier, the public URL and the hash of the published PDF.

curl -X POST https://api.deca2u.com/v1/documents \
  -H "x-api-key: $DECA2U_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "siteId": "V204",
    "externalRef": "V204-40712",
    "data": {
      "contractualShipper": {
        "name": "Conservas Bahía Norte, S.L.",
        "taxId": "B36742180",
        "address": "Rúa do Porto 22, 36202 Vigo"
      },
      "effectiveCarrier": { "name": "Transportes Vega Hermanos, S.L.", "taxId": "B99001122" },
      "location": { "origin": "Centro logístico de Vigo", "destination": "Plataforma de Getafe" },
      "goods": [{ "description": "Conserva vegetal en lata", "quantity": 12400, "unit": "kg" }],
      "transportDate": "2026-07-15",
      "vehicle": { "tractorPlate": "1234ABC", "articulated": false }
    }
  }'

201 response:

{
  "id": "8h86UiouAH2eZwOrS4di1Q",
  "url": "https://doc.deca2u.com/yQRjIVKxGsA4SqJoZDn_hw/8h86UiouAH2eZwOrS4di1Q.pdf",
  "publishedAt": "2026-07-15T06:31:02.144Z",
  "publicUntil": "2026-07-22T23:59:59.000Z",
  "pdfHash": "9f2c…",
  "qr": "<svg xmlns=…>",          // only with ?qr=1
  "externalRef": "V204-40712"
}

If the consignment already had a document, it answers 200 with alreadyIssuedAs and the existing URL. It does not issue a second one.

If a required letter is missing, a value breaks its rule or a self-employed driver has to be decided, it answers 202 and publishes nothing. The call waits for somebody in your company to complete it on the platform. held gives the reason, and the Location header where to read what became of it. If you send the consignment again complete, it is issued.

A driver the platform cannot use never stops the DeCA: it is issued all the same, and the answer says so in driverNotUsed, with the reason.

What only your system can fix is refused: 400 if the call does not have the contract's shape, 422 if the site, the shipper or the date will not do.

The rest - correcting, reissuing, the customer's own catalogues, identifier blocks for a site with no line - is documented route by route inside the platform, under Administration, for whoever already has an account.