> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# SmartFreight

> Rate calculations, consignment management, tracking, and delivery options via SOAP API.

The SmartFreight connector lets your workflows calculate shipping rates, create and manage consignments, compare carrier costs, and track deliveries through SmartFreight's SOAP API.

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Connection setup

**1. Get your API credentials**

Contact SmartFreight support or log in to your SmartFreight account to obtain your **API ID**, **API Password**, and **WSDL endpoint URL**.

**2. Add the connection in Condotta**

Go to **Connections** in Condotta, click **Add Connection**, select **SmartFreight**, and enter:

* **WSDL Endpoint**: Your SmartFreight SOAP endpoint. SmartFreight exposes
  operations on **per-operation "online" endpoints** (e.g. delivery options
  at `https://api-<region>.smartfreight.com/api/soap/deliveryoptions?wsdl`)
  as well as a combined **"classic"** endpoint
  (`.../api/soap/classic?wsdl`). Use the endpoint that serves the operation
  your workflow calls; a connection pointed at `deliveryoptions` can only
  run `get-delivery-options`. Your API ID and password are appended to this
  URL by SmartFreight for WSDL retrieval.
* **API ID**: Your SmartFreight API identifier
* **API Password**: Your SmartFreight API password

> [!NOTE]
>
> Authentication is sent in the SOAP body (`id` / `passwd`) on every call; the
> connector reads the target namespace and SOAPAction from your configured
> WSDL, so both the "classic" and "online" endpoints work.

## Tools

### Rate & Delivery

> [accordion] calculate-rate: Calculate shipping rate for a consignment
>
> **consignment** `object` *required*
>
> Consignment data (connote fields) including receiver details, carrier, and freight line items.
>
> `calculate-rate` returns the cost for **one specific carrier + service**
> (set `carriername` and `service`). Unlike `get-delivery-options` it does
> not resolve a default sender (provide `sendaddr`) and does not derive cube
> from dimensions (provide `cube`).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "consignment": {
>     "carriername": "FRT SPECIALISTS",
>     "service": "PARCEL",
>     "accno": "123456",
>     "recaccno": "TEST",
>     "recname": "TEST RECEIVER",
>     "recaddr": { "add1": "100 George Street", "add3": "KINGSFORD", "add4": "NSW", "add5": "2032" },
>     "sendname": "TEST SENDER",
>     "sendaddr": { "add3": "RHODES", "add4": "NSW", "add5": "2138" },
>     "freightlinedetails": [
>       { "ref": "13011208", "amt": 1, "youritemdesc": "A00001", "desc": "CARTON", "wgt": 1, "cube": 0.1 }
>     ]
>   }
> }
> ```
>
> **Example response (parsed from SOAP XML):** `CalculateRateResult` parses to
> a `Connote` object with the full costing breakdown (abridged below —
> the real response also includes `co2kg`, `gstamount`, `grandtotrate`,
> `marginperc`, `weightedkm`, etc.).
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "CalculateRateResult": {
>       "Connote": {
>         "accno": "123456",
>         "carriername": "FRT SPECIALISTS",
>         "carrzone": "SYDNEY",
>         "condate": "29/09/2020",
>         "currency": "AUD",
>         "estdelivery": "30/09/2020 5:00 PM",
>         "service": "PARCEL",
>         "totalcost": "4.18",
>         "totcube": "0.1",
>         "totwgt": "1",
>         "recname": "TEST RECEIVER",
>         "recaddr": { "add1": "100 GEORGE STREET", "add3": "KINGSFORD", "add4": "NSW", "add5": "2032", "add6": "AUSTRALIA" },
>         "sendname": "TEST SENDER",
>         "freightlinedetails": { "ref": "13011208", "amt": 1, "desc": "CARTON", "wgt": 1, "cube": 0.1, "youritemdesc": "A00001" }
>       }
>     }
>   }
> }
> ```

