Fare Freight Get started

Fare Freight WooCommerce API

Integration guide for WooCommerce stores: live carrier rate quotes for a cart, plus consignment booking, manifesting and document downloads for orders already synced from your WooCommerce store. It runs through the same pipeline as the Fare Freight WooCommerce plugin, so you get the same carrier accounts, margin rules and orders.

Rate API base URLffwooaurate.farefreight.com.au
Shipment API base URLship.farefreight.com.au
Auth headerX-FF-Secret-Key
CredentialsAPI Access, in the merchant portal sidebar
FormatJSON, snake_case
No sandbox environment

Both hosts are live production. A request may call real carrier APIs and is logged against your live account.

Getting started

Generate your keyOpen API Access in the merchant portal sidebar at ship.farefreight.com.au and click Generate (or Rotate). Note the Account ID shown on the same page.
Send a real rate requestThere’s no sandbox, so use a genuine product/address pair from your catalog against production.
Book a consignment on an existing orderUse a real fulfilment_order_id from an order already synced from WooCommerce to Fare Freight.
Handle failuresRetry 500/502 once with backoff, honour Retry-After on 429, and treat 400/401/422 as integration bugs to fix rather than retry unchanged.
Go live

Authentication

Every request carries your account ID in the path and a secret key in the X-FF-Secret-Key header. The same key works on both hosts.

WhereValue
{accountId}Your numeric account ID, shown on the API Access page.
X-FF-Secret-KeyYour account’s secret key. Treat it like a password and never expose it in browser code.

A missing or incorrect key returns 401 with no body. Rotating the key in the portal invalidates the old one immediately.

Rate API

POST/api/public/rate/{accountId}

Returns live shipping quotes for one cart. This is separate from the WooCommerce plugin’s own webhook: it runs the identical rating pipeline but is keyed by account ID and secret key, so it’s safe to give to a third-party integration without handing over plugin credentials.

No 400 on a bad body. A missing or malformed field still returns 200 with an empty rates array, the same as the plugin webhook. Check for an empty array rather than expecting a 400.

rate (top level)

FieldTypeNotes
originrequiredobjectSee below.
destinationrequiredobjectSee below.
itemsrequiredarrayEmpty returns empty rates.
carttotaloptionalnumberCart subtotal. Drives free-shipping, margin-per-postcode and customer-specific rules.
customeremail
username
optionalstringMatched against customer-specific pricing rules, if configured.
currency / localeoptionalstringAccepted; the response currency comes from your account settings.

rate.origin & rate.destination

FieldTypeNotes
postal_coderequiredstringAustralian postcode. Missing on destination silently returns empty rates.
cityrequiredstringSuburb / locality.
provincerecommendedstringNSW, VIC, QLD, WA, SA, TAS, ACT or NT.
countryoptionalstringe.g. AU.
address1
address2
address3
optionalstringStreet address, used by some carriers.
name
company_name
phone / fax / email
optionalstringPassed to carrier consignment details where applicable.
address_typeoptionalstringOverrides the account’s default delivery type.
forkliftoptionalstringDestination only. Forklift-at-destination flag used by some carriers.

rate.items[]

Each item needs either variant_id or product_id. Whichever is non-zero is matched to your Fare Freight catalog, and weight, dimensions and freight class come from there.

FieldTypeNotes
variant_id / product_idrequired (one)integerMust match a product/variant in your catalog. If every item resolves to zero weight, rates come back empty.
quantityrequiredinteger>= 1.
priceoptionalnumberDecimal dollars. Set consistently with carttotal.
sku / name / vendoroptionalstringLogging only.
weight / gramsoptional—Accepted but overridden by the catalog lookup.

Sample request

# request curl -X POST “https://ffwooaurate.farefreight.com.au/api/public/rate/482” \ -H “Content-Type: application/json” \ -H “X-FF-Secret-Key: <your-secret-key>” \ -d @request.json
// request.json { “rate”: { “origin”: { “postal_code”: “2015”, “city”: “Alexandria”, “province”: “NSW”, “country”: “AU”, “address1”: “12 Bourke Road” }, “destination”: { “postal_code”: “3121”, “city”: “Richmond”, “province”: “VIC”, “country”: “AU”, “address1”: “48 Swan Street”, “email”: “jane.citizen@example.com” }, “items”: [ { “variant_id”: 40213897, “product_id”: 40213897, “sku”: “TBL-OAK-120”, “quantity”: 2, “price”: 49.99 } ], “carttotal”: 99.98, “customeremail”: “jane.citizen@example.com”, “currency”: “AUD” } }

