A good approach is to track the delivery
Get delivery information
- GET /deliveries?jobId<myJobId>
- X-Auth-Token header with the token you get from the authenticate
- Check that the status is OUTPUTTED. If not, just wait for the output triggers.
- Otherwise you will get a list of shipments and you can parse each of them looking for some information (metadata)
Shipment metadata
- metadataKind=TRACKING & metadataType=SHORT_VALUE & name=TRACKING to get the registered tracking number
- metadataKind=TRACKING & metadataType=FILE & name=TRACKING_DETAIL to get a json complete tracking from (LaPoste_Fr or LaPoste_Be national posts)
- metadataKind=TRACKING & metadataType=FILE & name=ACKN to get the acknowledgement PDF proof
- metadataKind=TRACKING & metadataType=FILE & name=CERTIF to get he deposit PDF proof
You can get a proof using GET /shipments/<shipmentId>/trackingFile/trackingName