> [accordion] get-delivery-options: Get available delivery options
>
> **consignment** `object` *required*
>
> Consignment data with receiver address and freight details.
>
> Set `carriername` to `[Automatic]`, `[Cheapest]`, or `[Fastest]` to let
> SmartFreight choose. The sender can be given explicitly (`sendaddr`) or by
> account (`sendaccno` + `matchsendertoaccountno`). Freight-line dimensions
> (`len`/`wdt`/`hgt`) are optional; `cube` (m³) is used when they're omitted.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "consignment": {
>     "sendaccno": "TEST",
>     "sendname": "Test Sender",
>     "sendaddr": {
>       "add1": "1 Sender Street",
>       "add3": "Manchester",
>       "add4": "Manchester",
>       "add5": "M22 4UG",
>       "add6": "UNITED KINGDOM"
>     },
>     "recaddr": {
>       "add1": "221B Baker Street",
>       "add3": "London",
>       "add4": "London",
>       "add5": "NW1 6XE",
>       "add6": "UNITED KINGDOM"
>     },
>     "carriername": "[Automatic]",
>     "freightlinedetails": [
>       { "ref": "TEST123", "amt": 1, "desc": "CARTON", "wgt": 1.55, "cube": 0.006 },
>       { "ref": "TEST124", "amt": 1, "desc": "CARTON", "wgt": 1.56, "cube": 0.007 }
>     ]
>   }
> }
> ```
>
> **Example response (parsed from SOAP XML):** the `GetDeliveryOptionsResult`
> inner XML parses to `deliveryoptionresults`, with a single `recommended`
> option and an `otheroptions.DeliveryOption` array.
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "GetDeliveryOptionsResult": {
>       "deliveryoptionresults": {
>         "recommended": {
>           "DeliveryOption": {
>             "accno": "123456",
>             "carriername": "TEST CARRIER1",
>             "carrzone": "ZONE 1",
>             "condate": "22/07/2020",
>             "datelong": "20200722",
>             "fromzone": "ZONE 1",
>             "optionid": "NDowOjA6LTE6MzIsMzI=",
>             "primarypricing": "13.18",
>             "secondarypricing": "2.64",
>             "service": "NEXT DAY"
>           }
>         },
>         "otheroptions": {
>           "DeliveryOption": [
>             {
>               "accno": "789456",
>               "carriername": "TEST CARRIER2",
>               "carrzone": "ZONE 1",
>               "condate": "22/07/2020",
>               "datelong": "20200722",
>               "fromzone": "ZONE 1",
>               "optionid": "NTowOjA6LTE6MzIsMzI=",
>               "primarypricing": "13.80",
>               "secondarypricing": "2.76",
>               "service": "NEXT DAY"
>             }
>           ]
>         },
>         "distance": "",
>         "istopobox": "False",
>         "selectedtype": "cost"
>       }
>     }
>   }
> }
> ```

### Consignment Management

> [accordion] import-consignment: Create a new consignment
>
> **consignment** `object` *required*
>
> Full consignment data including sender, receiver, carrier, and freight details.
>
> Set `carriername` to `[Automatic]`/`[Cheapest]`/`[Fastest]` or a specific
> carrier. If any submitted value is invalid the returned `Connote` carries a
> `HasError="True"` attribute.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "consignment": {
>     "condate": "27/12/2018",
>     "recaccno": "TEST",
>     "recname": "Test Receiver",
>     "recph": "02 8888 8888",
>     "reccontact": "Warehouse Manager",
>     "recemail": "test@test.com",
>     "recaddr": {
>       "add1": "Level 10",
>       "add2": "100 George Street",
>       "add3": "SANDRINGHAM",
>       "add4": "NSW",
>       "add5": "2219",
>       "add6": "AUSTRALIA"
>     },
>     "carriername": "[Automatic]",
>     "spins": { "Sp1": "Special Instruction 1" },
>     "freightlinedetails": [
>       { "ref": "201545632", "desc": "CARTON", "amt": 1, "wgt": 2, "len": 27, "hgt": 2, "wdt": 14 },
>       { "ref": "201545632", "desc": "CARTON", "amt": 1, "wgt": 5, "len": 30, "hgt": 10, "wdt": 20 }
>     ]
>   }
> }
> ```
>
> **Example response (parsed from SOAP XML):** `ImportResult` parses to a
> `Connote` object echoing the request plus generated fields — consignment
> number (`conno`/`connotenumber`), `allocatedconid`, `labels[].labelno_tracking`,
> chosen `carriername`/`service`, and full costing. Abridged:
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "ImportResult": {
>       "Connote": {
>         "accno": "1234",
>         "allocatedconid": "FDD75F65-5CF5-48C8-8E20-D2916A562860",
>         "carriername": "TEST CARRIER1",
>         "conno": "XRL10220",
>         "connotenumber": "XRL10220",
>         "condate": "27/12/2018",
>         "service": "EXPRESS",
>         "estdelivery": "30/12/2018 5:00 PM",
>         "totalcost": "11.20000000",
>         "totwgt": "7.000",
>         "totcube": "0.00676",
>         "newcon": "true",
>         "identification": { "conid": "FDD75F65-5CF5-48C8-8E20-D2916A562860" },
>         "labels": [
>           { "labelno_tracking": "XRL10220001" },
>           { "labelno_tracking": "XRL10220002" }
>         ],
>         "recname": "TEST RECEIVER",
>         "recaddr": { "add1": "LEVEL 10", "add3": "SANDRINGHAM", "add4": "NSW", "add5": "2219", "add6": "AUSTRALIA" },
>         "freightlinedetails": [
>           { "ref": "201545632", "amt": 1, "desc": "SATCHEL", "wgt": "2.000", "len": 27, "hgt": 2, "wdt": 14, "cube": "0.00076" },
>           { "ref": "201545632", "amt": 1, "desc": "SATCHEL", "wgt": "5.000", "len": 30, "hgt": 10, "wdt": 20, "cube": "0.00600" }
>         ]
>       }
>     }
>   }
> }
> ```

