omnibus / chronopost
Omnibus Chronopost: prices (Quickcost), shipments and labels, tracking and Pickup relay points - the SOAP web services.
Requires
- php: >=8.2
- glitchr/omnibus: ^2.0@dev
- symfony/http-client: ^6.4|^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Chronopost for glitchr/omnibus: Quickcost prices, skybills with their labels (ShippingServiceWS), tracking and cancellation (TrackingServiceWS), Pickup relays (PointRelaisServiceWS) - the SOAP web services on ws.chronopost.fr.
$gateway = (new ChronopostGatewayFactory($http))->create($options); // $http: the application's HTTP client - none given, the factory makes its own; the options below
No framework needed: the package requires glitchr/omnibus and symfony/http-client. In a
Symfony application, the same through the bundle's configuration:
omnibus: gateways: chronopost: factory: chronopost options: account_number: '%env(CHRONOPOST_ACCOUNT)%' # 8 digits password: '%env(CHRONOPOST_PASSWORD)%' sub_account: null rates: [...] # optional: configured prices instead of Quickcost
The service is the product code (01 Chrono 13, 02 Chrono 10, 16 Chrono 18, 86 Chrono Relais 13,
17 Chrono Classic, 44 Chrono Express, and the Chronofresh ranges below); a shipment with a pickupPoint defaults to 86. Shipment
options: label_format (PDF, ZPL), products (the codes Quickcost keeps), product, use_by,
sell_by, saturday (Chronofresh).
Chronofresh
Food under controlled temperature (Chronopost Food). A shipment asks for a range with its
product option, and gives the parcel's use-by date:
product |
At home | To a relay | |
|---|---|---|---|
fresh |
2R Chrono Fresh 13 | 6S Chrono Fresh Relais 13 | 0 to 4 °C |
freeze |
2S Chrono Freeze 13 | - | -18 °C |
ambient |
5M Chrono Ambient 13 | 5Q Chrono Ambient Relais 13 | dry food |
$gateway->ship(new Shipment($sender, $recipient, [$parcel], options: [ 'product' => 'fresh', 'use_by' => $useBy, // a date or "2026-10-11": the shortest of what the parcel holds 'sell_by' => null, // when it differs from use_by 'saturday' => false, // true: delivered on a Saturday (service 6) ], shippingDate: $monday));
A service named on the shipment wins over the range. The use-by date goes as
scheduledValue (expirationDate, sellByDate). A fresh or frozen parcel without one, or whose
date does not outlast the shipping day, is refused here before Chronopost is asked: it would not
be delivered. Quickcost prices the range with the shipment option products: ['2R'], when the
contract has it; rates otherwise.
Chronofresh needs its own contract (a food business, an approved insulated packaging, parcels
handed over from Monday to the day the contract allows). Not verified against a real
contract: the codes and fields are those of the public integrations of Chronopost Food; the
order of scheduledValue in the request and the Saturday service in particular are to be
confirmed on a first real skybill.
Credentials: a Chronopost contract gives the account number and the web services password. There
is no sandbox: Chronopost's published test account is 19869502 / 255562
(ChronopostGatewayFactory::TEST_ACCOUNT), which issues test skybills.
Built from Chronopost's published web services documentation and tested on recorded answers; not yet run against the test account.
Responsibility
This package is an independent, unofficial client: it is not affiliated with, endorsed by or sponsored by Chronopost SAS (La Poste group). It reaches their service on behalf of whoever runs it, and it does not redistribute their data beyond the short excerpts recorded as test fixtures. Its MIT licence covers this package's code only and grants no right to the service or to its data.
Whoever installs and runs this package is responsible for complying with Chronopost's terms (chronopost.fr general conditions of use), for obtaining whatever they require (an account, a key, a licence or subscription, an attribution or a citation, a rate limit to respect), and for any use made of what it returns. The authors publish it free of charge, make no commercial use of it, and accept no liability for how it is used (see LICENSE).
License: MIT since 2026-10-09; earlier versions remain published under LGPL-3.0-or-later.