Integration Guide For Carriers
Integration Guide For Carriers

XML Format

This guide covers the XML implementation of MachShip’s generic carrier integration format (V3). For detailed field definitions and requirements, see the Generic Data Fields guide.

Overview

The XML manifest format contains sender/receiver information, pickup details, and item-level data for shipment processing.

Two Manifest Structure Options

  • Multi-Consignment Manifest: Multiple consignments in a single XML file (uses <consignments> element)
  • Single-Line Manifest: One consignment per XML file (uses <consignment> element)

Two Dangerous Goods Options

  • Item-Level DG: Dangerous goods data within each item (recommended – matches JSON structure)
  • Consignment-Level DG: Aggregated dangerous goods data at consignment level (legacy format)

Multi-Consignment Manifest Example (Item-Level DG)

This example demonstrates the V3 XML format with field names aligned to JSON:

<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <account>ACMEFRT</account>
  <payingAccount>ACMEFRT</payingAccount>
  <despatchDateTime>2025-11-15</despatchDateTime>
  <dgsDeclaration>true</dgsDeclaration>
  <pickupRequired>true</pickupRequired>
  <pickupAddress>
    <name>ACME Manufacturing Pty Ltd</name>
    <contact>Sarah Mitchell</contact>
    <phone>03 9876 5432</phone>
    <email>dispatch@acmemanufacturing.com.au</email>
    <addressLine1>142 Manufacturing Drive</addressLine1>
    <addressLine2>Unit 7</addressLine2>
    <suburb>DANDENONG SOUTH</suburb>
    <postcode>3175</postcode>
    <state>Victoria</state>
    <stateCode>VIC</stateCode>
  </pickupAddress>
  <pickupDateTime>2025-11-15T09:30:00</pickupDateTime>
  <pickupClosingDateTime>2025-11-15T16:00:00</pickupClosingDateTime>
  <timeSlot>9am-12pm</timeSlot>
  <specialInstructions>Forklift access required. DG consignments present.</specialInstructions>
  
  <consignments>
    <consignment>
      <reference>ACME0034521</reference>
      <service>PEXP</service>
      <extraReferences>
        <carrierConsignmentReference>ACME0034521</carrierConsignmentReference>
        <customerReference>PO-2025-8847</customerReference>
        <customerReference2>INV-98234</customerReference2>
      </extraReferences>
      
      <toLocation>
        <name>Brisbane Distribution Centre</name>
        <contact>James Wong</contact>
        <phone>07 3344 7788</phone>
        <email>receiving@brisbanedistribution.com.au</email>
        <addressLine1>88 Industrial Circuit</addressLine1>
        <suburb>STAPYLTON</suburb>
        <postcode>4178</postcode>
        <state>Queensland</state>
        <stateCode>QLD</stateCode>
      </toLocation>
      
      <items>
        <item>
          <itemType>Pallet</itemType>
          <name>Industrial Pumps - Model XR500</name>
          <sku>PUMP-XR500-A</sku>
          <quantity>2</quantity>
          <height>120</height>
          <length>120</length>
          <width>100</width>
          <weight>680</weight>
          <carrierItemTypeName>Standard Pallet</carrierItemTypeName>
          <carrierItemTypeAbbreviation>SPAL</carrierItemTypeAbbreviation>
          <Barcode>
            <barcode>
              <barcodeNumber>ACME0034521001</barcodeNumber>
            </barcode>
            <barcode>
              <barcodeNumber>ACME0034521002</barcodeNumber>
            </barcode>
          </Barcode>
        </item>
        
        <item>
          <itemType>Pallet</itemType>
          <name>Industrial Paint - Epoxy Coating</name>
          <sku>PAINT-EP-200L</sku>
          <quantity>1</quantity>
          <height>110</height>
          <length>120</length>
          <width>120</width>
          <weight>850</weight>
          <Barcode>
            <barcode>
              <barcodeNumber>ACME0034521003</barcodeNumber>
            </barcode>
          </Barcode>
          <consignmentItemDgItems>
            <dgItem>
              <unNumber>1263</unNumber>
              <packingGroup>II</packingGroup>
              <containerType>Drum</containerType>
              <aggregateQuantity>200</aggregateQuantity>
              <isAggregateQuantityWeight>false</isAggregateQuantityWeight>
              <numberOfContainers>4</numberOfContainers>
              <isMarinePollutant>false</isMarinePollutant>
              <isTemperatureControlled>false</isTemperatureControlled>
              <isEmptyDgContainer>false</isEmptyDgContainer>
              <dgClassType>3</dgClassType>
              <subDgClassTypes>
                <class>8</class>
              </subDgClassTypes>
              <technicalOrChemicalGroupNames>Epoxy resin mixture</technicalOrChemicalGroupNames>
              <hazchem>3YE</hazchem>
              <flashpoint>23.5</flashpoint>
              <ProperShippingName>PAINT (including paint, lacquer, enamel, stain, shellac, varnish, polish, liquid filler and liquid lacquer base)</ProperShippingName>
            </dgItem>
          </consignmentItemDgItems>
        </item>
      </items>
      
      <palletTypes>
        <palletCHEP>2</palletCHEP>
        <palletLOSCAM>0</palletLOSCAM>
        <palletPLAIN>0</palletPLAIN>
      </palletTypes>
      <totalWeight>1530</totalWeight>
      <totalVolume>3.024</totalVolume>
      <totalCubic>3.024</totalCubic>
    </consignment>
    
    <consignment>
      <reference>ACME0034522</reference>
      <service>PEXP</service>
      <extraReferences>
        <carrierConsignmentReference>ACME0034522</carrierConsignmentReference>
        <customerReference>PO-2025-8849</customerReference>
        <customerReference2>INV-98236</customerReference2>
      </extraReferences>
      
      <toLocation>
        <name>Adelaide Logistics Hub</name>
        <contact>Michelle Chen</contact>
        <phone>08 8123 4567</phone>
        <email>goods@adelaidehub.com.au</email>
        <addressLine1>23 Enterprise Way</addressLine1>
        <suburb>MAWSON LAKES</suburb>
        <postcode>5095</postcode>
        <state>South Australia</state>
        <stateCode>SA</stateCode>
      </toLocation>
      
      <specialInstructions>Deliver to Warehouse B</specialInstructions>
      
      <items>
        <item>
          <itemType>Pallet</itemType>
          <name>Aerosol Lubricant Spray Cans</name>
          <sku>AERO-LUB-500</sku>
          <quantity>1</quantity>
          <height>95</height>
          <length>120</length>
          <width>100</width>
          <weight>285</weight>
          <Barcode>
            <barcode>
              <barcodeNumber>ACME0034522001</barcodeNumber>
            </barcode>
          </Barcode>
          <consignmentItemDgItems>
            <dgItem>
              <unNumber>1950</unNumber>
              <packingGroup>N/A</packingGroup>
              <containerType>Aerosol</containerType>
              <aggregateQuantity>45</aggregateQuantity>
              <isAggregateQuantityWeight>true</isAggregateQuantityWeight>
              <numberOfContainers>120</numberOfContainers>
              <isMarinePollutant>false</isMarinePollutant>
              <isTemperatureControlled>false</isTemperatureControlled>
              <isEmptyDgContainer>false</isEmptyDgContainer>
              <dgClassType>2.1</dgClassType>
              <subDgClassTypes />
              <hazchem>2WE</hazchem>
              <ProperShippingName>AEROSOLS, flammable</ProperShippingName>
            </dgItem>
          </consignmentItemDgItems>
        </item>
      </items>
      <totalWeight>285</totalWeight>
      <totalVolume>0.84</totalVolume>
      <totalCubic>0.84</totalCubic>
    </consignment>
  </consignments>
