Closed garyhooper closed 6 years ago
For your first question object IDs are unique only within their object types, for example it is possible to have a Trip with id 123 and an AirObject with id 123.
For your second question, all Segments are guaranteed to have an ID as noted in the tripit api object xsd (the relevant sections being the Air, Transport, Rail, and Cruise Segment types). Thanks for alerting us to an error in our example documentation.
Let us know if you have any more questions!
To clarify, are all Segment IDs unique, even across trips? E.g. if trip 123 contained segment 123, would I ever encounter another segment 123 in a different trip?
Yes, segment IDs are unique across trips.
Per your example, if trip 123 had segment 123, then you would never encounter segment 123 in any other trip.
Are object IDs unique across all objects, or only within object type? E.g. would I ever encounter the same object ID for a trip, airObject, and/or segment?
Further, are all Segments guaranteed to have an ID? (The example about a third of the way down in http://tripit.github.io/api/doc/v1/index.html does not.)
Thanks.