How to Generate a Colissimo Label via SOAP API

Step-by-step: get Colissimo Entreprise credentials, call checkGenerateLabel and generateLabel on SlsServiceWS, then verify via the Suivi v2 REST API.

Share

What You Need Before Starting

You can't self-serve your way into the Colissimo API. There's no public signup button, no instant sandbox key. Colissimo is La Poste's parcel delivery brand for France and international shipping, and for business shippers it publishes developer web services on ws.colissimo.fr — but only after you've signed an Entreprise contract. That contract gives you a 6-digit customer number and a password, issued once your account is opened, and those two fields are what authenticate every single call you make. No OAuth2, no Bearer token, no API key header for the label service.

This matters for planning your sprint. Here's what to have ready before you open a terminal:

  • A Colissimo Entreprise contract number and password (6 characters, alphanumeric), obtained via colissimo.entreprise.laposte.fr — this is not the same credential as the tracking API below.
  • A separate, free account on developer.laposte.fr if you also want tracking (Suivi v2 runs on a completely different gateway — more on that in Step 6).
  • A SOAP toolchain: PHP's built-in SoapClient, Postman with WSDL import, or SoapUI. Colissimo is SOAP-first, and even the REST variant doesn't save you from the SOAP-era quirks baked into the contract.
  • The WSDL itself, at https://ws.colissimo.fr/sls-ws/SlsServiceWS/2.0?wsdl, or version 3.1 if your contract has it provisioned.

One thing worth flagging up front, because it shapes the whole integration: this API isn't exposed on La Poste's modern Okapi gateway. Everything else La Poste publishes — address lookup, geolocation, tracking — runs through api.laposte.fr with an Okapi key. Label generation stays on the legacy ws.colissimo.fr host, authenticated the old way. Calls are authenticated with an X-Okapi-Key header against the api.laposte.fr gateway for the Okapi-era APIs — Colissimo's label service predates that pattern entirely.

Step 1–3: Fetch the WSDL, Build the Client, Authenticate

Start by pulling the WSDL and generating a stub client — don't hand-roll the SOAP envelope from scratch unless you enjoy debugging XML namespaces at 11pm. In PHP, this is close to the shortest path:

$slsService = new SoapClient('https://ws.colissimo.fr/sls-ws/SlsServiceWS/2.0?wsdl');

That mirrors the pattern La Poste's own technical documentation ships in its SOAP envelope examples, which call the Web Service via a SoapClient instantiated against the WSDL, then dispatch the request to generateLabel. Your contract number and password get passed as fields inside the request body on every call — there's no session, no refresh token, no expiry to manage. That's a real DX contrast against carriers like Evri or DPD that use Bearer/OAuth2, and it's worth tabling if you're also integrating MercuryGate- or Descartes-style token auth elsewhere in your stack. If you're wrapping several carriers at once, this is exactly the kind of per-carrier auth variance that a platform like Cargoson is built to normalize behind one connection, alongside aggregators like Sendcloud or Boxtal.

If you're using the unofficial PHP SDK rather than raw SoapClient, authentication gets even simpler. The library's own docs note that you have to leave the contract number/password empty as the authentication information will be (over)written automatically. Don't fight that — set your credentials once at the client level, then build requests without touching the auth fields.

Step 4: Validate First With checkGenerateLabel

Call checkGenerateLabel before you ever touch generateLabel. It exists specifically so you don't burn a real parcel number while you're still debugging address formats or product codes. Per La Poste's own spec, this method works like the generateLabel method but does not send back the parcel number, the XOP link(s), or the pdfUrl tag — same validation, no consequences.

In the unofficial SDK, the call looks like this:

$result = $slsService->checkGenerateLabel(
    new \SengentoBV\ColissimoSdk\Soap\SlsService\Structs\ColissimoApiCheckGenerateLabel(...)
);
print_r($result);

The same SDK documentation reiterates that you can (should) leave the fields meant for authentication empty as this library will do the heavy lifting for you by filling in (or overwriting) these fields automatically. Run this against a sandbox parcel with deliberately wrong data once — a malformed postcode, an oversized weight — just to see what a functional error actually looks like in this API before you hit it in production.

Step 5: Call generateLabel — and Respect the WSDL Field Order

Once checkGenerateLabel comes back clean, build the real payload. You'll need sender and recipient blocks, parcel weight, a valid product code (Colissimo Domicile, Point Retrait, Expert for international, Eco for Outre-Mer), and customs fields if you're shipping outside France. The field groupings are documented clearly: the sub-blocks are Service for product type and tariffs, Parcel for insurance and options, Sender, Addressee, and CustomsDeclarations.

Here's the failure mode that catches almost everyone building a homegrown client: field order. This isn't a style preference — it's a hard contract requirement. La Poste's technical documentation states it in nearly identical language across every version of the spec: when calling these methods, the parameters must be entered in the order defined in the wsdl, otherwise an "unmarshalling error" will be returned. Switching to the REST variant doesn't save you either. As one integrator who's shipped this repeatedly puts it, choosing REST doesn't eliminate the field order, the product codes, or checkGenerateLabel — in SOAP, the XML order is contractual, and a client that serializes by name rather than WSDL sequence takes an unmarshalling error, the first bug of a homegrown SDK.