</Manifest>

Consignment-Level DG Example (Aggregated)

For carriers who prefer aggregated dangerous goods data at the consignment level, this alternative format flattens all DG items:

<consignment>
  <reference>ACME0034523</reference>
  <service>STD</service>
  <extraReferences>
    <carrierConsignmentReference>ACME0034523</carrierConsignmentReference>
    <customerReference>PO-2025-8851</customerReference>
  </extraReferences>
  
  <toLocation>
    <name>Perth Parts Depot</name>
    <contact>Perth Warehouse</contact>
    <phone>08 9494 6764</phone>
    <addressLine1>17 Marriott Road</addressLine1>
    <suburb>JANDAKOT</suburb>
    <postcode>6164</postcode>
    <state>Western Australia</state>
    <stateCode>WA</stateCode>
  </toLocation>
  
  <items>
    <item>
      <itemType>Pallet</itemType>
      <name>Chemical Processing Reagents</name>
      <sku>CHEM-MIX-A</sku>
      <quantity>1</quantity>
      <height>140</height>
      <length>120</length>
      <width>100</width>
      <weight>920</weight>
      <Barcode>
        <barcode>
          <barcodeNumber>ACME0034523001</barcodeNumber>
        </barcode>
      </Barcode>
    </item>
    
    <item>
      <itemType>Carton</itemType>
      <name>Safety Equipment & Materials</name>
      <sku>SAFE-KIT-200</sku>
      <quantity>2</quantity>
      <height>60</height>
      <length>50</length>
      <width>40</width>
      <weight>45</weight>
      <Barcode>
        <barcode>
          <barcodeNumber>ACME0034523002</barcodeNumber>
        </barcode>
        <barcode>
          <barcodeNumber>ACME0034523003</barcodeNumber>
        </barcode>
      </Barcode>
    </item>
  </items>
  
  <!-- Aggregated DG at consignment level -->
  <dangerousGoods>
    <dgItem>
      <unNumber>3264</unNumber>
      <packingGroup>II</packingGroup>
      <containerType>IBC</containerType>
      <aggregateQuantity>50</aggregateQuantity>
      <isAggregateQuantityWeight>false</isAggregateQuantityWeight>
      <numberOfContainers>1</numberOfContainers>
      <isMarinePollutant>true</isMarinePollutant>
      <isTemperatureControlled>false</isTemperatureControlled>
      <isEmptyDgContainer>false</isEmptyDgContainer>
      <dgClassType>8</dgClassType>
      <subDgClassTypes>
        <class>6.1</class>
      </subDgClassTypes>
      <hazchem>2WE</hazchem>
      <ProperShippingName>CORROSIVE LIQUID, ACIDIC, INORGANIC, N.O.S.</ProperShippingName>
    </dgItem>
    
    <dgItem>
      <unNumber>1005</unNumber>
      <packingGroup>N/A</packingGroup>
      <containerType>Tube</containerType>
      <aggregateQuantity>250</aggregateQuantity>
      <isAggregateQuantityWeight>true</isAggregateQuantityWeight>
      <numberOfContainers>10</numberOfContainers>
      <isMarinePollutant>false</isMarinePollutant>
      <isTemperatureControlled>false</isTemperatureControlled>
      <isEmptyDgContainer>false</isEmptyDgContainer>
      <dgClassType>2.3</dgClassType>
      <subDgClassTypes>
        <class>2.1</class>
        <class>8</class>
      </subDgClassTypes>
      <hazchem>2XE</hazchem>
      <ProperShippingName>AMMONIA, ANHYDROUS</ProperShippingName>
    </dgItem>
    
    <dgItem>
      <unNumber>1325</unNumber>
      <packingGroup>III</packingGroup>
      <containerType>Carton</containerType>
      <aggregateQuantity>80</aggregateQuantity>
      <isAggregateQuantityWeight>true</isAggregateQuantityWeight>
      <numberOfContainers>1</numberOfContainers>
      <isMarinePollutant>false</isMarinePollutant>
      <isTemperatureControlled>false</isTemperatureControlled>
      <isEmptyDgContainer>false</isEmptyDgContainer>
      <dgClassType>4.1</dgClassType>
      <subDgClassTypes />
      <hazchem>4W</hazchem>
      <ProperShippingName>FLAMMABLE SOLID, ORGANIC, N.O.S.</ProperShippingName>
    </dgItem>
  </dangerousGoods>
  
  <palletTypes>
    <palletCHEP>1</palletCHEP>
    <palletLOSCAM>1</palletLOSCAM>
    <palletPLAIN>0</palletPLAIN>
  </palletTypes>
  <totalWeight>1010</totalWeight>
  <totalVolume>2.448</totalVolume>
  <totalCubic>2.448</totalCubic>