> [accordion] find-consignment: Search for consignments
>
> **xmlfield** `string` *required*
>
> Consignment field name to search (e.g., `recaccno`, `recname`).
>
> **fieldvalue** `string`
>
> Value to search for.
>
> Returns the SmartFreight internal consignment id(s) matching a single
> field/value. Feed these ids into `get-consignment`, `update-consignment`,
> `delete-consignment`, or `tracking-events`. Only one `xmlfield`/`fieldvalue`
> pair is accepted per call; wildcards are not supported.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "xmlfield": "ref",
>   "fieldvalue": "10002-1"
> }
> ```
>
> **Example response (parsed from SOAP XML):** `FindConResult` holds an array
> of con-id strings (may be multiple).
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "FindConResult": {
>       "string": [
>         "6E0FE568-A0DA-48C1-98DE-0B53AC24251D",
>         "EDD0B989-7750-4CD3-BBE3-ECA0130C4B7B",
>         "F7E9C511-5A09-4B86-ACDB-542394E925C4"
>       ]
>     }
>   }
> }
> ```

> [accordion] get-consignment: Get consignment details by ID
>
> **conid** `string` *required*
>
> SmartFreight consignment ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "conid": "987654"
> }
> ```
>
> **Example response (parsed from SOAP XML):** `EnquiryResult` parses to a
> full `Connote` object — the same Consignment Message returned by
> `import-consignment` (consignment number, carrier/service, addresses,
> freight lines, labels, and full costing). Abridged:
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "EnquiryResult": {
>       "Connote": {
>         "accno": "1234",
>         "conno": "XRL10220",
>         "connotenumber": "XRL10220",
>         "carriername": "TEST CARRIER1",
>         "service": "EXPRESS",
>         "condate": "27/12/2018",
>         "estdelivery": "30/12/2018 5:00 PM",
>         "totalcost": "11.20000000",
>         "totwgt": "7.000",
>         "identification": { "conid": "FDD75F65-5CF5-48C8-8E20-D2916A562860" },
>         "recname": "TEST RECEIVER",
>         "recaddr": { "add1": "LEVEL 10", "add3": "SANDRINGHAM", "add4": "NSW", "add5": "2219", "add6": "AUSTRALIA" },
>         "freightlinedetails": [
>           { "ref": "201545632", "amt": 1, "desc": "CARTON", "wgt": "2.000", "cube": "0.00076" }
>         ]
>       }
>     }
>   }
> }
> ```

> [accordion] delete-consignment: Delete a consignment
>
> **conid** `string` *required*
>
> SmartFreight consignment ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "conid": "987654"
> }
> ```
>
> A successful delete does not remove the row — the returned `Connote` carries
> `connotedeleted: "Y"`. Only un-manifested consignments can be deleted.
>
> **Example response (parsed from SOAP XML):**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "DeleteConResult": {
>       "Connote": {
>         "conno": "XRL10217",
>         "connotedeleted": "Y",
>         "carriername": "TEST CARRIER2",
>         "service": "EXP 24",
>         "totalcost": "33.3",
>         "identification": [
>           { "conid": "EDD0B989-7750-4CD3-BBE3-ECA0130C4B7B" },
>           { "conid": "F7E9C511-5A09-4B86-ACDB-542394E925C4" }
>         ],
>         "recname": "TEST RECEIVER"
>       }
>     }
>   }
> }
> ```

