Labels, tracking and webhooks: what happens after a booking through the pallet shipping API

Not at booking: the agency attaches the label and the tracking link afterwards, with no guaranteed time. Sometimes none is attached, for example when the carrier brings its own. The API returns 409 until the label is ready, and a signed webhook or GET /events tells your software as soon as it arrives.

APITechnical documentation

On this page

FreightMaster (freightmaster.fr) books your pallets in the pallet network (LTL) with its partner carriers, at the rates of the InXpress network. After POST /shipments, the rest happens outside your software: the InXpress agency books with the carrier, attaches the label and the tracking link, then updates the status. Your software learns about it through the API's events.

What happens after the booking?

The booking responds straight away, with the status booked, a label in the pending state and tracking in the pending state. Your software therefore knows from the start that the label will come later. The agency receives the booking, books with the carrier, then attaches the PDF label and the tracking link in FreightMaster.

Lifecycle of a shipment booked through the APIBooking, confirmation by the agency, label attached afterwards with no guaranteed time, tracking link, pickup, delivery. Each step publishes an event.Booking through the APIPOST /shipments · status bookedlabel: pending, with expected_byshipment.bookedConfirmation by the agencystatus confirmedshipment.confirmedLabel attached by the agencyafterwards, no guaranteed timePDF · label: available, version 1shipment.label_availableTracking link attachedtracking: availableshipment.tracking_availablePickupstatus in_transitno label attached: not_providedshipment.in_transitDeliverystatus deliveredshipment.deliveredCan also happen at any time:label replaced or removed, tracking changed,change of carrier, of pickup dateor of price, cancellation lifted.
The most common order. The real order can vary: the label can come before the confirmation, and each event carries the complete shipment.

Each visible change produces an event, which you receive by webhook or read through GET /events. The events cover all the shipments of the account, booked through the API or on the portal: the channel field is api or portal.

What states can the label be in?

The label.status field of a shipment takes three values. Read it alongside the shipment status: a confirmed shipment may still be waiting for its label, and a shipment that left without one changes to not_provided.

label.statusWhat it meansWhat your software does
pendingNo label attached yet. For a booking made through the API, expected_by gives an indicative time returned by the API, with no commitment.Wait for shipment.label_available (webhook or GET /events). Do not hold the shipment back if the indicative time has passed.
availableA PDF is attached. Fields format (pdf), downloadable, url, version, updated_at.Download the PDF from url, with the same API key. Print it again when version increases.
not_providedThe shipment is in transit or delivered with no label attached in FreightMaster, for example because the carrier brought its own.Stop waiting for this shipment's label.

expected_by is an indicative time returned by the API, with no commitment. It helps your software decide when to look again, nothing more: once that time has passed, the label can still arrive, or never be attached if the carrier brings its own.

How do I download the label?

When label.status is available and label.downloadable is true, call the URL given in label.url, of the form GET /api/v1/shipments/{id}/label, with the same API key. The response is the PDF (application/pdf).

Until the label is ready, the same URL responds 409 with the code label_not_ready and a Retry-After header in seconds: 900 in production, 60 in the sandbox. Respect it if you poll the URL; better still, wait for the event.

Real sandbox response, 7 November 2026, with Accept-Language: en:

HTTP/1.1 409 Conflict
Content-Type: application/problem+json; charset=utf-8
Retry-After: 60

{
  "type": "https://freightmaster.fr/api/erreurs#label_not_ready",
  "title": "Conflict",
  "status": 409,
  "code": "label_not_ready",
  "detail": "The label is not available yet. It is attached by the agency after booking.",
  "request_id": "req_94b9e691089e544d"
}

label.version is 1 when the PDF is attached, then increases each time the agency replaces it (event shipment.label_updated): the URL stays the same, print the new version. If the agency removes the label (shipment.label_removed), the state goes back to pending.

If the label was attached in a form the API does not serve, downloadable is false and the URL responds 409 with the code label_not_downloadable: get the label from your customer portal instead. The meaning of each code is on the API errors page.

What about the tracking link?

The agency also attaches the carrier's tracking link. The API publishes it in tracking: status (pending or available), url, and number when a number can be read. A number attached without a link comes out with url set to null.

The API does not publish a link that cannot track the shipment: a generic link with no number, or a link from a carrier other than the shipment's. Tracking then stays pending. The shipment.tracking_available and shipment.tracking_updated events announce published or changed tracking.

Which events does the API publish?

14 event types, all of the form shipment.*. Each event carries the whole shipment, as it is at that moment, in data.shipment: your software does not need to receive them in order to know the final state.

