1. Home
Log a Case

Mainfreight Implementation Guide

Introduction

Mainfreight is a global logistics provider operating across New Zealand, Australia, the United States, and Europe. The integration supports creating LTL and FTL shipments, generating labels, rating, and tracking across all supported regions.

Mainfreight operates region-specific APIs — ensure you configure the correct Region in your Preference to match the origin of your shipments.

Preferences

In order to create a Preference for Mainfreight in the Multi-carrier application please obtain the credentials below directly from the carrier. This information is obtainable from your carrier account manager or your internal logistics team.

Credential Fields

Field Required Description
API Key Yes Your carrier API key.
Account Number Yes Your carrier billing account number.
Region Yes Your region: NZ (New Zealand), AU (Australia), US (United States), or EU (Europe).
Branch No Mainfreight branch code (up to 2 characters). Required for EU shipments.

How to Test

Mainfreight provides a test server environment. Click on the Use Test Account toggle in the Preference to switch to the test environment and validate your integration before going live.

Service Types

Service Type Value Code
Less than Container Load lcl LCL Copy
Business to Business b2b B2B Copy
Express express EXP Copy
Full Truck Load ftl FTL Copy
Full Truck Load Expedited ftle FTLE Copy
Less than Truck Load ltl LTL Copy
Mainfreight to Home mainfreight_to_home M2H Copy
Move It move_it MOV Copy
Metro Same Day metro_same_day MSD Copy
Platinum platinum PLA Copy
Premium premium PRM Copy
Wharf wharf WHF Copy
Standard (EU) standard_eu ST Copy

Packaging Types

Mainfreight supports a wide range of freight unit types. All packaging types require dimensions and weight.

Packaging Type Value Code
Your Packaging your_packaging PLT Copy
Twenty Foot General Purpose twenty_foot_general_purpose 20GP Copy
Forty Foot General Purpose forty_foot_general_purpose 40GP Copy
Bag bag BAG Copy
Bale bale BALE Copy
Bundle bundle BDL Copy
Boxes boxes BOX Copy
Case case CAS Copy
Coil coil COIL Copy
Crate crate CRT Copy
Carton carton CTN Copy
Cylinder cylinder CYL Copy
Drum drum DRM Copy
IBC ibc IBC Copy
Keg keg KEG Copy
Mirror mirror MIR Copy
MT Keg mt_keg MTKEG Copy
MT Tank mt_tank MTTANK Copy
Pail pail PAIL Copy
Parcel parcel PCL Copy
Pallecon pallecon PCO Copy
Pieces pieces PIECES Copy
Pipe pipe PIPE Copy
Pack pack PK Copy
Pallet pallet PLT Copy
Pole pole POLE Copy
Roll roll ROLL Copy
Skid skid SK Copy
Stillage stillage ST Copy
Tube tube TBE Copy
Tie tie TIE Copy
Tank tank TNK Copy
Tub tub TUB Copy

Label Types

Mainfreight supports both PDF and PNG label formats in thermal (4x6) and standard (A4) sizes.

Format Sizes
PDF 4x6, A4 Copy
PNG 4x6, A4 Copy

Special Services

Mainfreight offers a range of shipment-level and package-level special services.

Shipment Special Services

Service Value
Container Service container_service Copy
Residential Pickup mainfreight_resipu Copy
Liftgate Pickup mainfreight_liftpu Copy
Inside Delivery mainfreight_insde Copy
Tailgate Delivery mainfreight_tmspde Copy
Limited Access Delivery mainfreight_limide Copy
Appointment Delivery mainfreight_apptde Copy

Package Special Services

Service Value
Stackable stackable Copy

Custom Fields

Mainfreight supports a number of custom fields at the shipment and package level. These can be set in the Shipment Wizard or defaulted via the Custom Address Source.

Shipment-level Fields

Field Required Description
Freight Terms No How the shipment starts and ends. Options: door_to_door (default), depot_to_door, door_to_depot, depot_to_depot.
Routing Type No Defaults to the service level code when omitted. Options include: lcl, met, metdtc, dtc, dff, ftl, lhdtc, lgdtd, loc, locdtd.
Freight Required Timezone No Timezone for pickup/delivery window datetime fields. Required when using pickup or delivery window fields.
Pickup Start Yes Pickup window start datetime.
Pickup End No Pickup window end datetime. Defaults to Pickup Start when omitted.
Delivery Start No Delivery window start datetime.
Delivery End No Delivery window end datetime. Defaults to Delivery Start when omitted.
Pickup Instructions No Instruction note for the sender / pickup. Max 200 characters.
Delivery Instructions No Instruction note for the receiver / delivery. Max 500 characters.
Terms of Trade No Incoterm for EU international shipments (e.g. exw, dap, ddp, fob, cif).
Incoterm Location No Named place where seller obligations end for the EU incoterm. Max 15 characters.

Package-level Fields

Field Required Description
Package Type Yes The packaging type for the freight unit. See Packaging Types above.
Quantity No Number of freight units. Defaults to 1. Minimum: 1.
Description No Freight line item description. Max 200 characters.
Freight Class No NMFC freight classification code (US). Values: 50, 55, 60, 65, 70, 77.5, 85, 92.5, 100, 110, 125, 150, 175, 200, 250, 300, 400, 500.
NMFC Sub Category No Category of goods on the EU freight line. Options: ambient, cool, fragile_goods, frozen, good_distribution_practices, general_cargo, haccp, hazardous_goods, security, temperature_controlled.
NMFC Code No National Motor Freight Classification code. Max 35 characters.

References

Mainfreight supports the following reference types on a shipment.

Reference Value
Reference 1 (Housebill) reference_1 Copy
Customer Reference) customer_reference Copy
Sender Reference sender_reference Copy
Receiver Reference receiver_reference Copy
Pickup Reference pickup_reference Copy
Delivery Reference delivery_reference Copy
Extra Invoice Reference extra_invoice_reference Copy
SSCC Number sscc_number Copy

Note: The SSCC Number reference has a maximum length of 18 characters.

Common Questions

In this section you can find our most commonly asked questions regarding this carrier. If you have a question not listed here please contact us.

Which regions does Mainfreight support?

Mainfreight supports four regions: NZ (New Zealand), AU (Australia), US (United States), and EU (Europe). The Region is set at the Preference level and determines which Mainfreight API endpoint is used.

Is the Branch code required?

The Branch code (up to 2 characters) is only required for EU shipments. It identifies the Mainfreight branch responsible for handling the freight.

Is Pickup Start required?

Yes. The Pickup Start custom field is required for all Mainfreight shipments. If you do not set a Pickup End, it defaults to the same value as Pickup Start.

How do I track a Mainfreight shipment?

Shipments can be tracked publicly using the Mainfreight tracking URL: https://www.mainfreight.com/track/CW/{tracking_number}. Tracking is also available via the Zenkraft tracking API.

Back to Top