Streamed Statuses offer a way of quickly finding out about status changes of your shipments. No need to fetch with a getStatus call; we will deliver the data to you by a streaming push mechanism. You can subscribe to events and when an update occurs, we will post status data to the URL you specify in MyTranssmart in menu [Manage account, Streamed Statuses].
First step is to make sure you have an endpoint that can receive status updates.
Next step is enabling and completing the configuration in the setup page:
URL = your endpoint
Authentication = choose between None, Header or Basic depending on your own configuration choice.
Important note: in your mapping, make sure to read the status value from the field genericStatusCode in the shipmentLines and not from the shipmentStatus in the shipment header. The reason is that for some carriers we don't receive the status update on the shipment header level and by an algoritm we change the status on the shipment header level after checking the status per shipment line.
A shipment has 3 lines:
Line 1: package with status DONE
Line 2: package with status TRNS
Line 3: package with status TRNS
The shipment header status is TRNS
We receive the status update of package line 2 which changes to DONE. Because there is still a package with status TRNS (line 3), the algoritm doesn't change the shipment header status so it stays TRNS.
We receive the status update of package line 3 which changes to DONE. Because there are no more packages with status TRNS, the algoritm changes the shipment header status to DONE. But, at the moment we received the status update, we already pushed the status message to the customer's endpoint. At that moment, the field shipmentStatus in the header was still TRNS, while the genericStatusCode in the shipmentLine was status DONE. If you would map to the shipment header status, the shipment will stay on TRNS in your system instead of changing to DONE. So, therefor it's important to map to the status value from the field genericStatusCode in the shipmentLines.
The payload sent in the status notification is the same as the response to status retrieval requests, chapter 5.1 of our DevDocs: https://devdocs.transsmart.com/#_5_2_status_stream