Event (type)What it signals
shipment.bookedThe booking is recorded (status booked).
shipment.confirmedThe agency has confirmed the shipment (status confirmed).
shipment.label_availableA PDF label is attached: label.status changes to available.
shipment.label_updatedThe label has been replaced: label.version increases, print it again.
shipment.label_removedThe label has been removed: label.status goes back to pending.
shipment.tracking_availableA tracking link or number is published.
shipment.tracking_updatedThe published tracking has changed.
shipment.in_transitThe shipment has been collected (status in_transit).
shipment.deliveredThe shipment is delivered (status delivered).
shipment.cancelledThe shipment is cancelled (status cancelled).
shipment.reinstatedA cancellation has been lifted: the shipment returns to its status.
shipment.carrier_changedThe shipment's carrier has changed, or has just been assigned.
shipment.pickup_date_changedThe pickup date has changed.
shipment.price_adjustedThe shipment's price has changed after booking.

An event has a stable identifier (id), a type, a sequence number (sequence), a date (created_at) and livemode. Sequence numbers increase per account, separately for production and for the sandbox. A real sandbox event, 7 November 2026 (excerpt: data.shipment holds the complete shipment, like GET /shipments/{id}):

{
  "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.label_available",
  "object": "event",
  "type": "shipment.label_available",
  "sequence": 128,
  "created_at": "2026-11-07T14:56:59.734Z",
  "livemode": false,
  "data": {
    "shipment": {
      "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
      "object": "shipment",
      "livemode": false,
      "channel": "api",
      "reference": "PO-12345",
      "status": "booked",
      "requested_pickup_date": "2026-11-09",
      "label": {
        "status": "available",
        "format": "pdf",
        "downloadable": true,
        "url": "https://freightmaster.fr/api/v1/shipments/shp_test_21a2cc4aa5d746ccaeabd1a7/label",
        "version": 1,
        "specimen": true
      },
      "tracking": { "status": "pending", "url": null, "number": null }
    }
  }
}

How do I read the GET /events stream?

GET /events is the channel to rely on. It returns the account's events in sequence-number order, with no gaps: an event written late takes the next number. Events can be read there for 90 days, 30 days in the sandbox.

  • after: sequence number already processed (0 to read everything again).
  • limit: from 1 to 100, 50 by default.
  • types: comma-separated list of types. The filter applies to the page read: next_cursor still moves on.

Real sandbox call, 7 November 2026, objects shortened:

GET https://freightmaster.fr/api/v1/events?after=126&limit=20
Authorization: Bearer fm_test_…

{
  "object": "list",
  "data": [
    { "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.booked", "type": "shipment.booked", "sequence": 127, … },
    { "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.label_available", "type": "shipment.label_available", "sequence": 128, … },
    { "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.tracking_available", "type": "shipment.tracking_available", "sequence": 129, … },
    { "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.in_transit", "type": "shipment.in_transit", "sequence": 130, … },
    { "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.delivered", "type": "shipment.delivered", "sequence": 131, … }
  ],
  "has_more": false,
  "next_cursor": "131"
}

Store next_cursor after each page processed, and call again with after set to that value while has_more is true. Keep one cursor per mode: production and the sandbox have separate sequences. A cursor reused when switching from test to production would skip the early real events, and with them labels.

How do I receive webhooks?

A webhook is a POST call from FreightMaster to your server, with the same event object as GET /events in the body. You declare the endpoint in your customer portal (“API” menu). The signing secret, which starts with whsec_, is shown once, at creation; to change it, delete the endpoint and create a new one.

RuleValue
Endpoints per account3 at most, each in production or test mode, created in your customer portal (“API” menu).
Events sentAll the events of the endpoint's mode, with no filter by type.
Accepted URLHTTPS, with no credentials in the URL. Private, local or metadata addresses are refused. No redirect is followed.
SuccessAn HTTP 2xx response within 10 seconds. Any other response, a redirect included, is a failure.
RetriesSent as soon as the event is written, then after 1 min, 5 min, 15 min, 30 min, 1 h, 2 h and 4 h, then every 6 h. Given up 72 h after the event.
DeactivationAfter 72 h of failures with no success at all, the endpoint is deactivated and the account told by e-mail. You reactivate it in the customer portal.
Monitoring“Test” button (webhook.test event), the 10 most recent deliveries with their HTTP code, resending a delivery.

Respond 2xx quickly, then process the event. The same event can arrive more than once, for example after a resend: de-duplicate on its id, also given in the FreightMaster-Event-Id header. The order of arrival is not guaranteed: rely on sequence. While an endpoint is deactivated, events no longer go out by webhook but can still be read through GET /events.

POST /your-webhook-endpoint HTTP/1.1
Content-Type: application/json; charset=utf-8
User-Agent: FreightMaster-Webhooks/1.0
FreightMaster-Signature: t=1794045601,v1=e73764c55e35fc8fa80c25f1381fbe0eb17c6ff9b28cd2a88065b661c52abce9
FreightMaster-Event-Id: evt_test_5f2c9a01b7d3
FreightMaster-Event-Type: webhook.test

How do I verify the signature?

The FreightMaster-Signature header has the form t=<Unix timestamp>,v1=<signature>. The signature is the HMAC-SHA256, in hexadecimal, of the string <t>.<body>, computed with the endpoint's secret. Each attempt is signed with its own timestamp.

  1. Read the raw body, byte for byte, before any JSON parsing: re-serialised JSON does not give the same signature.
  2. Compute the HMAC-SHA256 of t, a full stop and the raw body, with your whsec_… secret.
  3. Compare with v1 in constant time.
  4. Reject a timestamp that is too old: we recommend a gap of 5 minutes (300 seconds) at most.

