Skip to content

Update DeCA

This endpoint updates an existing DeCA, regenerates its PDF, and overwrites the associated blob without changing its public URL. It does not resend notifications automatically.

Call

curl -X https://decatest.solmicrosdh.com/api/control-documents/{id} \
--request PUT \
--cert /ruta/al/certificado.pfx \
--cert-type P12 \
--pass mypfxpassword \
-H "Content-Type: application/json" \
-H "CompanyId: guid-unico-empresa" \
-d '{
  "contractualCharger": {
    "businessName": "string",
    "taxIdentificationNumber": "string",
    "address": "string"
  },
  "actualCarrier": {
    "businessName": "string",
    "taxIdentificationNumber": "string"
  },
  "shipments": [
    {
      "origin": "string",
      "destination": "string",
      "goodsNature": "string",
      "packageCount": integer,
      "weightKg": decimal,
      "alternativeMagnitude": "string"
    }
  ],
  "vehicle": {
    "licensePlate": "string",
    "tractorLicensePlate": "string",
    "semitrailerLicensePlate": "string",
    "vehicleChange": "string"
  },
  "transportDate": "date",
  "specialCirculationPermit": "string",
  "remarks": "string",
  "logo": "string"
}'

Path parameters

Parameter Data type Required Descripción
id guid Yes DeCA identifier to update

Request fields

Property Data type Required Description
DeCAObject DeCA Yes DeCA data

Notes:

Result

On success, returns 200 OK with the updated DeCA.

{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "contractualCharger": {
    "businessName": "string",
    "taxIdentificationNumber": "string",
    "address": "string"
  },
  "actualCarrier": {
    "businessName": "string",
    "taxIdentificationNumber": "string"
  },
  "shipments": [
    {
      "origin": "string",
      "destination": "string",
      "goodsNature": "string",
      "packageCount": integer,
      "weightKg": decimal
    }
  ],
  "vehicle": {
    "licensePlate": "string"
  },
  "specialCirculationPermit": "string",
  "transportDate": "date",
  "remarks": "string",
  "createdAt": "datetime",
  "pdfUrl": "https://<storage>/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.pdf"
}

Response fields

Property Data type Description
id guid Unique DeCA identifier
pdfUrl string Public URL of the generated PDF
DeCAObject DeCA DeCA data