Skip to content

Is it possbile for the integration app to receive the notification from the tripit? #277

Open

Description

@ryzhang

I have developed an app that TripIt users can authorize to read the itinerary data from the TripIt. I want to know if it's possible for the app to receive the notification when any unfiled item is created under the user's account. If this notification function exists, is there any detailed documentation or tutorial for it? thanks

Best Regards
Yan

Activity

  1. julsat commented on May 31, 2022

    @julsat

    Hi Yan,
    you can find notification api documentation here: https://tripit.github.io/api/doc/v1/notification.html

    -Julia

  2. ryzhang commented on Jun 1, 2022

    @ryzhang
    Author

    Thanks, but it seems the current notification can only notify the change of the trip object.

    type - The type of the object that was changed. Currently, this is always "trip". In the future additional types may be available, so this parameter should be checked.

    But I expect to monitor the creation of unfiled items so that I can make take action on it. Do you know if it's supported?

  3. julsat commented on Jun 2, 2022

    @julsat

    Notification on unfiled items alone is not supported. You can track an unfiled item when a trip gets created out of it or a trip item moves into an unfiled item.

  4. ryzhang commented on Jun 2, 2022

    @ryzhang
    Author

    thanks, Julia. That's not exactly what I want. I want to receive the notification once the unfiled item is created, and then my app knows it can fetch new unfiled items from the TripIt platform, parse them again using its own logic and generate the expected travel objects. This is mainly for supporting some cases that TripIt cannot handle yet. Anyway, thanks for your information.

    I have another question regards the unfiled item if you don't mind I ask it directly in this thread.

    When I fetch the unfiled item, usually It returns a list of NoteObjects and each NoteObject contains the property "relative_url". like below

     {
                "id": "3706028873",
                "relative_url": "/trip_item/show/id/3706028873",
                "display_name": "转发: 机票确认单",
                "is_display_name_auto_generated": "false",
                "last_modified": "1654064441",
                "text": "XXXXXXXXXXXXXXXXXXX"
        }
    

    But when I access the corresponding "relative_url" (https://api.tripit.com/trip_item/show/id/3706028873), It returns the response 404 "Page Not found". Could you let me know how I suppose to access this relative_url?

  5. julsat commented on Jun 2, 2022

    @julsat

    you can use this relative url to access your item in webapp. in your case, https://www.tripit.com/trip_item/show/id/3706028873 should display details of your unfiled item.

  6. ryzhang commented on Jun 3, 2022

    @ryzhang
    Author

    thanks. Julia.

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