</consignment>

XML Format Notes

Syntax Requirements

  • All XML must be well-formed with proper opening/closing tags
  • Element names are case-sensitive
  • Special characters must be escaped (&, <, >, ", ')
  • Boolean values use lowercase true and false
  • Empty arrays can use self-closing tags: <subDgClassTypes />

Item Structure

Each item contains a <Barcode> container with multiple <barcode> elements matching the quantity:

<item>
  <itemType>Pallet</itemType>
  <name>Product Name</name>
  <sku>SKU-123</sku>
  <quantity>2</quantity>
  <height>120</height>
  <length>100</length>
  <width>80</width>
  <weight>500</weight>
  <carrierItemTypeName>Standard Pallet</carrierItemTypeName>
  <carrierItemTypeAbbreviation>SPAL</carrierItemTypeAbbreviation>
  <Barcode>
    <barcode><barcodeNumber>ABC001</barcodeNumber></barcode>
    <barcode><barcodeNumber>ABC002</barcodeNumber></barcode>
  </Barcode>
</item>

Dangerous Goods Options

Option 1: Item-Level DG (Recommended) – DG data within each item, matching JSON structure:

<item>
  <name>Paint</name>
  <consignmentItemDgItems>
    <dgItem>...</dgItem>
  </consignmentItemDgItems>
</item>

Option 2: Consignment-Level DG – Aggregated DG data at consignment level:

<consignment>
  <items>...</items>
  <dangerousGoods>
    <dgItem>...</dgItem>
    <dgItem>...</dgItem>
  </dangerousGoods>
</consignment>

Single-Line Manifest Structure

For single consignment per file, use <consignment> instead of <consignments>:

<?xml version="1.0" encoding="utf-8"?>
<Manifest>
  <account>ACMEFRT</account>
  <despatchDateTime>2025-11-15</despatchDateTime>
  <pickupAddress>...</pickupAddress>
  <pickupDateTime>2025-11-15T09:30:00</pickupDateTime>
  <pickupClosingDateTime>2025-11-15T16:00:00</pickupClosingDateTime>
  
  <!-- Single consignment object instead of array -->
  <consignment>
    <reference>ACME0034521</reference>
    <service>PEXP</service>
    ...
  </consignment>
</Manifest>

Validation Tips

  • Use an XML validator to check syntax before sending
  • Verify barcode count matches item quantity
  • Ensure required DG fields are present when using DG elements
  • Check date/time formats are ISO 8601 compliant
  • Verify all required address fields are present
  • Confirm measurements are in correct units (cm, kg)
  • Escape special characters in text fields (&, <, >)

Related Guides

  • Generic Data Fields: Complete field definitions, requirements, and business rules
  • JSON Format: JSON implementation of the same data structure
  • CSV Format: CSV implementation of the same data structure