1. Home
  2. Developers

API documentation

Quote, book, track and cancel parcels from your own system, and get status updates by webhook. The API is open to approved business accounts.

Overview

Base URL
https://point2point.nz/api/v1
Format
JSON in and out, snake_case keys, UTF-8.
Money
Integer cents in NZD, GST inclusive. "total_cents": 2132 is $21.32.
Times
ISO-8601 in UTC, like 2026-09-24T12:35:36.563Z.
Sizes
Weights in kilograms (weight_kg), dimensions in whole centimetres.

Authentication

Create API keys in the business dashboard under Account › Business › API keys. A key is shown once, when you create it, so store it like a password. A business can hold up to 10 active keys.

Request header
Authorization: Bearer p2p_live_2mB9x…

Live keys start with p2p_live_ and test keys with p2p_test_, followed by 32 characters. A test key works in a separate test area: see Test mode. A revoked key, or a key whose business is suspended, gets 401 invalid_api_key. The API sets no cookies and needs no CSRF token.

Rate limits

Each API key can make 120 requests a minute. Failed authentication attempts are limited per IP address. Every response carries these headers:

Rate limit headers
HeaderMeaning
RateLimit-Limit, X-RateLimit-LimitRequests allowed in the window (120).
RateLimit-Remaining, X-RateLimit-RemainingRequests left in the current window.
RateLimit-ResetSeconds until the window resets.
X-RateLimit-ResetUnix time, in seconds, when the window resets.

Over the limit you get 429 rate_limited with a Retry-After header in seconds.

Errors

Every error has the same shape. fields appears only on validation errors, keyed by the dotted path into your request body.

Error body422
{
  "error": {
    "code": "validation_failed",
    "message": "Please check the highlighted fields.",
    "fields": {
      "receiver.postcode": "Enter a 4-digit postcode.",
      "parcel.weight_kg": "Parcels must weigh between 0.1 kg and 25 kg."
    }
  }
}
Error codes
HTTPCodeWhen
HTTP 400invalid_jsonThe body is not valid JSON, or not a JSON object.
HTTP 401unauthorizedNo Authorization: Bearer header.
HTTP 401invalid_api_keyUnknown or revoked key, or the business is not approved.
HTTP 400invalid_idempotency_keyThe Idempotency-Key header is not 1 to 255 printable characters.
HTTP 404not_foundUnknown endpoint, or a tracking number that is not on your account.
HTTP 409not_cancellableThe parcel is already in our network (picked up or later).
HTTP 409idempotency_key_reusedThis Idempotency-Key was already used with a different request.
HTTP 409label_not_availableThe parcel is not booked and paid for, so it has no label.
HTTP 413payload_too_largeThe body is larger than 2 MB.
HTTP 415unsupported_media_typeA POST without Content-Type: application/json.
HTTP 422validation_failedField errors, listed in fields.
HTTP 429rate_limitedToo many requests.
HTTP 500internal_errorSomething went wrong on our side. Retry later.

Safe retries

Send an Idempotency-Key header on POST /shipments and POST /manifests, so a retry after a timeout cannot book twice. Use anything unique for the booking, such as your order number or a UUID, up to 255 characters.

RequestPOST /shipments
curl -s -X POST https://point2point.nz/api/v1/shipments \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042" \
  -d @shipment.json
  • The same key and the same body answer with the first response, and the header Idempotent-Replayed: true. Nothing new is booked.
  • The same key with a different body answers 409 idempotency_key_reused.
  • Only a booking that went through is kept. A request that failed, such as a 422, can be fixed and sent again with the same key.
  • Keys last 24 hours and belong to your business. Without the header, every request books.

Reference data

Regions

Send these values in from, to and every region field.

Region values
ValueRegionIsland
northlandNorthlandNorth Island
aucklandAucklandNorth Island
waikatoWaikatoNorth Island
bay-of-plentyBay of PlentyNorth Island
gisborneGisborneNorth Island
hawkes-bayHawke's BayNorth Island
taranakiTaranakiNorth Island
manawatu-whanganuiManawatū-WhanganuiNorth Island
wellingtonWellingtonNorth Island
nelson-tasmanNelson & TasmanSouth Island
marlboroughMarlboroughSouth Island
west-coastWest CoastSouth Island
canterburyCanterburySouth Island
otagoOtagoSouth Island
southlandSouthlandSouth Island

