The Shipment Tracking - Unified API has implemented a new functionality that allows users to know when a shipment didn't have a successful delivery and it's then returning to its origin.
You will identify this by a simple flag like the following: "returnFlag": true,
This flag will only appear when the shipment has been identified as a return. Then, if the shipment had a standard delivery, the flag won't appear marking it as false; it simply won't appear at all.
The return flag functionality doesn't yet support parcel Germany shipments ("service": "parcel-de")
Note that these types of returns don't include the case when a customer isn't satisfied with a product and decides to return it; that process usually includes two tracking IDs, one for the initial delivery label and another for the return.
If you detect an issue with this new flag where shipments are incorrectly marked as returns, or an undeliverable shipment is missing the return flag, please open a ticket on our Help Center and let us know. We are striving to improve our systems constantly.