200 response

A successful call always returns 200, including when rates is empty. An empty array means no configured carrier could quote this address/cart. Rates are sorted cheapest first.

// 200 { “rates”: [ { “service_name”: “Business Delivery”, “service_code”: “B-FF-NFM-SYD-STD(N,N,N)”, “total_price”: 8420, “currency”: “AUD”, “description”: “Delivered to a business address with a loading dock or forklift.” } ] }

Error responses

StatusMeaningBody
401Missing/incorrect X-FF-Secret-Key, or the account isn’t active.empty
422Your account has no WooCommerce security code configured yet. Contact Fare Freight.{“error”: “…”}
429Rate limit exceeded. Honour the Retry-After header.empty
500Unexpected server error. Safe to retry once with backoff.error JSON

Shipment API

These endpoints book, manifest and download documents for orders already synced from your WooCommerce store into Fare Freight, identified by fulfilment_order_id. They live on ship.farefreight.com.au and use the same account ID and secret key.

MethodPathDescription
POST/api/public/consignment/{accountId}Book a consignment with the chosen carrier.
POST/api/public/manifest/{accountId}Manifest one or more booked orders.
POST/api/public/consignment-manifest/{accountId}Book and manifest in one call.
POST/api/public/download/connote/{accountId}Connotes as one merged PDF.
POST/api/public/download/manifest/{accountId}Manifests as one merged PDF.
POST/api/public/download/label/{accountId}Labels as one merged PDF.

Response envelope

// consignment / manifest response { “status”: “SUCCESS”, “message”: “Manifest created successfully”, “orders”: [ { “fulfilment_order_id”: 1042, “carrier”: “MACHSHIP”, “fulfilment_status”: “Manifested”, “consignment_id”: “5518203”, “connote_number”: “FFR000123456”, “manifest_id”: “M-778120”, “tracking_url”: “https://track.example.com/FFR000123456” } ] }
statusHTTPMeaning
SUCCESS200Done.
ERROR422The carrier or Fare Freight rejected the request (already booked, already manifested, credentials not found). message says why.
No duplicate-booking check

Calling the consignment endpoint again for an order that’s already booked re-books it with the carrier rather than refusing. Track which orders you’ve booked on your side.

Other errors

StatusMeaningBody
400A required field is missing or invalid. See errors[].{“errors”: […]}
401Missing/incorrect secret key, or the account isn’t active.empty
404Unknown fulfilment_order_id, or (downloads) no document yet.{“error”: “…”}
409The order hasn’t been booked yet (manifest/download).{“error”: “…”}
422Unknown/inactive quote.ff_carrier_id, or the carrier doesn’t support that manifest/document.{“error”: “…”}
429Rate limit exceeded, Retry-After: 60.empty
502The carrier rejected or returned an unreadable document. Retry shortly.{“error”: “…”}

Field names in errors[] are camelCase (e.g. quote.ffCarrierId), not the snake_case you send. Match on the trailing field name.

POST/api/public/consignment/{accountId} · POST/api/public/consignment-manifest/{accountId}

Same body for both. Books the order with the carrier connection you choose. Supported carriers: NFM, MachShip, BigPost, KIS, Direct Freight, Allied Express and Australia Post. BigPost has no manifest step, so use consignment only for it.

Where the quote comes from. quote is the service you picked from a Fare Freight consignment quote, and quote.ff_carrier_id is the carrier connection (Carriers tab in the merchant portal) that books it. Send the other quote fields exactly as returned.

Body

