Within the sailing_info_tracking object of our API response, you will find different legs of the vessel journey ("leg" = connecting stops, eg. from port A to B, B to C).
In this object, under sailing_info, you will find PODs listed here.
- If there are more than 1 PODs listed in this section, that means there are transshipment ports present in the vessel journey.
- If there is only 1 POD listed, there are no transshipment ports present
- Note that the last POD in the series is the final port of departure
How you can identify a transshipment port in our API response:
Please find below a short Python Snippet on how you can retrieve the Transhipment port details from our API Response:
# Get the sailing_info_tracking list from our API Response sailing_info_tracking = PortcastAPIResponse.sailing_info_tracking # is_transshipment_present = if the length of sailing_info_tracking object from our API response is more than 1 is_transshipment_present = (True if len(sailing_info_tracking)>1 else False) # list_of_transshipment_ports = pod key for each object in our sailing_info_tracking list. list_of_transshipment_ports = [] for sailing_info_obj in sailing_info_tracking[:-1]: ts_name = sailing_info_obj.sailing_info['pod'] list_of_transshipment_ports.append(ts_name)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article