{
  "openapi": "3.1.0",
  "info": {
    "version": "1.0.0",
    "termsOfService": "https://freightmaster.fr/api/conditions",
    "contact": {
      "name": "FreightMaster",
      "email": "contact@freightmaster.fr",
      "url": "https://freightmaster.fr/api"
    },
    "x-fm-updated": "2026-11-07",
    "title": "FreightMaster API",
    "summary": "Quote, book and track pallet shipments from your software.",
    "description": "REST API in JSON to quote, book and track pallet shipments in the pallet network (LTL) from an ERP, a transport management system (TMS), a WMS or an online shop. Prices are those of your FreightMaster customer account: you open no contract with a carrier.\n\n**One server, two modes.** The prefix of the key selects the mode: `fm_live_…` (production) or `fm_test_…` (sandbox). In the sandbox, quotes are real, at the prices of your account, and bookings are simulated: no real shipment, no message to your agency. A test key is self-service in the customer portal, “API” menu. The production key opens after your agency has reviewed a test booking.\n\n**Who can book.** Real bookings are reserved for monthly-invoiced accounts whose agency has opened API booking. Other accounts can quote and test; an account paying by card can ask its agency for monthly invoicing from the portal. `GET /me` says what the key can do.\n\n**Authentication.** `Authorization: Bearer <key>`, never in the URL.\n\n**Errors.** `application/problem+json` (RFC 9457) with a stable `code`, a `type` link to its description and a `request_id`. Messages are in French by default, in English with `Accept-Language: en`. A body that is not valid JSON is rejected by the hosting platform before the API, with a generic HTML `400` page: check the `Content-Type` of an error response.\n\n**Conventions.** Field names in snake_case. Amounts in euros, two decimals, excluding VAT unless the name says `incl_vat`. Times in ISO 8601 UTC; calendar dates `YYYY-MM-DD`, Paris time.\n\n**Quote and price.** A quote is valid for 24 hours. The price is kept if the booked shipment is identical, as long as the carrier still serves the shipment and the pickup date is still possible; otherwise, request a new quote. The `shipment.price_adjusted` event reports a price change after booking.\n\n**Pickup.** On the next business day at the earliest (Paris time, French public holidays excluded). The date is requested, never guaranteed.\n\n**Idempotency.** `POST /shipments` requires `Idempotency-Key`: one key per order and per attempt (`PO-12345-1`, then `PO-12345-2` after a cancellation). Same key and same body for 48 hours: the first response is returned again.\n\n**Label and tracking.** The label is not created at booking: your agency attaches it afterwards, with no guaranteed time, and sometimes none is attached (for example when the carrier brings it at pickup). `label.expected_by` is an indicative time returned by the API, with no commitment. `GET /shipments/{shipment_id}/label` answers `409` until the label is ready.\n\n**Events.** Every change of a shipment produces an event, read with `GET /events` (reference channel, by sequence) or received by signed webhook. Test and production have separate sequences: keep one cursor per mode.\n\n**Carriers.** `carrier.id` is an open string. On some accounts, an offer is named “Partenaire Premium” (`premium_partner`), the trade name of a partner carrier.\n\n**Common errors.** Every endpoint can return `401 unauthorized`, `403 account_disabled`, `503 api_disabled` and `500 internal`; an unknown path returns `404 not_found`, a wrong method `405 method_not_allowed`.\n\n**Versions.** Compatible additions do not change the version: read responses without rejecting unknown fields. A breaking change opens `/v2`, with 12 months of overlap."
  },
  "servers": [
    {
      "url": "https://freightmaster.fr/api/v1",
      "description": "Single server. The prefix of the key selects the mode: `fm_live_` (production) or `fm_test_` (sandbox)."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Account",
      "x-displayName": "Account",
      "description": "Key, account and limits."
    },
    {
      "name": "Quotes",
      "x-displayName": "Quotes",
      "description": "Prices of the carriers for a shipment."
    },
    {
      "name": "Shipments",
      "x-displayName": "Shipments",
      "description": "Booking, state, label, cancellation."
    },
    {
      "name": "Events",
      "x-displayName": "Events",
      "description": "Changes of the shipments, by cursor."
    },
    {
      "name": "Sandbox",
      "x-displayName": "Sandbox",
      "description": "Test keys only."
    }
  ],
  "externalDocs": {
    "url": "https://freightmaster.fr/api/reference",
    "description": "Reference in HTML (French; English at /api/en/reference)."
  },
  "paths": {
    "/me": {
      "get": {
        "operationId": "getAccount",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "Account, capabilities and limits of the key",
        "description": "Returns the account of the key, whether it can book, its VAT regime and its limits. Quota: 120 reads per minute, per key.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "examples": {
                  "test_key": {
                    "value": {
                      "object": "account",
                      "livemode": false,
                      "key_id": "key_120b745f43056f60",
                      "account": {
                        "company": "Exemple Logistique SAS",
                        "currency": "EUR",
                        "vat": {
                          "regime": "fr_standard",
                          "rate_percent": 20
                        }
                      },
                      "capabilities": {
                        "can_quote": true,
                        "can_book": true
                      },
                      "limits": {
                        "quotes_per_minute": 60,
                        "quotes_per_day": 2000,
                        "bookings_per_hour": 20,
                        "bookings_per_day": 100,
                        "reads_per_minute": 120,
                        "cancellations_per_hour": 20,
                        "account_bookings_per_day": 10,
                        "account_bookings_per_month": 60,
                        "account_bookings_today": 0,
                        "account_bookings_this_month": 0,
                        "account_quotes_per_day": 200
                      }
                    },
                    "summary": "Test key (sandbox)"
                  },
                  "card_account_live_key": {
                    "value": {
                      "object": "account",
                      "livemode": true,
                      "key_id": "key_cc310f54544e6684",
                      "account": {
                        "company": "Exemple Logistique SAS",
                        "currency": "EUR",
                        "vat": {
                          "regime": "fr_standard",
                          "rate_percent": 20
                        }
                      },
                      "capabilities": {
                        "can_quote": true,
                        "can_book": false
                      },
                      "booking_blocked_reason": "card_prepayment",
                      "limits": {
                        "quotes_per_minute": 60,
                        "quotes_per_day": 2000,
                        "bookings_per_hour": 20,
                        "bookings_per_day": 100,
                        "reads_per_minute": 120,
                        "cancellations_per_hour": 20,
                        "account_bookings_per_day": 10,
                        "account_bookings_per_month": 60,
                        "account_bookings_today": 0,
                        "account_bookings_this_month": 0,
                        "account_quotes_per_day": 200
                      }
                    },
                    "summary": "Production key of an account paying by card"
                  }
                }
              }
            },
            "description": "The account."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/quotes": {
      "post": {
        "operationId": "createQuote",
        "tags": [
          "Quotes"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "examples": {
                "one_pallet": {
                  "value": {
                    "origin": {
                      "country": "FR",
                      "postal_code": "59000"
                    },
                    "destination": {
                      "country": "FR",
                      "postal_code": "69003"
                    },
                    "pallets": [
                      {
                        "quantity": 1,
                        "length_cm": 120,
                        "width_cm": 80,
                        "height_cm": 150,
                        "weight_kg": 300
                      }
                    ],
                    "reference": "PO-12345"
                  },
                  "summary": "One Euro pallet, Lille to Lyon"
                },
                "with_services": {
                  "value": {
                    "origin": {
                      "country": "FR",
                      "postal_code": "59000"
                    },
                    "destination": {
                      "country": "FR",
                      "postal_code": "69003"
                    },
                    "pickup_date": "2026-11-10",
                    "pallets": [
                      {
                        "quantity": 2,
                        "length_cm": 120,
                        "width_cm": 80,
                        "height_cm": 150,
                        "weight_kg": 300
                      }
                    ],
                    "services": {
                      "delivery_appointment": true,
                      "insurance": {
                        "declared_value": 5000
                      }
                    },
                    "reference": "PO-12346"
                  },
                  "summary": "Two pallets with delivery appointment and insurance"
                }
              }
            }
          }
        },
        "summary": "Quote a shipment",
        "description": "Returns the offers of the carriers for one shipment, at the prices of your account, sorted by total price, lowest first. The quote is valid for 24 hours. The number of offers depends on the route, the load and your account. When no carrier offers a rate, `offers` is empty and `unavailable` says why. With a test key, quotes are real. Quota: 60 quotes per minute and 2,000 per day, per key.",
        "x-fm-rate-limit": "quote",
        "responses": {
          "201": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                },
                "examples": {
                  "quote": {
                    "value": {
                      "quote_id": "qt_IpQdszegRUtiV40B",
                      "object": "quote",
                      "livemode": false,
                      "created_at": "2026-11-07T14:56:56.061Z",
                      "expires_at": "2026-11-08T14:56:56.061Z",
                      "currency": "EUR",
                      "reference": "PO-12345",
                      "pickup_date": "2026-11-09",
                      "route": {
                        "origin": {
                          "country": "FR",
                          "postal_code": "59000"
                        },
                        "destination": {
                          "country": "FR",
                          "postal_code": "69003"
                        }
                      },
                      "shipment": {
                        "pallet_count": 1,
                        "loading_meters": 0.4,
                        "actual_weight_kg": 300,
                        "volume_m3": 1.44
                      },
                      "offers": [
                        {
                          "offer_id": "of_mesm3XYcp_tu",
                          "carrier": {
                            "id": "dhl_freight",
                            "name": "DHL Freight"
                          },
                          "product": {
                            "id": "dhl_freight.pallet",
                            "name": "DHL Freight"
                          },
                          "chargeable_weight_kg": 300,
                          "price": {
                            "transport_excl_vat": 143.33,
                            "lines": [
                              {
                                "code": "fuel",
                                "label": "Fuel surcharge",
                                "amount": 23.65,
                                "rate_percent": 16.5
                              }
                            ],
                            "total_excl_vat": 166.98,
                            "vat": {
                              "regime": "fr_standard",
                              "rate_percent": 20,
                              "amount": 33.4
                            },
                            "total_incl_vat": 200.38
                          },
                          "notices": [],
                          "bookable": true,
                          "booking_url": "https://freightmaster.fr/simulateur?dep=59&dest=69&pal=120x80x150x300x1"
                        },
                        {
                          "offer_id": "of_WZ02g8-LdlaI",
                          "carrier": {
                            "id": "geodis",
                            "name": "GEODIS"
                          },
                          "product": {
                            "id": "geodis.standard",
                            "name": "GEODIS"
                          },
                          "chargeable_weight_kg": 300,
                          "price": {
                            "transport_excl_vat": 419.92,
                            "lines": [
                              {
                                "code": "urban_delivery",
                                "label": "Restricted urban area delivery",
                                "amount": 17.33
                              },
                              {
                                "code": "fuel",
                                "label": "Fuel surcharge",
                                "amount": 106.65,
                                "rate_percent": 24.39
                              }
                            ],
                            "total_excl_vat": 543.9,
                            "vat": {
                              "regime": "fr_standard",
                              "rate_percent": 20,
                              "amount": 108.78
                            },
                            "total_incl_vat": 652.68
                          },
                          "notices": [
                            {
                              "code": "urban_delivery_included",
                              "message": "Restricted urban area delivery: surcharge included."
                            }
                          ],
                          "bookable": true,
                          "booking_url": "https://freightmaster.fr/simulateur?dep=59&dest=69&pal=120x80x150x300x1"
                        }
                      ],
                      "unavailable": []
                    },
                    "summary": "Excerpt: two of the offers returned (sandbox, 2026-11-07)"
                  }
                }
              }
            },
            "description": "Quote created."
          },
          "400": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_json": {
                    "$ref": "#/components/examples/invalid_json"
                  }
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Generic HTML page of the hosting platform: a body that is not valid JSON, or a JSON value other than an object or an array, is rejected before the API. No problem object."
                }
              }
            },
            "description": "Bad request. A body sent with `Content-Type: application/json` that is not valid JSON, or that is a JSON value other than an object or an array (such as `null`), is rejected by the hosting platform before it reaches the API: the response is then a generic HTML page (`text/html`), without `code`, `request_id` or `X-Request-Id`. Check the `Content-Type` of an error response before reading it as a problem object.",
            "x-fm-error-codes": [
              "invalid_json"
            ]
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "413": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "$ref": "#/components/examples/payload_too_large"
                  }
                }
              }
            },
            "description": "Body too large.",
            "x-fm-error-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "$ref": "#/components/examples/unsupported_media_type"
                  }
                }
              }
            },
            "description": "Unsupported media type.",
            "x-fm-error-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "shipment_outside_limits": {
                    "$ref": "#/components/examples/shipment_outside_limits"
                  },
                  "validation_failed": {
                    "$ref": "#/components/examples/validation_failed"
                  }
                }
              }
            },
            "description": "Unprocessable request.",
            "x-fm-error-codes": [
              "shipment_outside_limits",
              "validation_failed"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_quote_limit_reached": {
                    "$ref": "#/components/examples/account_quote_limit_reached"
                  },
                  "daily_limit_reached": {
                    "$ref": "#/components/examples/daily_limit_reached"
                  },
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "account_quote_limit_reached",
              "daily_limit_reached",
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "502": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "engine_error": {
                    "$ref": "#/components/examples/engine_error"
                  }
                }
              }
            },
            "description": "Price calculation failed. Retry later.",
            "x-fm-error-codes": [
              "engine_error"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/quotes/{quote_id}": {
      "get": {
        "operationId": "getQuote",
        "tags": [
          "Quotes"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/QuoteId"
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "Read a quote",
        "description": "Returns a quote of your account, created with a key of the same mode. `expired` says whether it can still be booked. Quota: 120 reads per minute, per key, shared with the other reads.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                },
                "examples": {
                  "quote": {
                    "value": {
                      "quote_id": "qt_Yl1MZCDdknEncu6h",
                      "object": "quote",
                      "livemode": false,
                      "created_at": "2026-11-07T14:56:54.841Z",
                      "expires_at": "2026-11-08T14:56:54.841Z",
                      "currency": "EUR",
                      "reference": "PO-12345",
                      "pickup_date": "2026-11-09",
                      "route": {
                        "origin": {
                          "country": "FR",
                          "postal_code": "59000"
                        },
                        "destination": {
                          "country": "FR",
                          "postal_code": "69003"
                        }
                      },
                      "shipment": {
                        "pallet_count": 1,
                        "loading_meters": 0.4,
                        "actual_weight_kg": 300,
                        "volume_m3": 1.44
                      },
                      "offers": [
                        {
                          "offer_id": "of_5w5LRL-p9Mp-",
                          "carrier": {
                            "id": "dhl_freight",
                            "name": "DHL Freight"
                          },
                          "product": {
                            "id": "dhl_freight.pallet",
                            "name": "DHL Freight"
                          },
                          "chargeable_weight_kg": 300,
                          "price": {
                            "transport_excl_vat": 143.33,
                            "lines": [
                              {
                                "code": "fuel",
                                "label": "Fuel surcharge",
                                "amount": 23.65,
                                "rate_percent": 16.5
                              }
                            ],
                            "total_excl_vat": 166.98,
                            "vat": {
                              "regime": "fr_standard",
                              "rate_percent": 20,
                              "amount": 33.4
                            },
                            "total_incl_vat": 200.38
                          },
                          "notices": [],
                          "bookable": true,
                          "booking_url": "https://freightmaster.fr/simulateur?dep=59&dest=69&pal=120x80x150x300x1"
                        },
                        {
                          "offer_id": "of_NFvz4wrdzW4I",
                          "carrier": {
                            "id": "geodis",
                            "name": "GEODIS"
                          },
                          "product": {
                            "id": "geodis.standard",
                            "name": "GEODIS"
                          },
                          "chargeable_weight_kg": 300,
                          "price": {
                            "transport_excl_vat": 419.92,
                            "lines": [
                              {
                                "code": "urban_delivery",
                                "label": "Restricted urban area delivery",
                                "amount": 17.33
                              },
                              {
                                "code": "fuel",
                                "label": "Fuel surcharge",
                                "amount": 106.65,
                                "rate_percent": 24.39
                              }
                            ],
                            "total_excl_vat": 543.9,
                            "vat": {
                              "regime": "fr_standard",
                              "rate_percent": 20,
                              "amount": 108.78
                            },
                            "total_incl_vat": 652.68
                          },
                          "notices": [
                            {
                              "code": "urban_delivery_included",
                              "message": "Restricted urban area delivery: surcharge included."
                            }
                          ],
                          "bookable": true,
                          "booking_url": "https://freightmaster.fr/simulateur?dep=59&dest=69&pal=120x80x150x300x1"
                        }
                      ],
                      "unavailable": [],
                      "expired": false
                    },
                    "summary": "Excerpt: two offers"
                  }
                }
              }
            },
            "description": "The quote."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "404": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "quote_not_found": {
                    "$ref": "#/components/examples/quote_not_found"
                  }
                }
              }
            },
            "description": "Not found.",
            "x-fm-error-codes": [
              "quote_not_found"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/shipments": {
      "post": {
        "operationId": "createShipment",
        "tags": [
          "Shipments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShipmentRequest"
              },
              "examples": {
                "booking": {
                  "value": {
                    "quote_id": "qt_Yl1MZCDdknEncu6h",
                    "offer_id": "of_5w5LRL-p9Mp-",
                    "shipper": {
                      "company": "Exemple Expéditeur SAS",
                      "contact": "Claire Martin",
                      "phone": "+33 3 20 00 00 00",
                      "email": "expedition@exemple.fr",
                      "address": "12 rue Nationale",
                      "postal_code": "59000",
                      "city": "Lille",
                      "country": "FR",
                      "country_name": "France"
                    },
                    "consignee": {
                      "company": "Exemple Destinataire SARL",
                      "contact": "Paul Durand",
                      "phone": "+33 4 72 00 00 00",
                      "email": "reception@exemple.fr",
                      "address": "8 rue Garibaldi",
                      "postal_code": "69003",
                      "city": "Lyon",
                      "country": "FR",
                      "country_name": "France"
                    },
                    "goods_description": "Machine parts on a stretch-wrapped pallet",
                    "reference": "PO-12345"
                  },
                  "summary": "Booking of the first offer"
                }
              }
            }
          }
        },
        "summary": "Book an offer",
        "description": "Books one offer of a quote. Production key: real booking, for a monthly-invoiced account whose agency has opened API booking and has reviewed a test booking; a booking limit applies per account (per day and per month). Test key: simulated booking, for every account. Country, postal codes, pallets, services and pickup date are those of the quote. The price is the quoted one if the shipment is identical, as long as the carrier still serves it and the pickup date is still possible; otherwise, `409 offer_no_longer_available` or `422 pickup_date_not_allowed`: request a new quote. The response comes at once with `status: booked` and a pending label. Quota: 20 bookings per hour, per key (a replay of the same request does not count).",
        "x-fm-rate-limit": "book",
        "responses": {
          "201": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Idempotent-Replayed": {
                "$ref": "#/components/headers/IdempotentReplayed"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                },
                "examples": {
                  "simulated_booking": {
                    "value": {
                      "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                      "object": "shipment",
                      "livemode": false,
                      "channel": "api",
                      "reference": "PO-12345",
                      "status": "booked",
                      "booked_at": "2026-11-07T14:56:56.846Z",
                      "updated_at": "2026-11-07T14:56:56.846Z",
                      "requested_pickup_date": "2026-11-09",
                      "carrier": {
                        "id": "dhl_freight",
                        "name": "DHL Freight"
                      },
                      "shipper": {
                        "company": "Exemple Expéditeur SAS",
                        "contact": "Claire Martin",
                        "phone": "+33 3 20 00 00 00",
                        "email": "expedition@exemple.fr",
                        "address": "12 rue Nationale",
                        "postal_code": "59000",
                        "city": "Lille",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "consignee": {
                        "company": "Exemple Destinataire SARL",
                        "contact": "Paul Durand",
                        "phone": "+33 4 72 00 00 00",
                        "email": "reception@exemple.fr",
                        "address": "8 rue Garibaldi",
                        "postal_code": "69003",
                        "city": "Lyon",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "pallets": [
                        {
                          "length_cm": 120,
                          "width_cm": 80,
                          "height_cm": 150,
                          "weight_kg": 300
                        }
                      ],
                      "price": {
                        "total_excl_vat": 166.98,
                        "vat": {
                          "regime": "fr_standard",
                          "rate_percent": 20,
                          "amount": 33.4
                        },
                        "total_incl_vat": 200.38,
                        "currency": "EUR"
                      },
                      "label": {
                        "status": "pending",
                        "expected_by": "2026-11-09T11:00:00.000Z"
                      },
                      "tracking": {
                        "status": "pending",
                        "url": null,
                        "number": null
                      }
                    },
                    "summary": "Simulated booking (sandbox, 2026-11-07)"
                  }
                }
              }
            },
            "description": "Shipment booked (or replay of the same request)."
          },
          "400": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "idempotency_key_required": {
                    "$ref": "#/components/examples/idempotency_key_required"
                  },
                  "invalid_json": {
                    "$ref": "#/components/examples/invalid_json"
                  }
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Generic HTML page of the hosting platform: a body that is not valid JSON, or a JSON value other than an object or an array, is rejected before the API. No problem object."
                }
              }
            },
            "description": "Bad request. A body sent with `Content-Type: application/json` that is not valid JSON, or that is a JSON value other than an object or an array (such as `null`), is rejected by the hosting platform before it reaches the API: the response is then a generic HTML page (`text/html`), without `code`, `request_id` or `X-Request-Id`. Check the `Content-Type` of an error response before reading it as a problem object.",
            "x-fm-error-codes": [
              "idempotency_key_required",
              "invalid_json"
            ]
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  },
                  "agency_not_enrolled": {
                    "$ref": "#/components/examples/agency_not_enrolled"
                  },
                  "booking_not_allowed": {
                    "$ref": "#/components/examples/booking_not_allowed"
                  },
                  "live_key_requires_review": {
                    "$ref": "#/components/examples/live_key_requires_review"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled",
              "agency_not_enrolled",
              "booking_not_allowed",
              "live_key_requires_review"
            ]
          },
          "404": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "offer_not_found": {
                    "$ref": "#/components/examples/offer_not_found"
                  },
                  "quote_not_found": {
                    "$ref": "#/components/examples/quote_not_found"
                  }
                }
              }
            },
            "description": "Not found.",
            "x-fm-error-codes": [
              "offer_not_found",
              "quote_not_found"
            ]
          },
          "409": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "idempotency_key_reused": {
                    "$ref": "#/components/examples/idempotency_key_reused_409"
                  },
                  "offer_no_longer_available": {
                    "$ref": "#/components/examples/offer_no_longer_available"
                  }
                }
              }
            },
            "description": "Conflict.",
            "x-fm-error-codes": [
              "idempotency_key_reused",
              "offer_no_longer_available"
            ]
          },
          "410": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "quote_expired": {
                    "$ref": "#/components/examples/quote_expired"
                  }
                }
              }
            },
            "description": "Gone.",
            "x-fm-error-codes": [
              "quote_expired"
            ]
          },
          "413": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "$ref": "#/components/examples/payload_too_large"
                  }
                }
              }
            },
            "description": "Body too large.",
            "x-fm-error-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "$ref": "#/components/examples/unsupported_media_type"
                  }
                }
              }
            },
            "description": "Unsupported media type.",
            "x-fm-error-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "idempotency_key_reused": {
                    "$ref": "#/components/examples/idempotency_key_reused_422"
                  },
                  "offer_not_bookable": {
                    "$ref": "#/components/examples/offer_not_bookable"
                  },
                  "pickup_date_not_allowed": {
                    "$ref": "#/components/examples/pickup_date_not_allowed"
                  },
                  "validation_failed": {
                    "$ref": "#/components/examples/validation_failed"
                  }
                }
              }
            },
            "description": "Unprocessable request.",
            "x-fm-error-codes": [
              "idempotency_key_reused",
              "offer_not_bookable",
              "pickup_date_not_allowed",
              "validation_failed"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_daily_limit_reached": {
                    "$ref": "#/components/examples/account_daily_limit_reached"
                  },
                  "account_monthly_limit_reached": {
                    "$ref": "#/components/examples/account_monthly_limit_reached"
                  },
                  "daily_limit_reached": {
                    "$ref": "#/components/examples/daily_limit_reached"
                  },
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "account_daily_limit_reached",
              "account_monthly_limit_reached",
              "daily_limit_reached",
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "502": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "engine_error": {
                    "$ref": "#/components/examples/engine_error"
                  }
                }
              }
            },
            "description": "Price calculation failed. Retry later.",
            "x-fm-error-codes": [
              "engine_error"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      },
      "get": {
        "operationId": "listShipments",
        "tags": [
          "Shipments"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Page size, 1 to 100."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "`next_cursor` of the previous page."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "examples": [
                "booked,confirmed"
              ]
            },
            "description": "Statuses to keep, separated by commas."
          },
          {
            "name": "reference",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Your reference, exact value."
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only shipments changed since this time."
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "List shipments",
        "description": "Shipments of your account, most recent first: booked through the API or in the portal (production key), or simulated (test key). Quota: 120 reads per minute, per key.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentList"
                },
                "examples": {
                  "page": {
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                          "object": "shipment",
                          "livemode": false,
                          "channel": "api",
                          "reference": "PO-12345",
                          "status": "delivered",
                          "booked_at": "2026-11-07T14:56:56.846Z",
                          "updated_at": "2026-11-07T14:57:02.043Z",
                          "requested_pickup_date": "2026-11-09",
                          "carrier": {
                            "id": "dhl_freight",
                            "name": "DHL Freight"
                          },
                          "shipper": {
                            "company": "Exemple Expéditeur SAS",
                            "contact": "Claire Martin",
                            "phone": "+33 3 20 00 00 00",
                            "email": "expedition@exemple.fr",
                            "address": "12 rue Nationale",
                            "postal_code": "59000",
                            "city": "Lille",
                            "country": "FR",
                            "country_name": "France"
                          },
                          "consignee": {
                            "company": "Exemple Destinataire SARL",
                            "contact": "Paul Durand",
                            "phone": "+33 4 72 00 00 00",
                            "email": "reception@exemple.fr",
                            "address": "8 rue Garibaldi",
                            "postal_code": "69003",
                            "city": "Lyon",
                            "country": "FR",
                            "country_name": "France"
                          },
                          "pallets": [
                            {
                              "length_cm": 120,
                              "width_cm": 80,
                              "height_cm": 150,
                              "weight_kg": 300
                            }
                          ],
                          "price": {
                            "total_excl_vat": 166.98,
                            "vat": {
                              "regime": "fr_standard",
                              "rate_percent": 20,
                              "amount": 33.4
                            },
                            "total_incl_vat": 200.38,
                            "currency": "EUR"
                          },
                          "label": {
                            "status": "available",
                            "format": "pdf",
                            "downloadable": true,
                            "url": "https://freightmaster.fr/api/v1/shipments/shp_test_21a2cc4aa5d746ccaeabd1a7/label",
                            "version": 1,
                            "specimen": true
                          },
                          "tracking": {
                            "status": "available",
                            "url": "https://freightmaster.fr/api",
                            "number": "TEST-AEABD1A7"
                          }
                        },
                        {
                          "id": "shp_test_5c18450607cb5d54ac01489b",
                          "object": "shipment",
                          "livemode": false,
                          "channel": "api",
                          "reference": "PO-12345",
                          "status": "delivered",
                          "booked_at": "2026-11-06T18:55:06.762Z",
                          "updated_at": "2026-11-06T18:55:10.365Z",
                          "requested_pickup_date": "2026-11-09",
                          "carrier": {
                            "id": "xpo",
                            "name": "XPO"
                          },
                          "shipper": {
                            "company": "Exemple Expéditeur SAS",
                            "contact": "Claire Martin",
                            "phone": "+33 2 40 00 00 00",
                            "email": "expedition@exemple.fr",
                            "address": "12 rue de la Marne",
                            "postal_code": "44000",
                            "city": "Nantes",
                            "country": "FR",
                            "country_name": "France"
                          },
                          "consignee": {
                            "company": "Exemple Destinataire SARL",
                            "contact": "Paul Durand",
                            "phone": "+33 4 72 00 00 00",
                            "email": "reception@exemple.fr",
                            "address": "8 rue Garibaldi",
                            "postal_code": "69003",
                            "city": "Lyon",
                            "country": "FR",
                            "country_name": "France"
                          },
                          "pallets": [
                            {
                              "length_cm": 120,
                              "width_cm": 80,
                              "height_cm": 150,
                              "weight_kg": 300
                            }
                          ],
                          "price": {
                            "total_excl_vat": 199.69,
                            "vat": {
                              "regime": "fr_standard",
                              "rate_percent": 20,
                              "amount": 39.94
                            },
                            "total_incl_vat": 239.63,
                            "currency": "EUR"
                          },
                          "label": {
                            "status": "available",
                            "format": "pdf",
                            "downloadable": true,
                            "url": "https://freightmaster.fr/api/v1/shipments/shp_test_5c18450607cb5d54ac01489b/label",
                            "version": 1,
                            "specimen": true
                          },
                          "tracking": {
                            "status": "available",
                            "url": "https://freightmaster.fr/api",
                            "number": "TEST-AC01489B"
                          }
                        }
                      ],
                      "has_more": true,
                      "next_cursor": "Mg"
                    },
                    "summary": "Sandbox, 2026-11-07"
                  }
                }
              }
            },
            "description": "A page of shipments."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/shipments/{shipment_id}": {
      "get": {
        "operationId": "getShipment",
        "tags": [
          "Shipments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ShipmentId"
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "Read a shipment",
        "description": "Full state of a shipment, including `label` and `tracking`. Quota: 120 reads per minute, per key.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                },
                "examples": {
                  "delivered": {
                    "value": {
                      "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                      "object": "shipment",
                      "livemode": false,
                      "channel": "api",
                      "reference": "PO-12345",
                      "status": "delivered",
                      "booked_at": "2026-11-07T14:56:56.846Z",
                      "updated_at": "2026-11-07T14:57:02.043Z",
                      "requested_pickup_date": "2026-11-09",
                      "carrier": {
                        "id": "dhl_freight",
                        "name": "DHL Freight"
                      },
                      "shipper": {
                        "company": "Exemple Expéditeur SAS",
                        "contact": "Claire Martin",
                        "phone": "+33 3 20 00 00 00",
                        "email": "expedition@exemple.fr",
                        "address": "12 rue Nationale",
                        "postal_code": "59000",
                        "city": "Lille",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "consignee": {
                        "company": "Exemple Destinataire SARL",
                        "contact": "Paul Durand",
                        "phone": "+33 4 72 00 00 00",
                        "email": "reception@exemple.fr",
                        "address": "8 rue Garibaldi",
                        "postal_code": "69003",
                        "city": "Lyon",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "pallets": [
                        {
                          "length_cm": 120,
                          "width_cm": 80,
                          "height_cm": 150,
                          "weight_kg": 300
                        }
                      ],
                      "price": {
                        "total_excl_vat": 166.98,
                        "vat": {
                          "regime": "fr_standard",
                          "rate_percent": 20,
                          "amount": 33.4
                        },
                        "total_incl_vat": 200.38,
                        "currency": "EUR"
                      },
                      "label": {
                        "status": "available",
                        "format": "pdf",
                        "downloadable": true,
                        "url": "https://freightmaster.fr/api/v1/shipments/shp_test_21a2cc4aa5d746ccaeabd1a7/label",
                        "version": 1,
                        "specimen": true
                      },
                      "tracking": {
                        "status": "available",
                        "url": "https://freightmaster.fr/api",
                        "number": "TEST-AEABD1A7"
                      }
                    },
                    "summary": "Simulated shipment, delivered (sandbox, 2026-11-07)"
                  }
                }
              }
            },
            "description": "The shipment."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "404": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "shipment_not_found": {
                    "$ref": "#/components/examples/shipment_not_found"
                  }
                }
              }
            },
            "description": "Not found.",
            "x-fm-error-codes": [
              "shipment_not_found"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/shipments/{shipment_id}/label": {
      "get": {
        "operationId": "getShipmentLabel",
        "tags": [
          "Shipments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ShipmentId"
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "Download the label (PDF)",
        "description": "Streams the PDF label. While your agency has not attached it: `409 label_not_ready` with `Retry-After`. Wait for `shipment.label_available` rather than polling. In the sandbox, the label is a specimen. Quota: 120 reads per minute, per key.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Content-Disposition": {
                "$ref": "#/components/headers/ContentDisposition"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              }
            },
            "description": "The PDF label."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "404": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "shipment_not_found": {
                    "$ref": "#/components/examples/shipment_not_found"
                  }
                }
              }
            },
            "description": "Not found.",
            "x-fm-error-codes": [
              "shipment_not_found"
            ]
          },
          "409": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "label_not_downloadable": {
                    "$ref": "#/components/examples/label_not_downloadable"
                  },
                  "label_not_ready": {
                    "$ref": "#/components/examples/label_not_ready"
                  }
                }
              }
            },
            "description": "Conflict.",
            "x-fm-error-codes": [
              "label_not_downloadable",
              "label_not_ready"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/shipments/{shipment_id}/cancel": {
      "post": {
        "operationId": "cancelShipment",
        "tags": [
          "Shipments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ShipmentId"
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRequest"
              },
              "examples": {
                "reason": {
                  "value": {
                    "reason": "Order cancelled by the customer"
                  },
                  "summary": "With a reason"
                }
              }
            }
          }
        },
        "summary": "Cancel a shipment",
        "description": "Before the label: immediate cancellation, `200` with the cancelled shipment. After the label: `202`, the request is passed on to your agency, which cancels with the carrier; the status does not change until then. In transit or delivered: `409 cannot_cancel`. To book the same order again, use a new Idempotency-Key (`PO-12345-2`). Quota: 20 cancellations per hour, per key.",
        "x-fm-rate-limit": "cancel",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                },
                "examples": {
                  "cancelled": {
                    "value": {
                      "id": "shp_test_85c8659ab5900689593b8a61",
                      "object": "shipment",
                      "livemode": false,
                      "channel": "api",
                      "reference": "PO-12345",
                      "status": "cancelled",
                      "booked_at": "2026-11-07T14:57:04.527Z",
                      "updated_at": "2026-11-07T14:57:04.527Z",
                      "requested_pickup_date": "2026-11-09",
                      "carrier": {
                        "id": "dhl_freight",
                        "name": "DHL Freight"
                      },
                      "shipper": {
                        "company": "Exemple Expéditeur SAS",
                        "contact": "Claire Martin",
                        "phone": "+33 3 20 00 00 00",
                        "email": "expedition@exemple.fr",
                        "address": "12 rue Nationale",
                        "postal_code": "59000",
                        "city": "Lille",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "consignee": {
                        "company": "Exemple Destinataire SARL",
                        "contact": "Paul Durand",
                        "phone": "+33 4 72 00 00 00",
                        "email": "reception@exemple.fr",
                        "address": "8 rue Garibaldi",
                        "postal_code": "69003",
                        "city": "Lyon",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "pallets": [
                        {
                          "length_cm": 120,
                          "width_cm": 80,
                          "height_cm": 150,
                          "weight_kg": 300
                        }
                      ],
                      "price": {
                        "total_excl_vat": 166.98,
                        "vat": {
                          "regime": "fr_standard",
                          "rate_percent": 20,
                          "amount": 33.4
                        },
                        "total_incl_vat": 200.38,
                        "currency": "EUR"
                      },
                      "label": {
                        "status": "pending",
                        "expected_by": "2026-11-09T11:00:00.000Z"
                      },
                      "tracking": {
                        "status": "pending",
                        "url": null,
                        "number": null
                      },
                      "cancelled_at": "2026-11-07T14:57:05.364Z"
                    },
                    "summary": "Cancelled before the label (sandbox, 2026-11-07)"
                  }
                }
              }
            },
            "description": "Shipment cancelled."
          },
          "202": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cancellation"
                },
                "examples": {
                  "requested": {
                    "value": {
                      "id": "shp_test_ddb67084a2a412fd4c533c89",
                      "object": "cancellation",
                      "status": "requested",
                      "livemode": false
                    },
                    "summary": "Cancellation requested after the label"
                  }
                }
              }
            },
            "description": "Cancellation requested from your agency."
          },
          "400": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_json": {
                    "$ref": "#/components/examples/invalid_json"
                  }
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Generic HTML page of the hosting platform: a body that is not valid JSON, or a JSON value other than an object or an array, is rejected before the API. No problem object."
                }
              }
            },
            "description": "Bad request. A body sent with `Content-Type: application/json` that is not valid JSON, or that is a JSON value other than an object or an array (such as `null`), is rejected by the hosting platform before it reaches the API: the response is then a generic HTML page (`text/html`), without `code`, `request_id` or `X-Request-Id`. Check the `Content-Type` of an error response before reading it as a problem object.",
            "x-fm-error-codes": [
              "invalid_json"
            ]
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  },
                  "booking_not_allowed": {
                    "$ref": "#/components/examples/booking_not_allowed"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled",
              "booking_not_allowed"
            ]
          },
          "404": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "shipment_not_found": {
                    "$ref": "#/components/examples/shipment_not_found"
                  }
                }
              }
            },
            "description": "Not found.",
            "x-fm-error-codes": [
              "shipment_not_found"
            ]
          },
          "409": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "already_cancelled": {
                    "$ref": "#/components/examples/already_cancelled"
                  },
                  "cannot_cancel": {
                    "$ref": "#/components/examples/cannot_cancel"
                  }
                }
              }
            },
            "description": "Conflict.",
            "x-fm-error-codes": [
              "already_cancelled",
              "cannot_cancel"
            ]
          },
          "413": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "$ref": "#/components/examples/payload_too_large"
                  }
                }
              }
            },
            "description": "Body too large.",
            "x-fm-error-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "$ref": "#/components/examples/unsupported_media_type"
                  }
                }
              }
            },
            "description": "Unsupported media type.",
            "x-fm-error-codes": [
              "unsupported_media_type"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "listEvents",
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "Sequence of the last event already read (`next_cursor`)."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Page size, 1 to 100."
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string",
              "examples": [
                "shipment.label_available,shipment.delivered"
              ]
            },
            "description": "Types to keep, separated by commas. The filter applies within each page: a page can hold fewer events than `limit`; always go on from `next_cursor`."
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "Read the event stream",
        "description": "Events of your account after the sequence `after`, in order. Reference channel: a system that missed a webhook, or cannot receive one, catches up here. Test and production keys read separate streams with separate sequences: keep one cursor per mode. Events are kept 90 days (30 days in the sandbox). Quota: 120 reads per minute, per key.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                },
                "examples": {
                  "page": {
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.booked",
                          "object": "event",
                          "type": "shipment.booked",
                          "sequence": 127,
                          "created_at": "2026-11-07T14:56:57.100Z",
                          "livemode": false,
                          "data": {
                            "shipment": {
                              "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                              "object": "shipment",
                              "livemode": false,
                              "channel": "api",
                              "reference": "PO-12345",
                              "status": "booked",
                              "booked_at": "2026-11-07T14:56:56.846Z",
                              "updated_at": "2026-11-07T14:56:56.846Z",
                              "requested_pickup_date": "2026-11-09",
                              "carrier": {
                                "id": "dhl_freight",
                                "name": "DHL Freight"
                              },
                              "shipper": {
                                "company": "Exemple Expéditeur SAS",
                                "contact": "Claire Martin",
                                "phone": "+33 3 20 00 00 00",
                                "email": "expedition@exemple.fr",
                                "address": "12 rue Nationale",
                                "postal_code": "59000",
                                "city": "Lille",
                                "country": "FR",
                                "country_name": "France"
                              },
                              "consignee": {
                                "company": "Exemple Destinataire SARL",
                                "contact": "Paul Durand",
                                "phone": "+33 4 72 00 00 00",
                                "email": "reception@exemple.fr",
                                "address": "8 rue Garibaldi",
                                "postal_code": "69003",
                                "city": "Lyon",
                                "country": "FR",
                                "country_name": "France"
                              },
                              "pallets": [
                                {
                                  "length_cm": 120,
                                  "width_cm": 80,
                                  "height_cm": 150,
                                  "weight_kg": 300
                                }
                              ],
                              "price": {
                                "total_excl_vat": 166.98,
                                "vat": {
                                  "regime": "fr_standard",
                                  "rate_percent": 20,
                                  "amount": 33.4
                                },
                                "total_incl_vat": 200.38,
                                "currency": "EUR"
                              },
                              "label": {
                                "status": "pending",
                                "expected_by": "2026-11-09T11:00:00.000Z"
                              },
                              "tracking": {
                                "status": "pending",
                                "url": null,
                                "number": null
                              }
                            }
                          }
                        },
                        {
                          "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",
                              "booked_at": "2026-11-07T14:56:56.846Z",
                              "updated_at": "2026-11-07T14:56:56.846Z",
                              "requested_pickup_date": "2026-11-09",
                              "carrier": {
                                "id": "dhl_freight",
                                "name": "DHL Freight"
                              },
                              "shipper": {
                                "company": "Exemple Expéditeur SAS",
                                "contact": "Claire Martin",
                                "phone": "+33 3 20 00 00 00",
                                "email": "expedition@exemple.fr",
                                "address": "12 rue Nationale",
                                "postal_code": "59000",
                                "city": "Lille",
                                "country": "FR",
                                "country_name": "France"
                              },
                              "consignee": {
                                "company": "Exemple Destinataire SARL",
                                "contact": "Paul Durand",
                                "phone": "+33 4 72 00 00 00",
                                "email": "reception@exemple.fr",
                                "address": "8 rue Garibaldi",
                                "postal_code": "69003",
                                "city": "Lyon",
                                "country": "FR",
                                "country_name": "France"
                              },
                              "pallets": [
                                {
                                  "length_cm": 120,
                                  "width_cm": 80,
                                  "height_cm": 150,
                                  "weight_kg": 300
                                }
                              ],
                              "price": {
                                "total_excl_vat": 166.98,
                                "vat": {
                                  "regime": "fr_standard",
                                  "rate_percent": 20,
                                  "amount": 33.4
                                },
                                "total_incl_vat": 200.38,
                                "currency": "EUR"
                              },
                              "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
                              }
                            }
                          }
                        }
                      ],
                      "has_more": true,
                      "next_cursor": "128"
                    },
                    "summary": "Excerpt: two events (sandbox, 2026-11-07)"
                  }
                }
              }
            },
            "description": "A page of events."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    },
    "/test/shipments/{shipment_id}/advance": {
      "post": {
        "operationId": "advanceTestShipment",
        "tags": [
          "Sandbox"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ShipmentId"
          },
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "summary": "Sandbox: move a simulated shipment one step forward",
        "description": "Test keys only. A simulated shipment moves on with time: specimen label after 2 minutes, tracking after 3, in transit after 5, delivered after 10. Each call moves it one step at once and publishes the event of the step reached (label, tracking, in transit, delivered), with `livemode: false`; the sandbox never publishes `shipment.confirmed`. Without a call, the steps reached are published at your next read (`GET /events`, `GET /shipments/{shipment_id}`, the label). Quota: 120 reads per minute, per key.",
        "x-fm-rate-limit": "read",
        "responses": {
          "200": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                },
                "examples": {
                  "label_step": {
                    "value": {
                      "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                      "object": "shipment",
                      "livemode": false,
                      "channel": "api",
                      "reference": "PO-12345",
                      "status": "booked",
                      "booked_at": "2026-11-07T14:56:56.846Z",
                      "updated_at": "2026-11-07T14:56:56.846Z",
                      "requested_pickup_date": "2026-11-09",
                      "carrier": {
                        "id": "dhl_freight",
                        "name": "DHL Freight"
                      },
                      "shipper": {
                        "company": "Exemple Expéditeur SAS",
                        "contact": "Claire Martin",
                        "phone": "+33 3 20 00 00 00",
                        "email": "expedition@exemple.fr",
                        "address": "12 rue Nationale",
                        "postal_code": "59000",
                        "city": "Lille",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "consignee": {
                        "company": "Exemple Destinataire SARL",
                        "contact": "Paul Durand",
                        "phone": "+33 4 72 00 00 00",
                        "email": "reception@exemple.fr",
                        "address": "8 rue Garibaldi",
                        "postal_code": "69003",
                        "city": "Lyon",
                        "country": "FR",
                        "country_name": "France"
                      },
                      "pallets": [
                        {
                          "length_cm": 120,
                          "width_cm": 80,
                          "height_cm": 150,
                          "weight_kg": 300
                        }
                      ],
                      "price": {
                        "total_excl_vat": 166.98,
                        "vat": {
                          "regime": "fr_standard",
                          "rate_percent": 20,
                          "amount": 33.4
                        },
                        "total_incl_vat": 200.38,
                        "currency": "EUR"
                      },
                      "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
                      }
                    },
                    "summary": "After one step: specimen label (sandbox, 2026-11-07)"
                  }
                }
              }
            },
            "description": "The simulated shipment after the step."
          },
          "401": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WWWAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "$ref": "#/components/examples/unauthorized"
                  }
                }
              }
            },
            "description": "Missing or invalid key.",
            "x-fm-error-codes": [
              "unauthorized"
            ]
          },
          "403": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "account_disabled": {
                    "$ref": "#/components/examples/account_disabled"
                  },
                  "test_only": {
                    "$ref": "#/components/examples/test_only"
                  }
                }
              }
            },
            "description": "Forbidden.",
            "x-fm-error-codes": [
              "account_disabled",
              "test_only"
            ]
          },
          "404": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "shipment_not_found": {
                    "$ref": "#/components/examples/shipment_not_found"
                  }
                }
              }
            },
            "description": "Not found.",
            "x-fm-error-codes": [
              "shipment_not_found"
            ]
          },
          "409": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "already_cancelled": {
                    "$ref": "#/components/examples/already_cancelled"
                  }
                }
              }
            },
            "description": "Conflict.",
            "x-fm-error-codes": [
              "already_cancelled"
            ]
          },
          "429": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "$ref": "#/components/examples/rate_limited"
                  }
                }
              }
            },
            "description": "Too many requests. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "rate_limited"
            ]
          },
          "500": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal": {
                    "$ref": "#/components/examples/internal"
                  }
                }
              }
            },
            "description": "Internal error.",
            "x-fm-error-codes": [
              "internal"
            ]
          },
          "503": {
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "api_disabled": {
                    "$ref": "#/components/examples/api_disabled"
                  }
                }
              }
            },
            "description": "API temporarily disabled. Wait `Retry-After` seconds.",
            "x-fm-error-codes": [
              "api_disabled"
            ]
          }
        }
      }
    }
  },
  "webhooks": {
    "shipment.booked": {
      "post": {
        "operationId": "shipmentBookedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.booked"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "sandbox": {
                  "value": {
                    "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.booked",
                    "object": "event",
                    "type": "shipment.booked",
                    "sequence": 127,
                    "created_at": "2026-11-07T14:56:57.100Z",
                    "livemode": false,
                    "data": {
                      "shipment": {
                        "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                        "object": "shipment",
                        "livemode": false,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "booked",
                        "booked_at": "2026-11-07T14:56:56.846Z",
                        "updated_at": "2026-11-07T14:56:56.846Z",
                        "requested_pickup_date": "2026-11-09",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T11:00:00.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Sandbox, 2026-11-07"
                },
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.booked.0b1f3c5a7d9e",
                    "object": "event",
                    "type": "shipment.booked",
                    "sequence": 53,
                    "created_at": "2026-11-09T08:12:41.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "booked",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T08:12:41.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.booked",
        "description": "Shipment booked (through the API or in the portal). Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.booked"
      }
    },
    "shipment.confirmed": {
      "post": {
        "operationId": "shipmentConfirmedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.confirmed"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.confirmed.4c2a9e1d7b3f",
                    "object": "event",
                    "type": "shipment.confirmed",
                    "sequence": 54,
                    "created_at": "2026-11-09T09:40:12.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T09:40:12.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.confirmed",
        "description": "Shipment validated by your agency. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.confirmed"
      }
    },
    "shipment.label_available": {
      "post": {
        "operationId": "shipmentLabelAvailableWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.label_available"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "sandbox": {
                  "value": {
                    "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",
                        "booked_at": "2026-11-07T14:56:56.846Z",
                        "updated_at": "2026-11-07T14:56:56.846Z",
                        "requested_pickup_date": "2026-11-09",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "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
                        }
                      }
                    }
                  },
                  "summary": "Sandbox, 2026-11-07"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.label_available",
        "description": "Label attached by your agency: download it with `GET /shipments/{shipment_id}/label`. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.label_available"
      }
    },
    "shipment.label_updated": {
      "post": {
        "operationId": "shipmentLabelUpdatedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.label_updated"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.label_updated.2e8b4d6f1a3c",
                    "object": "event",
                    "type": "shipment.label_updated",
                    "sequence": 55,
                    "created_at": "2026-11-09T10:05:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T10:05:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "available",
                          "format": "pdf",
                          "downloadable": true,
                          "url": "https://freightmaster.fr/api/v1/shipments/shp_api3f9c2e7d1b4a6c8e0f2a4b6c/label",
                          "version": 2,
                          "updated_at": "2026-11-09T10:05:00.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.label_updated",
        "description": "Label replaced: `label.version` has increased. Reprint it. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.label_updated"
      }
    },
    "shipment.label_removed": {
      "post": {
        "operationId": "shipmentLabelRemovedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.label_removed"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.label_removed.7f1c3e5a9b2d",
                    "object": "event",
                    "type": "shipment.label_removed",
                    "sequence": 56,
                    "created_at": "2026-11-09T10:20:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T10:20:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.label_removed",
        "description": "Label removed by your agency. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.label_removed"
      }
    },
    "shipment.tracking_available": {
      "post": {
        "operationId": "shipmentTrackingAvailableWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.tracking_available"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "sandbox": {
                  "value": {
                    "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.tracking_available",
                    "object": "event",
                    "type": "shipment.tracking_available",
                    "sequence": 129,
                    "created_at": "2026-11-07T14:57:00.844Z",
                    "livemode": false,
                    "data": {
                      "shipment": {
                        "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                        "object": "shipment",
                        "livemode": false,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "booked",
                        "booked_at": "2026-11-07T14:56:56.846Z",
                        "updated_at": "2026-11-07T14:56:59.788Z",
                        "requested_pickup_date": "2026-11-09",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "available",
                          "format": "pdf",
                          "downloadable": true,
                          "url": "https://freightmaster.fr/api/v1/shipments/shp_test_21a2cc4aa5d746ccaeabd1a7/label",
                          "version": 1,
                          "specimen": true
                        },
                        "tracking": {
                          "status": "available",
                          "url": "https://freightmaster.fr/api",
                          "number": "TEST-AEABD1A7"
                        }
                      }
                    }
                  },
                  "summary": "Sandbox, 2026-11-07"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.tracking_available",
        "description": "Tracking link or number available. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.tracking_available"
      }
    },
    "shipment.tracking_updated": {
      "post": {
        "operationId": "shipmentTrackingUpdatedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.tracking_updated"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.tracking_updated.8b2d4f6a1c3e",
                    "object": "event",
                    "type": "shipment.tracking_updated",
                    "sequence": 57,
                    "created_at": "2026-11-09T11:00:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T11:00:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "available",
                          "format": "pdf",
                          "downloadable": true,
                          "url": "https://freightmaster.fr/api/v1/shipments/shp_api3f9c2e7d1b4a6c8e0f2a4b6c/label",
                          "version": 1,
                          "updated_at": "2026-11-09T09:40:12.000Z"
                        },
                        "tracking": {
                          "status": "available",
                          "url": "https://www.dhl.com/fr-fr/home/suivi.html?tracking-id=FRT-4471299",
                          "number": "FRT-4471299"
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.tracking_updated",
        "description": "Tracking link or number changed. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.tracking_updated"
      }
    },
    "shipment.in_transit": {
      "post": {
        "operationId": "shipmentInTransitWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.in_transit"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "sandbox": {
                  "value": {
                    "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.in_transit",
                    "object": "event",
                    "type": "shipment.in_transit",
                    "sequence": 130,
                    "created_at": "2026-11-07T14:57:01.481Z",
                    "livemode": false,
                    "data": {
                      "shipment": {
                        "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                        "object": "shipment",
                        "livemode": false,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "in_transit",
                        "booked_at": "2026-11-07T14:56:56.846Z",
                        "updated_at": "2026-11-07T14:57:00.896Z",
                        "requested_pickup_date": "2026-11-09",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "available",
                          "format": "pdf",
                          "downloadable": true,
                          "url": "https://freightmaster.fr/api/v1/shipments/shp_test_21a2cc4aa5d746ccaeabd1a7/label",
                          "version": 1,
                          "specimen": true
                        },
                        "tracking": {
                          "status": "available",
                          "url": "https://freightmaster.fr/api",
                          "number": "TEST-AEABD1A7"
                        }
                      }
                    }
                  },
                  "summary": "Sandbox, 2026-11-07"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.in_transit",
        "description": "Shipment in transit. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.in_transit"
      }
    },
    "shipment.delivered": {
      "post": {
        "operationId": "shipmentDeliveredWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.delivered"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "sandbox": {
                  "value": {
                    "id": "evt_shp_test_21a2cc4aa5d746ccaeabd1a7.delivered",
                    "object": "event",
                    "type": "shipment.delivered",
                    "sequence": 131,
                    "created_at": "2026-11-07T14:57:01.985Z",
                    "livemode": false,
                    "data": {
                      "shipment": {
                        "id": "shp_test_21a2cc4aa5d746ccaeabd1a7",
                        "object": "shipment",
                        "livemode": false,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "delivered",
                        "booked_at": "2026-11-07T14:56:56.846Z",
                        "updated_at": "2026-11-07T14:57:01.538Z",
                        "requested_pickup_date": "2026-11-09",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "available",
                          "format": "pdf",
                          "downloadable": true,
                          "url": "https://freightmaster.fr/api/v1/shipments/shp_test_21a2cc4aa5d746ccaeabd1a7/label",
                          "version": 1,
                          "specimen": true
                        },
                        "tracking": {
                          "status": "available",
                          "url": "https://freightmaster.fr/api",
                          "number": "TEST-AEABD1A7"
                        }
                      }
                    }
                  },
                  "summary": "Sandbox, 2026-11-07"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.delivered",
        "description": "Shipment delivered. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.delivered"
      }
    },
    "shipment.cancelled": {
      "post": {
        "operationId": "shipmentCancelledWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.cancelled"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.cancelled.1a3c5e7b9d2f",
                    "object": "event",
                    "type": "shipment.cancelled",
                    "sequence": 58,
                    "created_at": "2026-11-09T09:02:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "cancelled",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T09:02:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        },
                        "cancelled_at": "2026-11-09T09:02:00.000Z"
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.cancelled",
        "description": "Shipment cancelled. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.cancelled"
      }
    },
    "shipment.reinstated": {
      "post": {
        "operationId": "shipmentReinstatedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.reinstated"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.reinstated.4f6a8c1e3b5d",
                    "object": "event",
                    "type": "shipment.reinstated",
                    "sequence": 59,
                    "created_at": "2026-11-09T09:30:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T09:30:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.reinstated",
        "description": "A cancelled shipment is active again (cancellation reversed by your agency). Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.reinstated"
      }
    },
    "shipment.carrier_changed": {
      "post": {
        "operationId": "shipmentCarrierChangedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.carrier_changed"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.carrier_changed.2b4d6f8a1c3e",
                    "object": "event",
                    "type": "shipment.carrier_changed",
                    "sequence": 60,
                    "created_at": "2026-11-09T09:15:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T09:15:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "xpo",
                          "name": "XPO"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.carrier_changed",
        "description": "Carrier changed by your agency. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.carrier_changed"
      }
    },
    "shipment.pickup_date_changed": {
      "post": {
        "operationId": "shipmentPickupDateChangedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.pickup_date_changed"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.pickup_date_changed.9e1b3d5f7a2c",
                    "object": "event",
                    "type": "shipment.pickup_date_changed",
                    "sequence": 61,
                    "created_at": "2026-11-09T09:20:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-09T09:20:00.000Z",
                        "requested_pickup_date": "2026-11-12",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 166.98,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 33.4
                          },
                          "total_incl_vat": 200.38,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.pickup_date_changed",
        "description": "Requested pickup date changed by your agency. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.pickup_date_changed"
      }
    },
    "shipment.price_adjusted": {
      "post": {
        "operationId": "shipmentPriceAdjustedWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "shipment.price_adjusted"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "production": {
                  "value": {
                    "id": "evt_api3f9c2e7d1b4a6c8e0f2a4b6c.price_adjusted.5c7e9a2b4d6f",
                    "object": "event",
                    "type": "shipment.price_adjusted",
                    "sequence": 62,
                    "created_at": "2026-11-13T10:00:00.000Z",
                    "livemode": true,
                    "data": {
                      "shipment": {
                        "id": "shp_api3f9c2e7d1b4a6c8e0f2a4b6c",
                        "object": "shipment",
                        "livemode": true,
                        "channel": "api",
                        "reference": "PO-12345",
                        "status": "confirmed",
                        "booked_at": "2026-11-09T08:12:41.000Z",
                        "updated_at": "2026-11-13T10:00:00.000Z",
                        "requested_pickup_date": "2026-11-10",
                        "carrier": {
                          "id": "dhl_freight",
                          "name": "DHL Freight"
                        },
                        "shipper": {
                          "company": "Exemple Expéditeur SAS",
                          "contact": "Claire Martin",
                          "phone": "+33 3 20 00 00 00",
                          "email": "expedition@exemple.fr",
                          "address": "12 rue Nationale",
                          "postal_code": "59000",
                          "city": "Lille",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "consignee": {
                          "company": "Exemple Destinataire SARL",
                          "contact": "Paul Durand",
                          "phone": "+33 4 72 00 00 00",
                          "email": "reception@exemple.fr",
                          "address": "8 rue Garibaldi",
                          "postal_code": "69003",
                          "city": "Lyon",
                          "country": "FR",
                          "country_name": "France"
                        },
                        "pallets": [
                          {
                            "length_cm": 120,
                            "width_cm": 80,
                            "height_cm": 150,
                            "weight_kg": 300
                          }
                        ],
                        "price": {
                          "total_excl_vat": 181.4,
                          "vat": {
                            "regime": "fr_standard",
                            "rate_percent": 20,
                            "amount": 36.28
                          },
                          "total_incl_vat": 217.68,
                          "currency": "EUR"
                        },
                        "label": {
                          "status": "pending",
                          "expected_by": "2026-11-09T12:12:41.000Z"
                        },
                        "tracking": {
                          "status": "pending",
                          "url": null,
                          "number": null
                        }
                      }
                    }
                  },
                  "summary": "Production (illustration)"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received. Any other answer, or no answer within 10 seconds, triggers a retry."
          }
        },
        "summary": "shipment.price_adjusted",
        "description": "Price of the shipment changed after booking: read `price` in the snapshot. Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`.",
        "x-fm-event": "shipment.price_adjusted"
      }
    },
    "webhook.test": {
      "post": {
        "operationId": "webhookTestWebhook",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookTest"
              },
              "examples": {
                "test": {
                  "value": {
                    "id": "evt_test_3a9f1c2b7e4d",
                    "object": "event",
                    "type": "webhook.test",
                    "sequence": null,
                    "created_at": "2026-11-07T15:02:11.000Z",
                    "livemode": false,
                    "data": {
                      "message": "Test de webhook FreightMaster / FreightMaster webhook test"
                    }
                  },
                  "summary": "Test event"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "FreightMaster-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^t=\\d+,v1=[0-9a-f]{64}$"
            },
            "example": "t=1762527426,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",
            "description": "Signature: `t=<unix time>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>`."
          },
          {
            "name": "FreightMaster-Event-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event identifier (same as `id` in the body)."
          },
          {
            "name": "FreightMaster-Event-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Event type (same as `type` in the body)."
          }
        ],
        "responses": {
          "2XX": {
            "description": "Received."
          }
        },
        "summary": "webhook.test",
        "description": "Sent only by the “Test” button of an endpoint, in the customer portal. Not part of the event stream (`sequence: null`). Every delivery is a `POST` signed with the secret of the endpoint (`whsec_…`, shown once in the portal). Header `FreightMaster-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`. Check the signature on the RAW body, then reject a `t` older than 5 minutes. Answer `2xx` within 10 seconds; redirects are not followed. Retries after 1, 5, 15 and 30 minutes, 1, 2 and 4 hours, then every 6 hours, until 72 hours after the event; an endpoint failing for 72 hours is disabled and you get an e-mail. 3 endpoints per account, in production or test mode, set in the customer portal. The same event can arrive twice: deduplicate on `id`."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "fm_live_… | fm_test_…",
        "description": "API key: `fm_live_` (production) or `fm_test_` (sandbox) followed by 43 letters and digits. Created in the customer portal, “API” menu, and shown only once."
      }
    },
    "parameters": {
      "ShipmentId": {
        "name": "shipment_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^shp_[A-Za-z0-9_-]{8,64}$"
        },
        "example": "shp_test_21a2cc4aa5d746ccaeabd1a7",
        "description": "Shipment identifier (`shp_…`, `shp_test_…` in the sandbox)."
      },
      "QuoteId": {
        "name": "quote_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^qt_[A-Za-z0-9_-]{8,40}$"
        },
        "example": "qt_Yl1MZCDdknEncu6h",
        "description": "Quote identifier."
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^[\\x21-\\x7e]{8,255}$"
        },
        "example": "PO-12345-1",
        "description": "Required. 8 to 255 printable ASCII characters. Same key and same body for 48 hours: the first response is returned again (`Idempotent-Replayed: true`). Use one key per order and per attempt (`PO-12345-1`, then `PO-12345-2` after a cancellation)."
      },
      "AcceptLanguage": {
        "name": "Accept-Language",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "examples": [
            "fr",
            "en"
          ]
        },
        "description": "`en…` for messages and labels in English; French otherwise."
      }
    },
    "headers": {
      "RequestId": {
        "schema": {
          "type": "string",
          "pattern": "^req_[0-9a-f]{16}$"
        },
        "description": "Request identifier. Give it to support when you report a problem."
      },
      "RetryAfter": {
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "description": "Seconds to wait before retrying."
      },
      "IdempotentReplayed": {
        "schema": {
          "type": "string",
          "const": "true"
        },
        "description": "Present when the response is the replay of a previous request with the same Idempotency-Key and the same body."
      },
      "WWWAuthenticate": {
        "schema": {
          "type": "string"
        },
        "example": "Bearer realm=\"freightmaster\"",
        "description": "Authentication scheme expected by the API."
      },
      "ContentDisposition": {
        "schema": {
          "type": "string"
        },
        "example": "inline; filename=\"etiquette-shp_test_21a2cc4aa5d746ccaeabd1a7.pdf\"",
        "description": "Suggested file name of the PDF label."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "URL of the error description: `https://freightmaster.fr/api/erreurs#<code>`."
          },
          "title": {
            "type": "string",
            "description": "HTTP status title."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code."
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z_]+$",
            "examples": [
              "unauthorized",
              "api_disabled",
              "account_disabled",
              "not_found",
              "method_not_allowed",
              "unsupported_media_type",
              "payload_too_large",
              "invalid_json",
              "validation_failed",
              "shipment_outside_limits",
              "rate_limited",
              "daily_limit_reached",
              "booking_not_allowed",
              "agency_not_enrolled",
              "live_key_requires_review",
              "account_daily_limit_reached",
              "account_monthly_limit_reached",
              "account_quote_limit_reached",
              "quote_not_found",
              "quote_expired",
              "offer_not_found",
              "offer_not_bookable",
              "offer_no_longer_available",
              "pickup_date_not_allowed",
              "idempotency_key_required",
              "idempotency_key_reused",
              "shipment_not_found",
              "label_not_ready",
              "label_not_downloadable",
              "already_cancelled",
              "cannot_cancel",
              "test_only",
              "engine_error",
              "internal"
            ],
            "description": "Stable error code, in snake_case. Your code should rely on it, never on `detail`. Open list: new codes may appear."
          },
          "detail": {
            "type": "string",
            "description": "Human-readable message, in French or in English (`Accept-Language: en`). May change."
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "description": "Field errors, for `validation_failed` and `shipment_outside_limits`."
          },
          "earliest_pickup_date": {
            "type": "string",
            "format": "date",
            "description": "Earliest pickup date accepted now (`pickup_date_not_allowed`)."
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_[0-9a-f]{16}$",
            "description": "Request identifier, also in the `X-Request-Id` header."
          }
        },
        "description": "Error in the RFC 9457 format (`application/problem+json`)."
      },
      "FieldError": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "Path of the field in the request body, for example `pallets[0].weight_kg` or `shipper.email`. Empty when the whole body is concerned."
          },
          "code": {
            "type": "string",
            "pattern": "^[a-z_0-9]+$",
            "examples": [
              "required",
              "unknown_field",
              "invalid_type",
              "invalid_number",
              "invalid_quantity",
              "country_not_supported",
              "postal_code_invalid",
              "france_required",
              "invalid_value",
              "un_number_required",
              "declared_value_invalid",
              "invalid_date",
              "pickup_date_too_early",
              "pickup_date_not_business_day",
              "pickup_date_too_far",
              "invalid_reference",
              "too_many_lines",
              "invalid_body",
              "invalid_email",
              "invalid_phone",
              "incomplete",
              "does_not_match_quote",
              "too_many_units",
              "loading_meters_limit",
              "volume_limit",
              "long_unit_weight_limit",
              "unit_too_long",
              "unit_too_high",
              "unit_too_heavy"
            ],
            "description": "Stable field error code. Open list."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message, in French or in English."
          },
          "earliest": {
            "type": "string",
            "format": "date",
            "description": "Earliest accepted pickup date, for pickup date errors."
          }
        },
        "description": "Error on one field of the request."
      },
      "Place": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "country",
          "postal_code"
        ],
        "properties": {
          "country": {
            "type": "string",
            "enum": [
              "FR",
              "GB",
              "BE",
              "CZ",
              "DE",
              "NL",
              "IT",
              "ES",
              "PT",
              "PL",
              "RO",
              "BG",
              "AT",
              "GR",
              "FI",
              "HU",
              "SE",
              "AD",
              "BA",
              "HR",
              "DK",
              "EE",
              "IE",
              "XK",
              "LV",
              "LI",
              "LT",
              "LU",
              "MK",
              "ME",
              "NO",
              "RS",
              "SK",
              "SI",
              "CH",
              "GI"
            ],
            "description": "ISO 3166-1 alpha-2 country code. France must be the origin or the destination. A country accepted here is not served on every lane or by every account: the quote response tells you."
          },
          "postal_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12,
            "examples": [
              "59000",
              "69003"
            ],
            "description": "Full postal code, in the format of the country (France: 5 digits)."
          }
        },
        "description": "A place of the route."
      },
      "PalletLine": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "length_cm",
          "width_cm",
          "height_cm",
          "weight_kg"
        ],
        "properties": {
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 6,
            "default": 1,
            "description": "Number of identical pallets on this line."
          },
          "length_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "examples": [
              120
            ],
            "description": "Length in cm. 400 cm at most."
          },
          "width_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "examples": [
              80
            ],
            "description": "Width in cm."
          },
          "height_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "examples": [
              150
            ],
            "description": "Height in cm, required. 220 cm at most."
          },
          "weight_kg": {
            "type": "number",
            "exclusiveMinimum": 0,
            "examples": [
              300
            ],
            "description": "Weight of ONE pallet, in kg. 1,500 kg at most."
          }
        },
        "description": "A line of identical pallets."
      },
      "Services": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "delivery_appointment": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false,
            "description": "Delivery appointment."
          },
          "private_address": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false,
            "description": "Pickup or delivery at a private address. Offers whose carrier does not offer it are returned with `bookable: false`."
          },
          "small_vehicle": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false,
            "description": "Delivery by a vehicle under 3.5 t."
          },
          "tail_lift": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false,
            "description": "Tail lift. Passed on to your agency; not priced in the quote."
          },
          "europallet_exchange": {
            "type": [
              "boolean",
              "null"
            ],
            "default": false,
            "description": "Euro pallet exchange."
          },
          "dangerous_goods": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "un_number"
                ],
                "properties": {
                  "un_number": {
                    "type": "string",
                    "pattern": "^(UN\\s*)?\\d{4}$",
                    "examples": [
                      "1263"
                    ],
                    "description": "4-digit UN number."
                  }
                },
                "description": "Dangerous goods (ADR)."
              }
            ],
            "description": "`null` or `{ \"un_number\": \"1263\" }`."
          },
          "insurance": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "boolean",
                "const": false
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "declared_value"
                ],
                "properties": {
                  "declared_value": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1000000,
                    "examples": [
                      5000
                    ],
                    "description": "Declared value in euros, 1,000,000 at most."
                  }
                },
                "description": "Cargo insurance (ad valorem)."
              }
            ],
            "description": "`null` or `{ \"declared_value\": 5000 }`."
          },
          "guaranteed_delivery": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "none",
              "guaranteed",
              "guaranteed_before_13h",
              null
            ],
            "default": "none",
            "description": "Guaranteed delivery. Offers whose carrier does not offer it are returned with `bookable: false`."
          }
        },
        "description": "Optional services. Every service is off by default."
      },
      "QuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "origin",
          "destination",
          "pallets"
        ],
        "properties": {
          "origin": {
            "$ref": "#/components/schemas/Place"
          },
          "destination": {
            "$ref": "#/components/schemas/Place"
          },
          "pickup_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Requested pickup date (`YYYY-MM-DD`, Paris time): a business day, from the next business day to 90 days ahead. Default: the next business day. Requested, never guaranteed."
          },
          "pallets": {
            "type": "array",
            "minItems": 1,
            "maxItems": 6,
            "items": {
              "$ref": "#/components/schemas/PalletLine"
            },
            "description": "Pallet lines (6 lines at most). Limits of the pallet network: 6 pallets, 2.4 loading meters, 220 cm high, 1,500 kg per pallet, 400 cm long; beyond 240 cm long, 4 m³ per shipment and 100 kg per pallet."
          },
          "services": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Services"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional services."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "examples": [
              "PO-12345"
            ],
            "description": "Your reference (order number), 64 characters at most. Returned in the quote and the shipment."
          }
        },
        "description": "Quote request."
      },
      "Carrier": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*$",
            "examples": [
              "dhl_freight",
              "xpo",
              "dgs",
              "dsv",
              "coquelle",
              "france_express",
              "geodis",
              "translocauto",
              "heppner"
            ],
            "description": "Stable carrier identifier. Open string: new identifiers may appear without a version change."
          },
          "name": {
            "type": "string",
            "description": "Carrier name to display."
          }
        },
        "description": "Carrier of an offer. The identifier `premium_partner` (name “Partenaire Premium”) is the trade name of a partner carrier, on some accounts."
      },
      "Product": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*$",
            "examples": [
              "dhl_freight.pallet",
              "dhl_freight.europe",
              "xpo.standard",
              "dgs.pallet",
              "dgs.weight",
              "dsv.pallet",
              "dsv.weight",
              "coquelle.benelux",
              "coquelle.pallet",
              "france_express.europe",
              "france_express.express",
              "geodis.europe",
              "geodis.standard",
              "translocauto.pallet",
              "translocauto.weight",
              "heppner.pallet",
              "heppner.europe",
              "heppner.weight"
            ],
            "description": "Stable product identifier, `<carrier.id>.<product>`. Open string."
          },
          "name": {
            "type": "string",
            "description": "Product name to display, always in French: “(Poids)” = by weight, “(Palette)” = per pallet."
          }
        },
        "description": "Carrier product of an offer."
      },
      "Vat": {
        "type": "object",
        "required": [
          "regime",
          "rate_percent",
          "amount"
        ],
        "properties": {
          "regime": {
            "type": "string",
            "enum": [
              "fr_standard",
              "eu_reverse_charge",
              "non_eu_out_of_scope"
            ],
            "description": "VAT regime of your account: `fr_standard` (20%), `eu_reverse_charge` (EU company with a VAT number, reverse charge, 0%), `non_eu_out_of_scope` (company outside the EU, 0%)."
          },
          "rate_percent": {
            "type": "number",
            "minimum": 0,
            "description": "VAT rate in percent."
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "VAT amount in euros."
          }
        },
        "description": "VAT."
      },
      "PriceLine": {
        "type": "object",
        "required": [
          "code",
          "label",
          "amount"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z_0-9]+$",
            "examples": [
              "fuel",
              "guaranteed_before_13h",
              "xpo_premium",
              "guaranteed_delivery",
              "delivery_appointment",
              "private_address",
              "small_vehicle",
              "dangerous_goods",
              "europallet_exchange",
              "insurance",
              "urban_delivery",
              "other"
            ],
            "description": "Stable line code. Open list."
          },
          "label": {
            "type": "string",
            "description": "Line label, in French or in English."
          },
          "amount": {
            "type": "number",
            "description": "Amount excluding VAT, in euros."
          },
          "rate_percent": {
            "type": "number",
            "description": "Rate applied, for the fuel surcharge (`fuel`)."
          }
        },
        "description": "A line of the price besides transport: fuel surcharge, service, surcharge."
      },
      "OfferPrice": {
        "type": "object",
        "required": [
          "transport_excl_vat",
          "lines",
          "total_excl_vat",
          "vat",
          "total_incl_vat"
        ],
        "properties": {
          "transport_excl_vat": {
            "type": "number",
            "description": "Transport, excluding VAT: total minus the lines."
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceLine"
            },
            "description": "Other lines of the price."
          },
          "total_excl_vat": {
            "type": "number",
            "description": "Total excluding VAT, in euros."
          },
          "vat": {
            "$ref": "#/components/schemas/Vat"
          },
          "total_incl_vat": {
            "type": "number",
            "description": "Total including VAT, in euros."
          }
        },
        "description": "Price of an offer, in euros, for your account."
      },
      "Notice": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z_0-9]+$",
            "examples": [
              "customs_not_included",
              "customs_export_included",
              "locality_rate_applied",
              "port_surcharge_included",
              "sector_partially_served",
              "locality_rate_possible",
              "sector_max_price",
              "urban_delivery_included",
              "urban_delivery_possible"
            ],
            "description": "Stable notice code. Open list."
          },
          "message": {
            "type": "string",
            "description": "Message, in French or in English."
          }
        },
        "description": "Information to read before booking: customs, locality, surcharge included."
      },
      "Refusal": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[a-z_0-9]+$",
            "examples": [
              "loading_meters_limit",
              "weight_limit",
              "volume_limit",
              "long_unit_weight_limit",
              "carrier_constraints",
              "postal_code_incomplete",
              "postal_code_ambiguous",
              "postal_code_not_served",
              "destination_not_served",
              "country_not_served",
              "french_department_not_served",
              "rate_on_request",
              "no_rate",
              "no_route"
            ],
            "description": "Stable reason code. Open list."
          },
          "message": {
            "type": "string",
            "description": "Message, in French or in English."
          }
        },
        "description": "Why no carrier offers a rate (`offers` empty)."
      },
      "Offer": {
        "type": "object",
        "required": [
          "offer_id",
          "carrier",
          "product",
          "chargeable_weight_kg",
          "price",
          "notices",
          "bookable"
        ],
        "properties": {
          "offer_id": {
            "type": "string",
            "pattern": "^of_[A-Za-z0-9_-]+$",
            "description": "Offer identifier, to send to `POST /shipments`."
          },
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "chargeable_weight_kg": {
            "type": [
              "number",
              "null"
            ],
            "exclusiveMinimum": 0,
            "description": "Chargeable weight returned by the price calculation for this offer, in kg, to one decimal place, always above 0; `null` when it is not known, never `0`."
          },
          "price": {
            "$ref": "#/components/schemas/OfferPrice"
          },
          "notices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Notice"
            },
            "description": "Information to read before booking."
          },
          "bookable": {
            "type": "boolean",
            "description": "`false` when a requested service is not offered by this carrier: the offer cannot be booked."
          },
          "unsupported_services": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "guaranteed_delivery",
                "private_address"
              ]
            },
            "description": "Requested services this carrier does not offer (when `bookable` is `false`)."
          },
          "booking_url": {
            "type": "string",
            "format": "uri",
            "examples": [
              "https://freightmaster.fr/simulateur?dep=59&dest=69&pal=120x80x150x300x1"
            ],
            "description": "Link to the FreightMaster simulator with the route and the pallets already filled in. A person validates the booking: the link books nothing. A customer already logged in arrives in their portal with the prices of their account; a visitor who is not logged in arrives on the public simulator, with public prices. In France, the link carries the department only: the price is recalculated once the full address is entered, and may differ from the quote. Useful for an account that cannot book through the API."
          }
        },
        "description": "An offer of a carrier for the quoted shipment. Offers are sorted by total price, lowest first."
      },
      "QuoteRoute": {
        "type": "object",
        "required": [
          "origin",
          "destination"
        ],
        "properties": {
          "origin": {
            "type": "object",
            "required": [
              "country",
              "postal_code"
            ],
            "properties": {
              "country": {
                "type": "string"
              },
              "postal_code": {
                "type": "string"
              }
            },
            "description": "Origin, normalised."
          },
          "destination": {
            "type": "object",
            "required": [
              "country",
              "postal_code"
            ],
            "properties": {
              "country": {
                "type": "string"
              },
              "postal_code": {
                "type": "string"
              }
            },
            "description": "Destination, normalised."
          }
        },
        "description": "Route of the quote."
      },
      "Quote": {
        "type": "object",
        "required": [
          "quote_id",
          "object",
          "livemode",
          "created_at",
          "expires_at",
          "currency",
          "reference",
          "pickup_date",
          "route",
          "shipment",
          "offers",
          "unavailable"
        ],
        "properties": {
          "quote_id": {
            "type": "string",
            "pattern": "^qt_[A-Za-z0-9_-]{8,40}$",
            "description": "Quote identifier."
          },
          "object": {
            "type": "string",
            "const": "quote"
          },
          "livemode": {
            "type": "boolean",
            "description": "`false` with a test key."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time (UTC)."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "End of validity: 24 hours after creation. Within this time, booking an identical shipment keeps the quoted price, as long as the carrier still serves it and the pickup date is still possible."
          },
          "currency": {
            "type": "string",
            "examples": [
              "EUR"
            ],
            "description": "Currency of the prices."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your reference."
          },
          "pickup_date": {
            "type": "string",
            "format": "date",
            "description": "Requested pickup date used for the quote."
          },
          "route": {
            "$ref": "#/components/schemas/QuoteRoute"
          },
          "shipment": {
            "type": "object",
            "required": [
              "pallet_count",
              "loading_meters",
              "actual_weight_kg",
              "volume_m3"
            ],
            "properties": {
              "pallet_count": {
                "type": "integer",
                "description": "Number of pallets."
              },
              "loading_meters": {
                "type": "number",
                "description": "Loading meters (floor length used in a 2.4 m wide truck)."
              },
              "actual_weight_kg": {
                "type": "number",
                "description": "Total actual weight, in kg."
              },
              "volume_m3": {
                "type": "number",
                "description": "Total volume, in m³."
              }
            },
            "description": "The quoted shipment."
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Offer"
            },
            "description": "Offers, sorted by total price, lowest first. Their number depends on the route, the load and your account."
          },
          "unavailable": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Refusal"
            },
            "description": "When `offers` is empty: why."
          },
          "expired": {
            "type": "boolean",
            "description": "Only in `GET /quotes/{quote_id}`: `true` after `expires_at`."
          }
        },
        "description": "A quote: the offers of the carriers for one shipment, valid for 24 hours."
      },
      "PartyInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "company",
          "phone",
          "address",
          "postal_code",
          "city",
          "country"
        ],
        "properties": {
          "company": {
            "type": "string",
            "maxLength": 120,
            "description": "Company name, written out in full (not a code or an abbreviation)."
          },
          "contact": {
            "type": "string",
            "maxLength": 120,
            "description": "Contact person. Required for the shipper."
          },
          "phone": {
            "type": "string",
            "maxLength": 40,
            "description": "Phone number."
          },
          "email": {
            "type": "string",
            "maxLength": 160,
            "format": "email",
            "description": "E-mail address. Required for the shipper."
          },
          "address": {
            "type": "string",
            "maxLength": 200,
            "description": "Street address, written out in full: number and street name."
          },
          "postal_code": {
            "type": "string",
            "description": "Postal code: must match the quote."
          },
          "city": {
            "type": "string",
            "maxLength": 80,
            "description": "City name, written out in full."
          },
          "country": {
            "type": "string",
            "description": "ISO country code: must match the quote."
          }
        },
        "description": "Shipper or consignee. Country and postal code must match the quote."
      },
      "ShipmentRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "quote_id",
          "offer_id",
          "shipper",
          "consignee"
        ],
        "properties": {
          "quote_id": {
            "type": "string",
            "pattern": "^qt_[A-Za-z0-9_-]{8,40}$",
            "description": "Quote identifier (24 hours of validity)."
          },
          "offer_id": {
            "type": "string",
            "pattern": "^of_[A-Za-z0-9_-]+$",
            "description": "Identifier of the offer chosen in this quote."
          },
          "shipper": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PartyInput"
              },
              {
                "required": [
                  "contact",
                  "email"
                ]
              }
            ],
            "description": "Shipper: company, contact, phone, e-mail, address, postal code, city, country."
          },
          "consignee": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PartyInput"
              }
            ],
            "description": "Consignee: company, phone, address, postal code, city, country."
          },
          "goods_description": {
            "type": "string",
            "maxLength": 500,
            "description": "Description of the goods."
          },
          "pallet_comments": {
            "type": "string",
            "maxLength": 500,
            "description": "Comments on the pallets."
          },
          "comments": {
            "type": "string",
            "maxLength": 1000,
            "description": "Comments for your agency."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64,
            "description": "Your reference. Default: the quote's reference."
          }
        },
        "description": "Booking of one offer of a quote."
      },
      "PartyOutput": {
        "type": "object",
        "properties": {
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 3166-1 alpha-2 code of the country, read from the recorded country name; `null` when that name is not recognised (older addresses typed by hand)."
          },
          "country_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country name as recorded on the shipment, in French (for example `France`)."
          }
        },
        "description": "Shipper or consignee of a shipment. Same fields in production and in the sandbox."
      },
      "ShipmentCarrier": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Carrier identifier (see `Carrier.id`), or `null` when the carrier is not one of the API carriers."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Carrier name."
          }
        },
        "description": "Carrier of the shipment. It can change after booking (`shipment.carrier_changed`)."
      },
      "ShipmentPrice": {
        "type": [
          "object",
          "null"
        ],
        "required": [
          "total_excl_vat",
          "vat",
          "total_incl_vat",
          "currency"
        ],
        "properties": {
          "total_excl_vat": {
            "type": "number",
            "description": "Total excluding VAT, in euros."
          },
          "vat": {
            "$ref": "#/components/schemas/Vat"
          },
          "total_incl_vat": {
            "type": "number",
            "description": "Total including VAT, in euros."
          },
          "currency": {
            "type": "string",
            "description": "Currency."
          }
        },
        "description": "Price of the shipment. It can change after booking (`shipment.price_adjusted`)."
      },
      "LabelPending": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "pending"
          },
          "expected_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Indicative time returned by the API, with no commitment. The label can arrive later, or never (`not_provided`)."
          }
        },
        "description": "No label yet: your agency attaches it after the booking."
      },
      "LabelAvailable": {
        "type": "object",
        "required": [
          "status",
          "format",
          "downloadable",
          "version"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "available"
          },
          "format": {
            "type": "string",
            "const": "pdf"
          },
          "downloadable": {
            "type": "boolean",
            "description": "`true` when `GET /shipments/{shipment_id}/label` serves the file."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Address of the label in the API (Bearer key required)."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "Version of the label: it increases when the agency replaces it (`shipment.label_updated`). Reprint when it changes."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last change of the label."
          },
          "specimen": {
            "type": "boolean",
            "const": true,
            "description": "Sandbox only: specimen label, not usable for a real shipment."
          }
        },
        "description": "Label available."
      },
      "LabelNotProvided": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "not_provided"
          }
        },
        "description": "The shipment left without a label in FreightMaster (for example, the carrier brought it at pickup). Stop waiting for it."
      },
      "Label": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/LabelPending"
          },
          {
            "$ref": "#/components/schemas/LabelAvailable"
          },
          {
            "$ref": "#/components/schemas/LabelNotProvided"
          }
        ],
        "discriminator": {
          "propertyName": "status",
          "mapping": {
            "pending": "#/components/schemas/LabelPending",
            "available": "#/components/schemas/LabelAvailable",
            "not_provided": "#/components/schemas/LabelNotProvided"
          }
        },
        "description": "Label of the shipment: `pending`, `available` or `not_provided`."
      },
      "Tracking": {
        "type": "object",
        "required": [
          "status",
          "url",
          "number"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "available"
            ],
            "description": "`available` once a usable tracking link or number is known."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Tracking page of the carrier."
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tracking number."
          }
        },
        "description": "Tracking of the shipment."
      },
      "Shipment": {
        "type": "object",
        "required": [
          "id",
          "object",
          "livemode",
          "channel",
          "reference",
          "status",
          "booked_at",
          "updated_at",
          "requested_pickup_date",
          "carrier",
          "shipper",
          "consignee",
          "pallets",
          "price",
          "label",
          "tracking"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^shp_[A-Za-z0-9_-]+$",
            "examples": [
              "shp_test_21a2cc4aa5d746ccaeabd1a7"
            ],
            "description": "Shipment identifier. `shp_test_…` in the sandbox."
          },
          "object": {
            "type": "string",
            "const": "shipment"
          },
          "livemode": {
            "type": "boolean",
            "description": "`false` for a simulated booking."
          },
          "channel": {
            "type": "string",
            "enum": [
              "api",
              "portal"
            ],
            "description": "Where the shipment was booked: through the API or in the customer portal."
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your reference."
          },
          "status": {
            "type": "string",
            "enum": [
              "booked",
              "confirmed",
              "in_transit",
              "delivered",
              "cancelled",
              "unknown"
            ],
            "description": "`booked`, `confirmed` (validated by your agency), `in_transit`, `delivered`, `cancelled`. `unknown` for an unexpected internal value: never an invented status."
          },
          "booked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Booking time (UTC)."
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last change (UTC)."
          },
          "requested_pickup_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Requested pickup date. Requested, never guaranteed."
          },
          "carrier": {
            "$ref": "#/components/schemas/ShipmentCarrier"
          },
          "shipper": {
            "$ref": "#/components/schemas/PartyOutput"
          },
          "consignee": {
            "$ref": "#/components/schemas/PartyOutput"
          },
          "pallets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "length_cm": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "width_cm": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "height_cm": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "weight_kg": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "description": "One pallet (dimensions in cm, weight in kg)."
            },
            "description": "One entry per pallet."
          },
          "price": {
            "$ref": "#/components/schemas/ShipmentPrice"
          },
          "label": {
            "$ref": "#/components/schemas/Label"
          },
          "tracking": {
            "$ref": "#/components/schemas/Tracking"
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Cancellation time, when `status` is `cancelled`."
          },
          "cancellation": {
            "type": "object",
            "required": [
              "status"
            ],
            "properties": {
              "status": {
                "type": "string",
                "const": "requested"
              },
              "requested_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "description": "Cancellation requested after the label: your agency cancels with the carrier; the status does not change until then."
          }
        },
        "description": "A shipment of your account, booked through the API or in the portal."
      },
      "Cancellation": {
        "type": "object",
        "required": [
          "id",
          "object",
          "status",
          "livemode"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^shp_[A-Za-z0-9_-]+$",
            "description": "Shipment identifier."
          },
          "object": {
            "type": "string",
            "const": "cancellation"
          },
          "status": {
            "type": "string",
            "const": "requested"
          },
          "livemode": {
            "type": "boolean"
          }
        },
        "description": "Cancellation request passed on to your agency (label already attached)."
      },
      "ShipmentList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Shipment"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when another page exists."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Opaque cursor of the next page, to send as `cursor`."
          }
        },
        "description": "A page of shipments, most recent first."
      },
      "Event": {
        "type": "object",
        "required": [
          "id",
          "object",
          "type",
          "sequence",
          "created_at",
          "livemode",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^evt_[A-Za-z0-9_.-]+$",
            "description": "Event identifier. The same change always has the same identifier: use it to ignore a duplicate."
          },
          "object": {
            "type": "string",
            "const": "event"
          },
          "type": {
            "type": "string",
            "enum": [
              "shipment.booked",
              "shipment.confirmed",
              "shipment.label_available",
              "shipment.label_updated",
              "shipment.label_removed",
              "shipment.tracking_available",
              "shipment.tracking_updated",
              "shipment.in_transit",
              "shipment.delivered",
              "shipment.cancelled",
              "shipment.reinstated",
              "shipment.carrier_changed",
              "shipment.pickup_date_changed",
              "shipment.price_adjusted"
            ],
            "description": "Event type."
          },
          "sequence": {
            "type": "integer",
            "minimum": 1,
            "description": "Sequence number, strictly increasing per account and per mode (test and production have separate sequences)."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time of the change (UTC)."
          },
          "livemode": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "shipment"
            ],
            "properties": {
              "shipment": {
                "$ref": "#/components/schemas/Shipment"
              }
            },
            "description": "Full snapshot of the shipment after the change."
          }
        },
        "description": "A change of a shipment. Same body in `GET /events` and in webhooks."
      },
      "EventList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "`true` when more events follow."
          },
          "next_cursor": {
            "type": "string",
            "pattern": "^\\d+$",
            "description": "Sequence of the last event read: send it as `after` next time. Keep one cursor per mode."
          }
        },
        "description": "A page of events, in sequence order."
      },
      "WebhookTest": {
        "type": "object",
        "required": [
          "id",
          "object",
          "type",
          "sequence",
          "created_at",
          "livemode",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^evt_test_[0-9a-f]+$"
          },
          "object": {
            "type": "string",
            "const": "event"
          },
          "type": {
            "type": "string",
            "const": "webhook.test"
          },
          "sequence": {
            "type": "null"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "livemode": {
            "type": "boolean"
          },
          "data": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            }
          }
        },
        "description": "Test event sent by the “Test” button of the customer portal. Not in `GET /events`."
      },
      "Account": {
        "type": "object",
        "required": [
          "object",
          "livemode",
          "key_id",
          "account",
          "capabilities",
          "limits"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "account"
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` with a production key, `false` with a test key."
          },
          "key_id": {
            "type": "string",
            "pattern": "^key_[0-9a-f]{16}$",
            "description": "Public identifier of the key (never the key)."
          },
          "account": {
            "type": "object",
            "required": [
              "company",
              "currency",
              "vat"
            ],
            "properties": {
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "type": "string"
              },
              "vat": {
                "type": "object",
                "required": [
                  "regime",
                  "rate_percent"
                ],
                "properties": {
                  "regime": {
                    "type": "string",
                    "enum": [
                      "fr_standard",
                      "eu_reverse_charge",
                      "non_eu_out_of_scope"
                    ]
                  },
                  "rate_percent": {
                    "type": "number"
                  }
                },
                "description": "VAT regime of the account."
              }
            },
            "description": "Account of the key."
          },
          "capabilities": {
            "type": "object",
            "required": [
              "can_quote",
              "can_book"
            ],
            "properties": {
              "can_quote": {
                "type": "boolean",
                "description": "Always `true`."
              },
              "can_book": {
                "type": "boolean",
                "description": "`true` when `POST /shipments` is allowed with this key (always with a test key: simulated booking)."
              }
            },
            "description": "What the key can do."
          },
          "booking_blocked_reason": {
            "type": "string",
            "enum": [
              "card_prepayment",
              "agency_not_enrolled",
              "live_key_requires_review"
            ],
            "description": "Production key that cannot book: `card_prepayment` (account paying by card: ask your agency for monthly invoicing from the portal), `agency_not_enrolled` (your agency has not opened API booking), `live_key_requires_review` (a test booking must be reviewed by your agency first)."
          },
          "limits": {
            "type": "object",
            "required": [
              "quotes_per_minute",
              "quotes_per_day",
              "bookings_per_hour",
              "bookings_per_day",
              "reads_per_minute"
            ],
            "properties": {
              "quotes_per_minute": {
                "type": "integer",
                "description": "Quotes per minute, per key."
              },
              "quotes_per_day": {
                "type": "integer",
                "description": "Quotes per day, per key."
              },
              "bookings_per_hour": {
                "type": "integer",
                "description": "Bookings per hour, per key. A replay of the same request does not count."
              },
              "cancellations_per_hour": {
                "type": "integer",
                "description": "Cancellations per hour, per key."
              },
              "bookings_per_day": {
                "type": "integer",
                "description": "Bookings per day, per key."
              },
              "reads_per_minute": {
                "type": "integer",
                "description": "Reads per minute, per key."
              },
              "account_bookings_per_day": {
                "type": "integer",
                "description": "Production bookings per day for the account (all keys). Can be raised on request, through your agency."
              },
              "account_bookings_per_month": {
                "type": "integer",
                "description": "Production bookings per month for the account (all keys). Can be raised on request, through your agency."
              },
              "account_bookings_today": {
                "type": "integer",
                "description": "Production bookings of the account today (Paris time)."
              },
              "account_bookings_this_month": {
                "type": "integer",
                "description": "Production bookings of the account this month (Paris time)."
              },
              "account_quotes_per_day": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Quotes per day for the whole account, with a test key or for an account paying by card; `null` otherwise."
              }
            },
            "description": "Limits of the key and of the account."
          }
        },
        "description": "Account and limits of the key."
      },
      "CancelRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 500,
            "description": "Reason, passed on to your agency."
          }
        },
        "description": "Optional body of a cancellation."
      }
    },
    "examples": {
      "unauthorized": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#unauthorized",
          "title": "Unauthorized",
          "status": 401,
          "code": "unauthorized",
          "detail": "Missing or invalid API key. Send \"Authorization: Bearer fm_live_…\" or \"fm_test_…\".",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Missing or invalid API key"
      },
      "api_disabled": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#api_disabled",
          "title": "Service Unavailable",
          "status": 503,
          "code": "api_disabled",
          "detail": "The API is temporarily disabled.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "API temporarily disabled"
      },
      "account_disabled": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#account_disabled",
          "title": "Forbidden",
          "status": 403,
          "code": "account_disabled",
          "detail": "API access is disabled for this account. Contact your agency.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "API access disabled for this account"
      },
      "not_found": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#not_found",
          "title": "Not Found",
          "status": 404,
          "code": "not_found",
          "detail": "Resource not found.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Unknown path"
      },
      "method_not_allowed": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#method_not_allowed",
          "title": "Method Not Allowed",
          "status": 405,
          "code": "method_not_allowed",
          "detail": "Method not allowed on this resource.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Method not allowed"
      },
      "unsupported_media_type": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#unsupported_media_type",
          "title": "Unsupported Media Type",
          "status": 415,
          "code": "unsupported_media_type",
          "detail": "The body must be JSON (Content-Type: application/json).",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Body is not JSON"
      },
      "payload_too_large": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#payload_too_large",
          "title": "Payload Too Large",
          "status": 413,
          "code": "payload_too_large",
          "detail": "Request body too large (64 KB maximum).",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Body larger than 64 KB"
      },
      "invalid_json": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#invalid_json",
          "title": "Bad Request",
          "status": 400,
          "code": "invalid_json",
          "detail": "Unreadable JSON body.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Unreadable JSON body"
      },
      "validation_failed": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#validation_failed",
          "title": "Unprocessable Content",
          "status": 422,
          "code": "validation_failed",
          "detail": "The request contains errors.",
          "errors": [
            {
              "field": "colour",
              "code": "unknown_field",
              "message": "Unknown field."
            },
            {
              "field": "origin.postal_code",
              "code": "postal_code_invalid",
              "message": "Invalid postal code for this country (full code expected)."
            },
            {
              "field": "pallets[0].quantity",
              "code": "invalid_quantity",
              "message": "Integer quantity from 1 to 6 expected."
            },
            {
              "field": "pallets[0].weight_kg",
              "code": "required",
              "message": "Required field."
            }
          ],
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Invalid request (field errors)"
      },
      "shipment_outside_limits": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#shipment_outside_limits",
          "title": "Unprocessable Content",
          "status": 422,
          "code": "shipment_outside_limits",
          "detail": "The shipment exceeds the pallet network limits (6 pallets, 2.4 loading meters, 2.20 m high, 1,500 kg per pallet, 4 m long). Ask for a full or part truckload quote.",
          "errors": [
            {
              "field": "pallets",
              "code": "unit_too_high",
              "message": "220 cm high maximum."
            }
          ],
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Shipment outside the pallet network limits"
      },
      "rate_limited": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#rate_limited",
          "title": "Too Many Requests",
          "status": 429,
          "code": "rate_limited",
          "detail": "Too many requests. Retry after the indicated delay.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Too many requests for this key"
      },
      "daily_limit_reached": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#daily_limit_reached",
          "title": "Too Many Requests",
          "status": 429,
          "code": "daily_limit_reached",
          "detail": "Daily limit reached for this key.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Daily limit of this key reached"
      },
      "booking_not_allowed": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#booking_not_allowed",
          "title": "Forbidden",
          "status": 403,
          "code": "booking_not_allowed",
          "detail": "This account pays by card: API booking is reserved for monthly-invoiced accounts. Ask your agency for monthly invoicing.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Account paying by card: no API booking"
      },
      "agency_not_enrolled": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#agency_not_enrolled",
          "title": "Forbidden",
          "status": 403,
          "code": "agency_not_enrolled",
          "detail": "Your agency has not opened API booking. You can quote and test; to book, talk to your agency.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Agency has not opened API booking"
      },
      "live_key_requires_review": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#live_key_requires_review",
          "title": "Forbidden",
          "status": 403,
          "code": "live_key_requires_review",
          "detail": "Live booking opens after your agency has reviewed a test booking. Request the production key from your customer portal, “API” menu.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Production booking not yet reviewed"
      },
      "account_daily_limit_reached": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#account_daily_limit_reached",
          "title": "Too Many Requests",
          "status": 429,
          "code": "account_daily_limit_reached",
          "detail": "Account booking limit reached for today. Ask your agency to have it raised.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Account booking limit reached today"
      },
      "account_monthly_limit_reached": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#account_monthly_limit_reached",
          "title": "Too Many Requests",
          "status": 429,
          "code": "account_monthly_limit_reached",
          "detail": "Account booking limit reached for this month. Ask your agency to have it raised.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Account booking limit reached this month"
      },
      "account_quote_limit_reached": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#account_quote_limit_reached",
          "title": "Too Many Requests",
          "status": 429,
          "code": "account_quote_limit_reached",
          "detail": "Limit of 200 quotes per day reached for this account (test keys and card-paying accounts). Retry tomorrow or contact your agency.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Account quote limit reached today"
      },
      "quote_not_found": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#quote_not_found",
          "title": "Not Found",
          "status": 404,
          "code": "quote_not_found",
          "detail": "Quote not found.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Quote not found"
      },
      "quote_expired": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#quote_expired",
          "title": "Gone",
          "status": 410,
          "code": "quote_expired",
          "detail": "Quote expired (24 h). Request a new quote.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Quote expired"
      },
      "offer_not_found": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#offer_not_found",
          "title": "Not Found",
          "status": 404,
          "code": "offer_not_found",
          "detail": "Offer not found in this quote.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Offer not found in the quote"
      },
      "offer_not_bookable": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#offer_not_bookable",
          "title": "Unprocessable Content",
          "status": 422,
          "code": "offer_not_bookable",
          "detail": "This offer cannot be booked (a requested service is not offered by this carrier).",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Offer cannot be booked"
      },
      "offer_no_longer_available": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#offer_no_longer_available",
          "title": "Conflict",
          "status": 409,
          "code": "offer_no_longer_available",
          "detail": "This carrier no longer offers a rate for this shipment. Request a new quote.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Carrier no longer serves the shipment"
      },
      "pickup_date_not_allowed": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#pickup_date_not_allowed",
          "title": "Unprocessable Content",
          "status": 422,
          "code": "pickup_date_not_allowed",
          "detail": "The quote's pickup date is no longer possible. Request a new quote.",
          "earliest_pickup_date": "2026-11-10",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Pickup date no longer possible"
      },
      "idempotency_key_required": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#idempotency_key_required",
          "title": "Bad Request",
          "status": 400,
          "code": "idempotency_key_required",
          "detail": "Idempotency-Key header required (8 to 255 printable characters).",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Idempotency-Key header missing"
      },
      "idempotency_key_reused_409": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#idempotency_key_reused",
          "title": "Conflict",
          "status": 409,
          "code": "idempotency_key_reused",
          "detail": "This idempotency key was already used for a different request.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Idempotency key reused with another body"
      },
      "idempotency_key_reused_422": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#idempotency_key_reused",
          "title": "Unprocessable Content",
          "status": 422,
          "code": "idempotency_key_reused",
          "detail": "This idempotency key was already used for a different request.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Idempotency key reused with another body"
      },
      "shipment_not_found": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#shipment_not_found",
          "title": "Not Found",
          "status": 404,
          "code": "shipment_not_found",
          "detail": "Shipment not found.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Shipment not found"
      },
      "label_not_ready": {
        "value": {
          "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_7f6a0ff24cd22421"
        },
        "summary": "Label not available yet"
      },
      "label_not_downloadable": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#label_not_downloadable",
          "title": "Conflict",
          "status": 409,
          "code": "label_not_downloadable",
          "detail": "This label cannot be downloaded through the API.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Label not downloadable through the API"
      },
      "already_cancelled": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#already_cancelled",
          "title": "Conflict",
          "status": 409,
          "code": "already_cancelled",
          "detail": "This shipment is already cancelled.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Shipment already cancelled"
      },
      "cannot_cancel": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#cannot_cancel",
          "title": "Conflict",
          "status": 409,
          "code": "cannot_cancel",
          "detail": "This shipment can no longer be cancelled (in transit or delivered).",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Shipment can no longer be cancelled"
      },
      "test_only": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#test_only",
          "title": "Forbidden",
          "status": 403,
          "code": "test_only",
          "detail": "Test keys only (fm_test_…).",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Test keys only"
      },
      "engine_error": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#engine_error",
          "title": "Bad Gateway",
          "status": 502,
          "code": "engine_error",
          "detail": "Price calculation failed. Retry later.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Price calculation failed"
      },
      "internal": {
        "value": {
          "type": "https://freightmaster.fr/api/erreurs#internal",
          "title": "Internal Server Error",
          "status": 500,
          "code": "internal",
          "detail": "Internal error. Retry later.",
          "request_id": "req_7f6a0ff24cd22421"
        },
        "summary": "Internal error"
      }
    }
  }
}