> [accordion] update-consignment: Update consignment-level fields
>
> **conid** `string` *required*
>
> SmartFreight internal consignment ID (from `find-consignment`).
>
> **consignment** `object` *required*
>
> **Partial** consignment data — only the fields to change. To edit
> freight-line-level data use the freight-line update flow instead.
>
> Only un-manifested consignments can be updated. If the update fails
> validation the consignment is not saved and the errors are returned.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "conid": "E8D00FD7-9BAD-4067-9025-7F6E446FFE31",
>   "consignment": {
>     "labeltype": "X",
>     "pendingconnote": "No"
>   }
> }
> ```
>
> **Example response (parsed from SOAP XML):** `UpdateConResult` returns the
> updated `Connote` (same Consignment Message shape as `import-consignment`).

> [accordion] print-labels: Print consignment labels
>
> **importcode** `string` *required*
>
> How `reference` is interpreted: `conid`, `connote`, `fldref`, a Named
> Reference code, or `[default]`.
>
> **reference** `string` *required*
>
> The value that identifies the consignment / freight line. Must resolve to
> a single consignment.
>
> **items** `string` *required*
>
> Which labels to print: `[all]`, `[line]`, `[line:X]`, or `[item:X]`.
>
> **printConfig** `string` *required*
>
> Printer Configuration code defined in SmartFreight. If it points at a PDF
> printer, the label PDF is returned as base64 in `printjob.data` instead of
> being sent to a physical printer.
>
> Only active (un-manifested) consignments can be printed.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "importcode": "fldref",
>   "reference": "REF20221114-001",
>   "items": "[line]",
>   "printConfig": "PRINTER ABC"
> }
> ```
>
> **Example response — sent to a physical printer:**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "PrintLabelsResult": {
>       "printjob": { "message": "print job sent to printer", "status": "success" }
>     }
>   }
> }
> ```
>
> **Example response — PDF printer (base64 PDF in `data`):**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "PrintLabelsResult": {
>       "printjob": {
>         "data": "JVBERi0xLjQKJeLjz9MK…(base64 PDF)…",
>         "message": "print job attached to data",
>         "status": "success"
>       }
>     }
>   }
> }
> ```

### Tracking

> [accordion] tracking-events: Get tracking events for a consignment
>
> **conid** `string` *required*
>
> SmartFreight consignment ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "conid": "987654"
> }
> ```
>
> Intended for **on-demand** use only — polling may breach SmartFreight's
> Acceptable Usage Policy.
>
> **Example response (parsed from SOAP XML):** `TrackingEventsResult` parses to
> a `TrackingEvents` object with overall `Statistics.Status` and an
> `Events.Event` array.
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "TrackingEventsResult": {
>       "TrackingEvents": {
>         "Statistics": {
>           "Status": "Delivered On Time",
>           "TrackStart": "2018-07-23 17:27:00 +09:30",
>           "ActualDelTime": "18.55",
>           "Enabled": "True"
>         },
>         "Events": {
>           "Event": [
>             { "Labelno": "CPA3P7T1001844", "Carrier": "COURIERS PLS II", "Event": "Pickup Scan", "Timestamp": "2018-07-23 16:32:00 +09:30", "Location": "", "Text": "" },
>             { "Labelno": "CPA3P7T1001844", "Carrier": "COURIERS PLS II", "Event": "Manifested", "Timestamp": "2018-07-23 17:27:00 +09:30", "Location": "", "Text": "" },
>             { "Labelno": "CPA3P7T1001844", "Carrier": "COURIERS PLS II", "Event": "Delivered", "Timestamp": "2018-07-24 12:00:00 +09:30", "Location": "", "Text": "SIGNED: Scan on file" }
>           ]
>         }
>       }
>     }
>   }
> }
> ```

### Advanced

> [accordion] raw-soap-request: Execute an arbitrary SOAP operation
>
> Send a raw SOAP request to any SmartFreight API operation. API credentials are injected automatically.
>
> **operation** `string` *required*
>
> SOAP operation name (e.g., `CalculateRate`, `Import`).
>
> **body** `object`
>
> Request body parameters as key-value pairs.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "operation": "Enquiry",
>   "body": {
>     "conid": "987654"
>   }
> }
> ```
>
> **Example response (parsed from SOAP XML):**
>
> ```json theme={null}
> {
>   "success": true,
>   "data": {
>     "EnquiryResult": {
>       "connote": {
>         "conid": "987654",
>         "connumber": "TNT123456789",
>         "carriername": "TNT",
>         "status": "Dispatched",
>         "totalcost": "42.30"
>       }
>     }
>   }
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.