Services

Service values
ValueServiceDelivery
economyEconomy2–4 business days anywhere in New Zealand.
overnightOvernightNext business day between main centres, 1–2 business days to other towns.
same_daySame-dayAuckland, Wellington and Christchurch metro only. Pickup and delivery in the same region, not to rural addresses.

Parcel types

Parcel type values
ValueSizePriced on
satchel_smallUp to 1 kg, 28 × 38 cmWeight only
satchel_largeUp to 3 kg, 40 × 50 cmWeight only
box_small30 × 20 × 15 cmThe greater of actual and cubic weight
box_medium40 × 30 × 25 cmThe greater of actual and cubic weight
box_large60 × 40 × 40 cmThe greater of actual and cubic weight
custom (default)Send length_cm, width_cm and height_cm, each 1–150 cm.The greater of actual and cubic weight

Cubic weight is length × width × height in centimetres, divided by 5000. The chargeable weight is the greater of actual and cubic weight, rounded up to a whole kilogram, with a minimum of 1 kg. A parcel can weigh 0.1–25 kg.

Pricing

Prices come from the Point2Point rate card, less your account discount. The discount applies to the core price only. Add-ons are not discounted: signature on delivery adds $1.50, a rural address adds $4.50 on Economy and Overnight, and extra cover is free for the first $100 of declared value, then $2.50 for each $100 or part of it, up to $50,000 (your account's limit; over it, declared_value is a field error). We always calculate the price: any price fields you send are ignored.

Shipment statuses

Shipment status values
ValueShown to customers as
awaiting_paymentAwaiting payment
bookedBooked
picked_upPicked up
in_transitIn transit
at_depotAt depot
out_for_deliveryOut for delivery
deliveredDelivered
delivery_failedDelivery attempted
held_at_depotHeld at depot
cancelledCancelled
returned_to_senderReturned to sender
lostLost
written_offWritten off

Tracking numbers are 16 digits, like 6424351544509385: 64, 13 digits, then a check digit (Luhn), so a mistyped number is caught before it is looked up. We send them without spaces in tracking_number and grouped for people in tracking_number_display (6424 3515 4450 9385); spaces, dots and dashes are ignored when you send one. Numbers from before September 2026 (P2P1048327765NZ) still work. Each parcel also has an 8-character query_code (letters and digits, no 0, O, 1, I or L) that tracks it in place of the number. code_required is true for parcels that need their 6-digit parcel code at delivery (code_reason: international, valuable or business); the code itself comes only in your own create and detail responses, as parcel_code.

Endpoints

API v1 endpoints
Method and pathPurpose
POST /quotesPrice a parcel for every service
POST /shipmentsBook one shipment
POST /manifestsBook up to 500 shipments at once, all or nothing
GET /manifests/{ref}One inbound consignment and its parcels
GET /shipmentsList your shipments, newest first
GET /shipments/{tracking_number}One shipment, with its events and where it is now
GET /shipments/{tracking_number}/labelThe label, as a PDF or as ZPL
POST /shipments/{tracking_number}/cancelCancel before pickup
POST /shipments/{tracking_number}/eventsPartner milestones: landed in New Zealand, border checks, cleared
GET /shipments/{tracking_number}/proof-photoThe proof-of-delivery photo
GET /tracking/{tracking_number}Public-safe tracking for one of your parcels, by any of its numbers
POST /trackingPublic-safe tracking for any parcel: the number and one detail

Price a parcel

POST /quotes returns a price for every service, with your discount applied.

RequestPOST /quotes
curl -s -X POST https://point2point.nz/api/v1/quotes \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d '{"from":"auckland","to":"wellington","parcel_type":"box_small","weight_kg":1.2,"signature_required":true}'
Quote request fields
FieldTypeNotes
from, tostringRegion values. Required unless you send postcodes.
from_postcode, to_postcodestringInstead of from and to: 4-digit New Zealand postcodes. We work out the region, and whether the delivery is rural.
parcel_typestringDefaults to custom.
weight_kgnumberRequired.
length_cm, width_cm, height_cmnumberRequired for custom.
declared_valuenumberIn dollars, or send declared_value_cents.
signature_requiredbooleanAdds signature on delivery.
ruralbooleanThe receiver is at a rural address.
Request by postcodePOST /quotes
curl -s -X POST https://point2point.nz/api/v1/quotes \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d '{"from_postcode":"3200","to_postcode":"6012","parcel_type":"box_small","weight_kg":1.2}'
Response for an account with a 10% discount200 OK
{
  "quote": {
    "zone": "regional",
    "zone_label": "Regional",
    "actual_kg": 1.2,
    "cubic_kg": 1.8,
    "chargeable_kg": 2,
    "dims": [30, 20, 15],
    "discount_pct": 10,
    "options": [
      {
        "service": "economy",
        "label": "Economy",
        "available": true,
        "reason": null,
        "core_cents": 1250,
        "discount_cents": 125,
        "addons": [{ "code": "signature", "label": "Signature on delivery", "cents": 150 }],
        "total_cents": 1275,
        "estimate": "2–4 business days"
      },
      {
        "service": "overnight",
        "label": "Overnight",
        "available": true,
        "reason": null,
        "core_cents": 1813,
        "discount_cents": 181,
        "addons": [{ "code": "signature", "label": "Signature on delivery", "cents": 150 }],
        "total_cents": 1782,
        "estimate": "Next business day"
      },
      {
        "service": "same_day",
        "label": "Same-day",
        "available": false,
        "reason": "Same-day is only available within one metro area. Choose the same region for pickup and delivery.",
        "core_cents": null,
        "discount_cents": 0,
        "addons": [],
        "total_cents": null,
        "estimate": null
      }
    ],
    "parcel_code": null,
    "cover": {
      "included_cents": 10000,
      "step_cents": 10000,
      "step_price_cents": 250,
      "max_cents": 200000,
      "kind": "personal"
    },
    "currency": "NZD"
  }
}

Book a shipment

POST /shipments books one parcel. On monthly account terms the shipment is booked straight away and goes on next month’s invoice; a booking that would pass your credit limit fails with 422 and a payment_method field error. On card terms it is created as awaiting_payment, and you pay for it in the business dashboard before we collect it.

RequestPOST /shipments
curl -s -X POST https://point2point.nz/api/v1/shipments \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d @shipment.json
Request body
{
  "service": "overnight",
  "customer_reference": "ORDER-1042",
  "sender": {
    "name": "Dispatch team",
    "company": "Kōwhai Ceramics",
    "phone": "021 555 0190",
    "line1": "18 Kahikatea Drive",
    "suburb": "Te Rapa",
    "city": "Hamilton",
    "region": "waikato",
    "postcode": "3200"
  },
  "receiver": {
    "name": "Aroha Smith",
    "email": "aroha@example.co.nz",
    "phone": "021 555 0101",
    "line1": "14 Upland Road",
    "suburb": "Kelburn",
    "city": "Wellington",
    "region": "wellington",
    "postcode": "6012",
    "is_rural": false
  },
  "parcel": { "type": "box_small", "weight_kg": 1.2, "declared_value": 250 },
  "signature_required": false,
  "delivery_instructions": "Leave at the front door",
  "pickup": { "method": "dropoff" },
  "international": false
}
Shipment fields
FieldRequiredNotes
serviceYeseconomy, overnight or same_day.
sender.name, sender.line1, sender.city, sender.region, sender.postcodeYessender.phone is required for pickups.
sender.company, sender.email, sender.phone, sender.line2, sender.suburbNo
receiver.name, receiver.line1, receiver.city, receiver.region, receiver.postcodeYesA 4-digit New Zealand postcode.
receiver.email, receiver.phoneNoDelivery notifications go to email.
receiver.is_ruralNoAdds the rural fee and rules out same-day.
parcel.type, parcel.weight_kg, dimensions, parcel.declared_valueSee reference datadeclared_value in dollars, or declared_value_cents.
signature_requiredNoAdds signature on delivery.
delivery_instructionsNoUp to 300 characters, printed on the label.
customer_referenceNoYour order number, up to 60 characters. Searchable with q.
pickup.methodNodropoff (default) or pickup.
pickup.dateFor pickupsYYYY-MM-DD, a weekday within 30 days.
internationalNotrue for international last-mile parcels, shown on tracking.
partner_tracking_numberNoInternational only: your overseas carrier’s number, 8 to 40 letters and digits. Stored upper-case without spaces or dashes, unique on your account. Receivers can track with it.
sender.countryFor an overseas senderWith international: true: a two-letter country code. sender.region and sender.postcode are then not needed. See Inbound freight, below.
pickup.awb, pickup.locationNoAir waybill or bill of lading, and where we collect it. The parcel joins that consignment.
Response201 Created
{
  "shipment": {
    "tracking_number": "6419889849330251",
    "tracking_number_display": "6419 8898 4933 0251",
    "query_code": "H7QK4M2X",
    "code_required": false,
    "code_reason": null,
    "status": "booked",
    "status_label": "Booked",
    "service": "overnight",
    "source": "api",
    "batch_id": null,
    "customer_reference": "ORDER-1042",
    "international": false,
    "sender": {
      "name": "Dispatch team",
      "company": "Kōwhai Ceramics",
      "phone": "021 555 0190",
      "line1": "18 Kahikatea Drive",
      "suburb": "Te Rapa",
      "city": "Hamilton",
      "region": "waikato",
      "postcode": "3200",
      "email": null,
      "line2": null
    },
    "receiver": {
      "name": "Aroha Smith",
      "email": "aroha@example.co.nz",
      "phone": "021 555 0101",
      "line1": "14 Upland Road",
      "suburb": "Kelburn",
      "city": "Wellington",
      "region": "wellington",
      "postcode": "6012",
      "is_rural": false,
      "company": null,
      "line2": null
    },
    "parcel": {
      "type": "box_small",
      "weight_kg": 1.2,
      "length_cm": 30,
      "width_cm": 20,
      "height_cm": 15,
      "declared_value_cents": 25000,
      "chargeable_kg": 2
    },
    "signature_required": false,
    "delivery_instructions": "Leave at the front door",
    "zone": "regional",
    "price": {
      "currency": "NZD",
      "core_cents": 1813,
      "discount_cents": 181,
      "addons": [{ "code": "cover", "label": "Extra cover to $250", "cents": 500 }],
      "total_cents": 2132
    },
    "payment": { "method": "account", "paid_at": null, "invoice_id": null },
    "pickup": { "method": "dropoff", "date": null },
    "estimated_delivery": "Next business day",
    "delivered_at": null,
    "proof_of_delivery": null,
    "cancelled_at": null,
    "label_url": "https://point2point.nz/api/v1/label/6419889849330251?token=b4a4044c72cb1df6fc2b894b70b7cef6",
    "label_page_url": "https://point2point.nz/label/6419889849330251?token=b4a4044c72cb1df6fc2b894b70b7cef6",
    "tracking_url": "https://point2point.nz/track/6419889849330251",
    "created_at": "2026-09-24T12:35:36.563Z",
    "updated_at": "2026-09-24T12:35:36.563Z",
    "events": [
      {
        "status": "booked",
        "code": "booking_confirmed",
        "title": "Booking confirmed",
        "description": "Label created. We will scan the parcel when it enters our network.",
        "location": "Hamilton",
        "occurred_at": "2026-09-24T12:35:36.563Z"
      }
    ]
  }
}

The response carries a Location: /api/v1/shipments/{tracking_number} header. label_url is the label as a PDF, and needs no key. Once delivered, proof_of_delivery is { "type": "photo" | "signature", "name", "note" }.

Book a manifest

POST /manifests books up to 500 shipments in one request. Every row is checked first. If any row fails, the whole request is rejected and nothing is booked.

RequestPOST /manifests
curl -s -X POST https://point2point.nz/api/v1/manifests \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d '{ "shipments": [ { ... }, { ... } ] }'
Response201 Created
{
  "batch_id": "BAT-3F9A1C27",
  "count": 2,
  "total_cents": 3405,
  "currency": "NZD",
  "shipments": [
    { "tracking_number": "6444029183751148", "status": "booked", "...": "..." },
    { "tracking_number": "6444029183761170", "status": "booked", "...": "..." }
  ]
}
Response when one row needs fixing422
{
  "error": {
    "code": "validation_failed",
    "message": "1 of 3 shipments need fixing.",
    "fields": { "shipments[1].receiver.postcode": "Enter a 4-digit postcode." },
    "details": {
      "rows": [{ "index": 1, "fields": { "receiver.postcode": "Enter a 4-digit postcode." } }]
    }
  }
}

Inbound freight

An overseas partner sends the air waybill or bill of lading with the manifest. consignment turns the manifest into one consignment, and we open a collection job for the airport or port. We collect after release_at, once your broker has cleared it. Only awb is required: send the rest as you learn it.

Request bodyPOST /manifests
{
  "consignment": {
    "awb": "176-12345675",
    "transport_mode": "air",
    "terminal": "Auckland Airport, cargo terminal",
    "release_at": "2026-09-24T06:30:00+12:00",
    "piece_count": 3,
    "flight_or_vessel": "NZ288",
    "origin_country": "CN",
    "entry_depot": "AKL"
  },
  "shipments": [
    {
      "service": "economy",
      "international": true,
      "partner_tracking_number": "XB88213551",
      "sender": {
        "name": "Export desk",
        "company": "Your carrier",
        "phone": "+86 21 5555 0100",
        "line1": "88 Century Avenue",
        "city": "Shanghai",
        "postcode": "200120",
        "country": "CN"
      },
      "receiver": {
        "name": "Aroha Smith",
        "email": "aroha@example.co.nz",
        "line1": "14 Upland Road",
        "suburb": "Kelburn",
        "city": "Wellington",
        "postcode": "6012"
      },
      "parcel": { "type": "box_small", "weight_kg": 1.2 }
    }
  ]
}
Consignment fields
FieldNotes
awbAir waybill or bill of lading number. Required.
transport_modeair (default) or sea.
terminalThe airport or port terminal we collect from.
release_atISO 8601: when it is released for collection.
piece_countPieces on the waybill.
flight_or_vesselFlight number or vessel name.
origin_countryTwo-letter country code.
entry_depotThe depot it comes in through: AKL (default), or another depot code.

An overseas sender has a country and no New Zealand region or postcode. The price and route start at entry_depot, which is the Auckland hub unless you say otherwise; send entry_depot on the shipment too if it comes in elsewhere. A single POST /shipments can carry consignment as well, or the short form pickup.awb and pickup.location: bookings with the same waybill join the same open consignment.

Get it back

GET /manifests/{ref} returns the consignment and its parcels, and GET /manifests lists yours. PATCH /manifests/{ref} changes terminal, release_at, flight_or_vessel, piece_count or notes until it is collected.

ResponseGET /manifests/{ref}
{
  "consignment": {
    "ref": "CN-4821907",
    "status": "open",
    "awb": "176-12345675",
    "transport_mode": "air",
    "terminal": "Auckland Airport, cargo terminal",
    "release_at": "2026-09-23T18:30:00.000Z",
    "flight_or_vessel": "NZ288",
    "origin_country": "CN",
    "entry_depot": "AKL",
    "piece_count": 3,
    "pieces_collected": null,
    "collected_at": null,
    "shipments": [
      {
        "tracking_number": "6419889849330251",
        "consignment_seq": 1,
        "status": "booked",
        "partner_tracking_number": "XB88213551",
        "customer_reference": null,
        "receiver_city": "Wellington"
      }
    ]
  }
}

status goes open, collection_booked, collected, then closed once every parcel has been scanned in. Each parcel gets the public event freight_collected when the freight leaves the terminal.

Print a label

GET /shipments/{tracking_number}/label returns one 100 × 150 mm label: format=pdf (the default) or format=zpl for a 203 dpi thermal printer. It carries a Code 128 barcode of the tracking number and a QR code. A parcel that is not booked and paid for answers 409 label_not_available.

RequestPDF
curl -s "https://point2point.nz/api/v1/shipments/6419889849330251/label?format=pdf" \
  -H "Authorization: Bearer $P2P_KEY" -o label.pdf
RequestZPL
curl -s "https://point2point.nz/api/v1/shipments/6419889849330251/label?format=zpl" \
  -H "Authorization: Bearer $P2P_KEY"

label_url on every shipment is the same PDF without a key, by a private token, so a print station can open it. Add &format=zpl for ZPL. PDF and ZPL print Latin letters, including macrons. Any other script prints as ?: label_page_url is a printable web page that shows every script.

List shipments

GET /shipments lists shipments on your account, newest first.

RequestGET /shipments
curl -s "https://point2point.nz/api/v1/shipments?status=booked,in_transit&per_page=25" \
  -H "Authorization: Bearer $P2P_KEY"
List query parameters
ParameterNotes
pageDefault 1.
per_pageDefault 25, maximum 100.
statusOne status, or several separated by commas: status=booked,in_transit.
qSearches the tracking number, customer reference, names and city.
batch_idShipments from one manifest.
created_from, created_toYYYY-MM-DD, New Zealand dates, inclusive.
partner_tracking_numberFind a parcel by your overseas partner’s number.
Response200 OK
{
  "data": [
    {
      "tracking_number": "6419889849330251",
      "status": "booked",
      "...": "shipment object without events"
    }
  ],
  "pagination": { "page": 1, "per_page": 25, "total": 1, "pages": 1 }
}

Get a shipment

GET /shipments/{tracking_number} returns { "shipment": { … } } with its events, newest first. A number that is not on your account returns 404 not_found.

RequestGET /shipments/{tracking_number}
curl -s https://point2point.nz/api/v1/shipments/6419889849330251 \
  -H "Authorization: Bearer $P2P_KEY"

Every shipment also says where the parcel is. These fields were added without changing any existing ones:

Where the parcel is
FieldNotes
stagebooked, arrived_nz, cleared, with_us, on_the_move, at_depot, out, delivered, returning or returned.
custodyWho has it: sender, pickup_driver, depot, linehaul, driver, receiver or returned.
current_depotThe depot code while it is at a depot, such as AKL or WLG.
last_scan_atWhen we last scanned it.
attempts, next_attempt_date, held_untilDelivery attempts (we try twice), the next try, and the last day to collect a held parcel.
eta{ "kind", "date" }. kind is late when it is running behind the first estimate.
exceptionAn open problem you should know about (damaged, address_query, customs_hold, missort), else null.
proof_of_delivery.phototrue when there is a proof photo.

Events carry a code and a depot_code. Internal notes, scans, driver names, run numbers and cage references are never included.

Cancel a shipment

POST /shipments/{tracking_number}/cancel works only before the parcel enters our network, while it is awaiting_payment or booked. After pickup the response is 409 not_cancellable. The body is optional.

RequestPOST /shipments/{tracking_number}/cancel
curl -s -X POST https://point2point.nz/api/v1/shipments/6419889849330251/cancel \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d '{"reason":"Order cancelled"}'
Response200 OK
{
  "shipment": {
    "tracking_number": "6419889849330251",
    "status": "cancelled",
    "cancelled_at": "2026-09-24T12:40:02.118Z",
    "...": "..."
  },
  "refund": null
}

refund is { "payment_id", "amount_cents", "status" } when a card payment was refunded, and null for account bookings, which are left off your invoice.

Partner events

POST /shipments/{tracking_number}/events records what happens to an international parcel before it reaches our Auckland hub. It works for your own international shipments while they are booked, and returns 201 Created with the event.

RequestPOST /shipments/6433053874727194/events
{
  "code": "arrived_nz",
  "occurred_at": "2026-09-24T06:20:00+12:00",
  "location": "Auckland Airport"
}
Partner event fields
FieldRequiredNotes
codeYesarrived_nz (Arrived in New Zealand), customs_hold (Held for border checks) or customs_cleared (Cleared by NZ Customs and MPI).
occurred_atNoISO 8601, not in the future. Defaults to now.
locationNoUp to 120 characters.
descriptionNoUp to 300 characters. Defaults to our standard wording.
Response201 Created
{
  "event": {
    "code": "arrived_nz",
    "status": "booked",
    "title": "Arrived in New Zealand",
    "description": "It has landed and is going through border checks.",
    "location": "Auckland Airport",
    "depot_code": null,
    "occurred_at": "2026-09-23T18:20:00.000Z"
  },
  "shipment": { "tracking_number": "6433053874727194", "stage": "arrived_nz", "…": "…" }
}

A shipment that is not yours returns 404. A domestic shipment, or one already in our network, returns 409. A bad code or time returns 422 with the field.

Proof photo

GET /shipments/{tracking_number}/proof-photo returns the photo our driver took at delivery, as an image. It is 404 when there is no photo, and it is sent with Cache-Control: private, no-store: keep your own copy if you need it later.

Public tracking

GET /tracking/{tracking_number} works for your own parcels, by the 16-digit tracking number, the query code, an old P2P number or your partner number. It returns the same data as the tracking page, including the journey, and never includes names, street addresses, phone numbers, email addresses, driver names, the query code or the parcel code. stage runs from 0 (booked) to 4 (delivered), and is -1 for awaiting payment or cancelled.

Tracking is private: any other parcel needs the number and one detail, sent with POST /tracking as proof: the receiver’s surname (name), the delivery postcode, the delivery suburb or town (place), or the 6-digit parcel code. A parcel with a parcel code needs the code. A wrong detail and an unknown number both answer 404 no_match; a right name for a parcel with a code answers 422 need_code; ten wrong details in an hour answer 423 locked for an hour. Look-ups with a detail are limited to 20 per 10 minutes per key.

RequestGET /tracking/{tracking_number}
curl -s https://point2point.nz/api/v1/tracking/6419889849330251 \
  -H "Authorization: Bearer $P2P_KEY"
RequestPOST /tracking
curl -s -X POST https://point2point.nz/api/v1/tracking \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d '{"number":"6419889849330251","proof":{"postcode":"6012"}}'
Response200 OK
{
  "tracking": {
    "tracking_number": "6419889849330251",
    "status": "booked",
    "status_label": "Booked",
    "status_tone": "info",
    "stage": 0,
    "service": "overnight",
    "service_label": "Overnight",
    "international": false,
    "origin": {
      "city": "Hamilton",
      "region": "waikato",
      "region_label": "Waikato",
      "depot": "Hamilton"
    },
    "destination": {
      "suburb": "Kelburn",
      "city": "Wellington",
      "region": "wellington",
      "region_label": "Wellington",
      "depot": "Wellington",
      "is_rural": false
    },
    "weight": "1.2 kg",
    "signature_required": false,
    "estimated_delivery": "Next business day",
    "booked_at": "2026-09-24T12:35:36.563Z",
    "delivered_at": null,
    "proof_of_delivery": null,
    "held_at": null,
    "can_request_delivery_options": true,
    "events": [
      {
        "status": "booked",
        "status_label": "Booked",
        "code": "booking_confirmed",
        "title": "Booking confirmed",
        "description": "Label created. We will scan the parcel when it enters our network.",
        "location": "Hamilton",
        "occurred_at": "2026-09-24T12:35:36.563Z"
      }
    ]
  }
}

Webhooks

Register endpoints in the business dashboard under Account › Business › Webhooks. You can have up to 5. Each endpoint gets its own signing secret, starting whsec_, and subscribes to any of these events:

Webhook events
EventSent when
shipment.createdA shipment is booked on your account, from the website, a bulk upload or the API.
shipment.status_changedAny status change, including booked after payment, picked_up, in_transit, at_depot, out_for_delivery, delivery_failed, held_at_depot, delivered, returned_to_sender and cancelled.
shipment.deliveredThe parcel is delivered. Sent as well as the status change.
shipment.eventOpt in. Every public tracking event, including the ones that do not change the status: arrived at a hub, left on the linehaul, partner milestones, a redelivery booked. Tick it when you add or edit an endpoint.

The dashboard’s Send test button sends a webhook.test event.

Tracking events

shipment.status_changed carries the event behind the change, and shipment.event sends { "shipment", "event" } for every public event:

The event objectdata.event
{
  "code": "departed_hub",
  "title": "Left our Auckland hub for our Christchurch hub",
  "description": "On the inter-island linehaul.",
  "location": "Auckland hub, Māngere",
  "depot_code": "AKL",
  "to_depot_code": "CHC",
  "occurred_at": "2026-09-24T10:40:00.000Z"
}

Codes you will see include pre_advice, arrived_nz, customs_cleared, picked_up, dropped_off, inducted, arrived_origin_depot, departed_hub, arrived_hub, arrived_depot, out_for_delivery, delivered, collected, delivery_attempted, held_at_depot, redelivery_booked and rts_started. Treat codes you do not know as information only.

Delivery

We send an HTTP POST with a JSON body and these headers. Every delivery is signed with HMAC-SHA256 in the X-P2P-Signature header.

Delivery headersPOST
Content-Type: application/json
User-Agent: Point2Point-Webhooks/1.0
X-P2P-Event: shipment.status_changed
X-P2P-Delivery: evt_5d0c8f1e2a7b4c3d9e6f1a2b
X-P2P-Signature: t=1790253336,v1=5f2b0d6c…e91a
Webhook bodyshipment.status_changed
{
  "id": "evt_5d0c8f1e2a7b4c3d9e6f1a2b",
  "type": "shipment.status_changed",
  "created_at": "2026-09-24T02:14:09.000Z",
  "data": {
    "shipment": {
      "tracking_number": "6432227315859961",
      "tracking_number_display": "6432 2273 1585 9961",
      "status": "delivered",
      "status_label": "Delivered",
      "service": "economy",
      "international": true,
      "...": "same shape as the API shipment object"
    },
    "previous_status": "out_for_delivery"
  }
}

Reply with any 2xx within 5 seconds. Each attempt is recorded, with its status code, error and duration, in the delivery log in your dashboard. Redirects are not followed. If your endpoint does not answer 2xx we try again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 24 hours: seven tries over about 32 hours, with the same id and body, a fresh signature, and X-P2P-Attempt from the second try. A paused endpoint’s retries wait until you resume it. After the last try you can send any delivery again with Replay in the delivery log, or use GET /shipments/{tracking_number} to reconcile. De-duplicate on id. In production, endpoints must use https and cannot point at private or local network addresses.

Verifying signatures

X-P2P-Signature is t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256(secret, "<t>.<raw request body>"). Compute it over the raw body bytes before any JSON parsing, compare in constant time, and reject timestamps more than 5 minutes old.

Signature check in Node.js with Express
const crypto = require('node:crypto');
const express = require('express');

const SECRET = process.env.P2P_WEBHOOK_SECRET; // whsec_...

function verifyP2PSignature(header, rawBody, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(String(header || '').split(',').map((kv) => kv.trim().split('=')));
  const t = Number(parts.t);
  if (!Number.isFinite(t) || !parts.v1) return false;
  if (Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  const a = Buffer.from(expected, 'hex');
  const b = Buffer.from(parts.v1, 'hex');
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

const app = express();
app.post('/hooks/p2p', express.raw({ type: 'application/json' }), (req, res) => {
  const raw = req.body.toString('utf8');
  if (!verifyP2PSignature(req.get('X-P2P-Signature'), raw, SECRET)) return res.status(400).send('bad signature');
  const event = JSON.parse(raw);
  // Handle event.type / event.data.shipment here, de-duplicating on event.id.
  res.sendStatus(204);
});

Test mode

Create a key marked Test in the dashboard. A p2p_test_ key runs the same code as a live key on a separate test database, so you can book, print labels and take webhooks before you go live.

  • Nothing is real: no pickups, no invoices, no emails or texts to anyone. Test parcels are never scanned by our depots.
  • Everything is marked. Answers carry X-P2P-Mode: test, shipments and webhook bodies carry "test_mode": true, and labels say TEST LABEL.
  • Every test booking goes straight to booked, whatever your account terms are.
  • Webhooks: add an endpoint marked Test parcels. Live endpoints never hear test parcels, and test endpoints never hear live ones.
  • Test parcels are cleared after 30 days, and each business can hold up to 5,000. tracking_url and label_page_url are null: use GET /tracking/{tracking_number} and label_url.

Move a test parcel along with POST /shipments/{tracking_number}/simulate. Send status: picked_up, in_transit, at_depot, out_for_delivery, delivered or delivery_failed. It goes through each step in between, and your webhooks fire at each one. With a live key this endpoint does not exist.

Requesttest keys only
curl -s -X POST https://point2point.nz/api/v1/shipments/6419889849330251/simulate \
  -H "Authorization: Bearer $P2P_KEY" -H "Content-Type: application/json" \
  -d '{"status":"delivered"}'

Questions about an integration? Email business@point2point.nz with your business name and the tracking number or request involved.