Skip to content

Information in the "Address" is overrided when creating a travel object  #279

Open

Description

@ryzhang

Dear support,

I'm using the api to create the travel object , for example "RailObject". My example request is like:

{
    "RailObject": {
        "Segment": {
            "StartDateTime": {
                "date": "2022-09-04",
                "time": "19:44:00"
            },
            "StartStationAddress": {
                "address": "杭州东站",
                "city": "杭州市",
                "zip": "330113",
                "country": "CN",
                "latitude": "30.291538",
                "longitude": "120.212427"
            },
            "start_station_name": "杭州东站",
            "carrier_name": "铁路12306",
            "coach_number": "4",
            "confirmation_num": "E312023219",
            "seats": "9C",
            "train_number": "G1656"
        },
        "Traveler": {
            "first_name": "张",
            "last_name": "三"
        }
    }
}

You can see inside the "StartStationAddress", I explicitly input the city, zip, latitude, and longitude. The request could be executed successfully but all those explicitly specified fields in the response are changed. Does it mean TripIt API ignores all the fields of type Address except the "address" subfield in the request? But the information input by the user is in my case more accurate and more readable(the city subfield is also Chinese characters as address subfield) for the user. So Is it a limitation for the TripIt API? Do we have any mechanisms to disable TripIt to override this information?

{
    "timestamp": "1655280627",
    "num_bytes": "1292",
    "RailObject": {
        "id": "1182752894",
        "trip_id": "319340789",
        "is_client_traveler": "true",
        "relative_url": "/reservation/show/id/1182752894",
        "display_name": "Rail",
        "is_display_name_auto_generated": "true",
        "last_modified": "1655280627",
        "is_purchased": "true",
        "is_tripit_booking": "false",
        "is_concur_booked": "false",
        "Segment": {
            "StartDateTime": {
                "date": "2022-09-04",
                "time": "19:44:00",
                "timezone": "Asia/Shanghai",
                "utc_offset": "+08:00",
                "is_timezone_manual": "false"
            },
            "EndDateTime": {
                "date": "2022-09-04"
            },
            "StartStationAddress": {
                "address": "杭州东站",
                "city": "Hang Zhou Shi",
                "zip": "310000",
                "country": "CN",
                "latitude": "30.293738",
                "longitude": "120.208378"
            },
            "start_station_name": "杭州东站",
            "carrier_name": "铁路12306",
            "coach_number": "4",
            "confirmation_num": "E312023219",
            "seats": "9C",
            "train_number": "G1656",
            "id": "3721862481"
        },
        "Traveler": {
            "first_name": "张",
            "last_name": "三"
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions