Skip to content

Process Pre-Alert β€” Chile πŸ‡¨πŸ‡± ​

Country-specific rules. Auth, routing (air/ground), request shape, the completeness contract, and the error envelope are the same for every country β€” see the main endpoint page: Process Pre-Alert (JSON). This page covers only what's specific to Chile.

A manifest is routed to Chile when its destination resolves to CL (destination_airport: "SCL" for air, or destination_country: "CL" for ground) and CL is in your allowed_countries.

Required fields (Chile) ​

On top of the shared required fields, Chile needs:

FieldRule
consignee_rutChilean RUT, validated (mod-11). Format like 12.345.678-5 or 12345678-5. Foreign IDs: use the passport sentinel agreed with ops.
weight_kg, fob_usd, freight_usdMust be > 0 (all three).
iva_overrideRequired β€” an explicit true or false. States whether IVA was prepaid for this guide and selects the duty-calc branch below. null or omitted is rejected with field_empty.
internal_numberRequired β€” bigbox / grouping reference.
order_created_atRequired β€” ISO 8601 purchase date (when the customer placed the order, not when you sent the manifest). Persisted to guides.order_created_at.

These three are Chile-only. AR and PE may send them as null. See the 2026-08 alignment.

Optional but consequential (Chile) ​

Not required by the contract, but they change what Chile declares and charges:

FieldIf omitted
insurance_usdCIF is computed with insurance 0, so ad-valorem and IVA come out lower. Send the real figure.
shipper_name, shipper_address, shipper_city, shipper_countryThe guide is created without a sender. The shipper is what Chile declares to Atrex, so the export line goes out incomplete.

An invalid RUT does not reject the manifest β€” the guide is still created and flagged as a warning (rut_invalid_format) for manual review.

Request example (Chile) ​

bash
curl -X POST https://api.logirai.com/api/manifests/process-pre-alert-json \
  -H "Authorization: Bearer $API_PASSWORD" \
  -H "Content-Type: application/json" \
  -d @body-cl.json
json
{
  "mawbNumber": "160-12345678",
  "transportMode": "air",
  "flightData": {
    "flight_number": "LA801",
    "origin_airport": "PVG",
    "destination_airport": "SCL",
    "origin_country": "CN",
    "scheduled_departure": "2026-06-10T02:00:00+08:00",
    "scheduled_arrival": "2026-06-10T14:00:00-03:00"
  },
  "dispatcherDocument": null,
  "cargoReference": null,
  "licensePlate": null,
  "guideRows": [
    {
      "hawb": "CL-AWB-001",
      "consignee_name": "Juan PΓ©rez",
      "consignee_rut": "12.345.678-5",
      "consignee_address": "Av. Apoquindo 4500, Of. 1201",
      "consignee_city": "Las Condes",
      "consignee_state": "RM",
      "consignee_zip_code": "7550000",
      "consignee_phone": "+56912345678",
      "consignee_email": "juan.perez@example.cl",
      "consignee_country": "CL",
      "shipper_name": "Shanghai Trading Co.",
      "shipper_address": "123 Nanjing Road",
      "shipper_city": "Shanghai",
      "shipper_country": "CN",
      "packages_count": 1,
      "weight_kg": 2.4,
      "description_original": "Wireless bluetooth earphones",
      "hs_code": "8518.30.0000",
      "fob_usd": 49.9,
      "product_value": 49.9,
      "freight_usd": 8.5,
      "insurance_usd": 1.0,
      "currency": "USD",
      "order_created_at": "2026-06-01T14:30:00-04:00",
      "internal_number": "BBX-001",
      "iva_override": false,
      "extra_data": {}
    }
  ]
}

Customs classification (IVA) ​

Each guide gets a customs_status computed from fob_usd, whether your company is IVA-registered, whether the RUT is a company, the origin country, and iva_override. These are the standard Chilean IVA status codes used across the platform.

Duties ​

For fob_usd ≀ US$3,000:

ad_valorem = CIF Γ— 6%
IVA        = (CIF + ad_valorem) Γ— 19%      (or CIF Γ— 19% if iva_override = true)
estimated_duties = ad_valorem + IVA
CIF = fob_usd + freight_usd + insurance_usd    (a missing insurance_usd counts as 0)

fob_usd > 3,000 β†’ no duties computed here (handled by the operator under the Couriers tramo-2 process).

Other behavior ​

  • Description translation. Each description_original is translated (bulk) for customs. Non-fatal β€” if translation is unavailable the guide is still created and translated later.
  • Multi-product. When a guide uses products[], the translated source is the joined product descriptions; the Atrex line then truncates to 40 chars, so with many products only the leading items appear in the customs description. Atrex has no hs_code column, so the multi-code hs_code is irrelevant for CL.
  • Bigbox grouping. Guides are grouped by internal_number into bigboxes after insert.

Response (Chile) ​

201 Created:

json
{
  "success": true,
  "guides_created": 2,
  "guides": [{ "hawb": "CL-AWB-001", "tracking_code": "CN-A1B2C3" }],
  "flight_id": "uuid",
  "transport_mode": "air",
  "parser_used": "json",
  "rut_invalid_count": 0,
  "errors": [],
  "warnings": []
}
FieldMeaning
rut_invalid_countGuides whose RUT failed validation (still created, flagged).
warnings[]Per-guide notes, e.g. rut_invalid_format.

LogirAI β€” Cross-Border Logistics API for Retailers and Marketplaces