Translation: if you're building your own request object by hand, or binding it through a library that serializes dict/map keys alphabetically, you will hit this. The fix is mechanical — walk the WSDL's declared sequence for each complex type (Letter, Service, Parcel, Sender, Addressee, CustomsDeclarations) and emit fields in that exact order, every time, regardless of which fields are populated. A schema-validation test in CI that checks your serialized XML against the WSDL sequence before every deploy catches this permanently — the same discipline we'd recommend for any FedEx SOAP-to-REST migration.

A successful generateLabel response gives you the label itself (PDF or ZPL/DPL depending on your outputFormat parameter, base64-encoded) plus the generated parcel number. Store that parcel number — it's your key for the next step.

Step 6: Verify the Shipment on the Suivi v2 Tracking API

Here's the part that trips up people expecting one unified Colissimo API: tracking lives on a completely different host, with a completely different auth model. Where label generation uses contract number plus password embedded in the SOAP body, Suivi v2 is a REST API on La Poste's Okapi gateway, authenticated with a header.

Register separately at developer.laposte.fr, subscribe to the Suivi product, and copy your key — a free API key requires creating an account on developer.laposte.fr, opening the Suivi API and subscribing to its free plan, then copying the key of the subscription, the X-Okapi-Key, 64 characters. Note that you'll get distinct keys for recette (sandbox) and production — La Poste's own portal is explicit that integrators should flag which one they're referencing: the parameter documentation states X-Okapi-Key: your key (string, required) - Votre clé Okapi is mandatory on every request.

The call pattern:

curl -H "Accept: application/json" \
     -H "X-Okapi-Key: YOUR_OKAPI_KEY" \
     "https://api.laposte.fr/suivi/v2/idships/6A12345678912?lang=fr_FR"

How you know it worked: a 200 response with a tracking event array referencing the same parcel number you got back from generateLabel in Step 5. Watch your call volume if you're polling post-label — the free plan has a quota of 10 requests per second as listed on developer.laposte.fr. For a single parcel polled every 30 minutes that's a non-issue; for a batch job re-checking hundreds of shipments on a timer, it's worth rate-limiting client-side before La Poste does it for you with a 401 or 429.

Failure Case: What Breaks and How to Catch It

The field-order unmarshalling error from Step 5 is the dominant failure mode in practice, and it's worth building a specific regression test for it rather than catching it live. Add a contract test that serializes a known-good request object and diffs the resulting XML element order against the WSDL's declared sequence before every deploy — not just a schema validation, an order validation.

The secondary failure mode shows up on international shipments: missing customs or EORI fields on the CustomsDeclarations block causes a silent reject rather than a loud error, since customs data is conditionally required depending on destination and product code. If you're shipping Colissimo Expert internationally, validate that block explicitly in your own pre-flight checks rather than trusting checkGenerateLabel alone to catch every missing customs field.

Zoom out and this low-friction-but-undocumented pattern isn't unique to one integration — it's structural. Independent scoring from API Evangelist puts this in context: Colissimo scores 34.8 of 100 (thin) on the Kin Score, API Evangelist's rubric for API discoverability, contract quality, governance, operational transparency, developer ergonomics and access clarity. That's a useful data point for why teams building against several French and EU carriers often reach for an aggregation layer instead of maintaining bespoke SOAP clients per carrier.

Where Aggregators Fit (and When to Skip Them)

Platforms like Sendcloud, ShippyPro, Boxtal and Cargoson wrap Colissimo's SOAP quirks — the field order, the dual auth models, the checkGenerateLabel dance — behind a normalized multi-carrier API. That trade is worth making if Colissimo is one of several carriers in your routing mix alongside DPD, GLS or DHL Paket, and you'd rather not own WSDL-sequence regression tests for each one.

It's worth building direct if Colissimo is the majority of your parcel volume and you want checkGenerateLabel-level control over validation timing, retry logic, and exactly which fields trigger which rejection codes. A rough DX scorecard for where this integration sits today:

DimensionColissimo SLS (direct)
Auth modelContract number + password in request body (no OAuth2/Bearer)
Sandbox availabilitySeparate sandbox host at ws.colissimo.fr/sandbox/sls-ws
Field-order riskHigh — unmarshalling errors on non-WSDL-sequence serialization
Tracking stackSeparate: Suivi v2 REST on Okapi, distinct X-Okapi-Key auth
Self-serve onboardingNone — requires negotiated Entreprise contract

Treat this walkthrough as the groundwork for a fuller teardown. Once you've got checkGenerateLabel, generateLabel and Suivi v2 wired up and passing in sandbox, the next test worth running is throughput under load — how the SOAP endpoint behaves at volume, and whether the 10 req/s Suivi quota becomes a real bottleneck once you're tracking production parcel counts rather than a handful of test shipments.