A complete example, with a dummy secret and the exact body of the webhook.test event sent by the “Test” button:

Secret (dummy): whsec_exemple_documentation_non_valide
t: 1794045601
Raw body:
{"id":"evt_test_5f2c9a01b7d3","object":"event","type":"webhook.test","sequence":null,"created_at":"2026-11-07T10:00:00.000Z","livemode":false,"data":{"message":"Test de webhook FreightMaster / FreightMaster webhook test"}}
Expected signature (v1):
e73764c55e35fc8fa80c25f1381fbe0eb17c6ff9b28cd2a88065b661c52abce9

Verification in Node.js:

const crypto = require('crypto');

// header: value of FreightMaster-Signature; rawBody: the Buffer received, as it is.
function verifySignature(header, rawBody, secret, toleranceSec = 300, nowSec = Date.now() / 1000) {
  const parts = Object.fromEntries(String(header || '').split(',').map((p) => p.trim().split('=')));
  const t = Number(parts.t);
  if (!Number.isFinite(t) || !parts.v1) return false;
  if (Math.abs(nowSec - t) > toleranceSec) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.`).update(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);
}

Verification in Python:

import hashlib
import hmac
import time


def verify_signature(header, raw_body, secret, tolerance=300, now=None):
    """header: value of FreightMaster-Signature; raw_body: the bytes received, as they are."""
    try:
        parts = dict(p.strip().split("=", 1) for p in header.split(","))
        t = int(parts["t"])
        v1 = parts["v1"]
    except (KeyError, ValueError):
        return False
    if abs((now or time.time()) - t) > tolerance:
        return False
    expected = hmac.new(secret.encode("utf-8"), str(t).encode("ascii") + b"." + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, v1)

Both functions accept the example above and refuse a modified body or a timestamp older than 300 seconds. The same calculation works in any language with HMAC-SHA256.

How do I test without a real shipment?

With a test key fm_test_…, the quote is real and the booking simulated: no shipment is created, no agency is told. The cycle moves forward with time: specimen label after 2 minutes, tracking after 3, in transit after 5, delivered after 10. POST /test/shipments/{id}/advance moves one step forward per call. The sandbox does not publish shipment.confirmed.

Simulated steps are published when you read the API (GET /events, GET /shipments/{id}, the label) or call advance. Test webhooks then go out to your endpoints in test mode. The specimen label carries label.specimen: true: it is not valid for any shipment.

A quote, step by step, is on getting started with the API. To connect software already in place, see the integrations, software by software.

Price and cancellation after booking

Price guaranteed for 24 h if the booked shipment is identical, as long as the carrier still serves the shipment and the pickup date is still possible; otherwise, a new quote. The shipment.price_adjusted event signals a price change after booking; the new price is in data.shipment.price.

Cancellation depends on the label. With no label attached, POST /shipments/{id}/cancel cancels straight away (200, event shipment.cancelled). Once the label is attached, the response is 202: the request is passed to the agency, which cancels with the carrier, and the status changes once it has done so. A shipment in transit or delivered can no longer be cancelled (409). Ceilings and quotas are on the API limits page. The French version of this page: /api/suivi-etiquettes-webhooks.

Frequently asked questions

Does the API return the label at booking?
No. The booking responds with a label in the pending state. The agency attaches the PDF label afterwards, with no guaranteed time, and sometimes none is attached. A webhook or GET /events tells your software when it arrives.
What label format does the API provide?
The PDF that the agency attaches in FreightMaster, as it is. The API produces neither ZPL labels nor labels with your own barcodes. When the agency replaces the PDF, label.version increases: print it again.
What does not_provided mean?
The shipment has left, in transit or delivered, without any label having been attached in FreightMaster, for example because the carrier brought its own. Stop waiting for a label for that shipment.
Should I use webhooks or GET /events?
GET /events is the channel to rely on: it keeps all the account's events, in order, for 90 days. A webhook tells you sooner, but it can arrive twice or out of order, and a server that is down misses it. The safest approach: receive the webhooks and catch up through GET /events.
How do I test without booking a real shipment?
With a test key, which starts with fm_test_: the booking is simulated, a specimen label arrives after 2 minutes, tracking after 3, transit after 5 and delivery after 10. POST /test/shipments/{id}/advance moves one step forward per call. The steps are published when you read the API or call advance.
Can the price change after booking?
The shipment.price_adjusted event signals a price change after booking, with the new price in data.shipment.price. Before booking, the price is guaranteed for 24 h if the booked shipment is identical, as long as the carrier still serves the shipment and the pickup date is still possible; otherwise, a new quote.

Connect your software to the pallet network

A test key is enough to replay the whole cycle: simulated booking, specimen label, events and test webhooks. Business registered in France? Sign up on /inscription (form in French).