FieldTypeNotes
fulfilment_order_idrequiredintegerThe Fare Freight fulfilment order to book.
quoterequiredobjectff_carrier_id required; service, service_code, carrier_code, carrier_name, shipping_charge, quote_rate_id, service_id, customer_service_id, carrier_id, depot_id, carrier_fees, fees as returned.
pickup_daterequiredstringYYYY-MM-DD.
from_time / to_timerequiredstringPickup window, 24-hour HH:mm.
pickup_addressrequiredobjectlocation_id, city, zip, province_code required; name, address1, address2, province, country optional.
delivery_addressrequiredobjectaddress1, city, zip, province_code, customer_name required; address2, country, phone, email, company optional.
items[]requiredarrayEach needs variant_id, quantity and positive height, width, length, weight; optional package_type, title, sku, volume, item_id.
lift_gate_delivery
residential_delivery
hand_unload
authority_to_leave
optionalbooleanDelivery options, passed to the carrier where supported.
delivery_instructionoptionalstringNote for the driver.
weight_unit
dimensions_unit
optionalstringDefaults to your account’s units.

Example

# request curl -X POST “https://ship.farefreight.com.au/api/public/consignment-manifest/482” \ -H “Content-Type: application/json” \ -H “X-FF-Secret-Key: <your-secret-key>” \ -d @consignment.json
// consignment.json { “fulfilment_order_id”: 1042, “quote”: { “ff_carrier_id”: 5, “service”: “Business Delivery”, “service_code”: “B-FF-NFM-SYD-STD(N,N,N)”, “shipping_charge”: 84.20 }, “pickup_date”: “2026-09-21”, “from_time”: “09:00”, “to_time”: “17:00”, “pickup_address”: { “location_id”: 12, “city”: “Alexandria”, “zip”: “2015”, “province_code”: “NSW”, “address1”: “12 Bourke Road” }, “delivery_address”: { “address1”: “48 Swan Street”, “city”: “Richmond”, “zip”: “3121”, “province_code”: “VIC”, “customer_name”: “Jane Citizen”, “phone”: “0400000000” }, “items”: [ { “variant_id”: 40213897, “quantity”: 2, “height”: 30, “width”: 40, “length”: 60, “weight”: 12.5, “package_type”: “Carton” } ] }

POST/api/public/manifest/{accountId}

Manifests booked orders, grouped by carrier. Supported: NFM, MachShip, KIS, Direct Freight, Allied Express (marked manifested, no separate step) and Australia Post. Up to 100 orders per call. If a carrier group fails you get 422 with each failure in message, and orders shows what did get manifested.

{ “fulfilment_order_ids”: [1042, 1043, 1050] }

POST/api/public/download/label/{accountId} · /download/connote/… · /download/manifest/…

Same body as manifest. Returns one merged PDF for all requested orders, grouped by carrier; on failure you get a JSON error.

# request curl -X POST “https://ship.farefreight.com.au/api/public/download/label/482” \ -H “Content-Type: application/json” \ -H “X-FF-Secret-Key: <your-secret-key>” \ -d ‘{“fulfilment_order_ids”: [1042, 1043]}’ \ -o labels.pdf
DocumentAvailable for
labelNFM, MachShip, Direct Freight, KIS, Allied Express, Australia Post
connoteNFM, MachShip, Allied Express, Australia Post
manifestNFM, MachShip, KIS

A document the carrier doesn’t produce returns 422. A 404 means nothing is available yet; for a manifest, the order usually hasn’t been manifested.

Rate limits

The Rate API and Shipment API are limited separately, each to a burst of 30 requests refilling at 60 per minute per account. Beyond that you get 429 with Retry-After: 60. Need more? Ask your account manager.

Conventions

ConventionDetail
MoneyDecimal dollars in requests, e.g. 49.99; shipping_charge matches the quote you selected.
Weight (rate)Looked up from your catalog. Don’t send or compute it.
Weight (shipment)You send actual per-item weight and dimensions.
State/territoryNSW, VIC, QLD, WA, SA, TAS, ACT, NT.
Field casingsnake_case in every body.

Support

For credentials, catalog setup, rate-limit changes or anything unexpected, contact your Fare Freight account manager or info@farefreight.com.au. Using the plugin instead? See Ship from WooCommerce.

Fare Freight · WooCommerce API · v1