Handling PO Boxes


Overview

When shipping to PO Box addresses, special handling is required as these addresses can only be serviced by specific carriers. This guide explains how to properly handle PO Box addresses in your integration.

Implementation Guide

When dealing with PO Box addresses:

  1. First, detect if the delivery address is a PO Box
  2. If it is a PO Box, preset the carrier to Australia Post (ID: 513), as this is the only carrier that services PO Box addresses
  3. Apply this logic before making rate requests or creating consignments

{warning} Failing to properly handle PO Box addresses may result in failed deliveries or invalid rate requests.

Detection Patterns

To detect PO Box addresses, check for these common patterns in the address string:

  • "parcel collect"
  • "parcel locker"
  • "po box"
  • "p.o box"
  • "p.o. box"
  • "post office"

When any of these patterns are found in an address (case insensitive), the address should be treated as a PO Box and routed to Australia Post.

Example logic flow:

  1. Receive address string
  2. Check for PO Box patterns
  3. If matches found:
    • Set carrier ID to 513 (Australia Post)
    • Proceed with rate request or consignment creation
  4. If no matches:
    • Continue with normal carrier selection process

To preset the carrier on the createConsignment request, you would append it to the payload as follows:

{
    ...
    "carrierId": 513,
    ...
}