FlightAware Discussions

SetAlert with date_start && date_end

I have tested this, when I set an alert without date_start && date_end the notifications are sent and my endpoint logs the request. However, when I attempt to set date_start and date_end, I am not getting the request at all. In the example below, you will see two alerts set, one with and one without:

{
    "GetAlertsResult": {
        "num_alerts": 2,
        "alerts": [
            {
                "alert_id": 28970377,
                "enabled": true,
                "description": "American Airlines 2778 From KATL",
                "type": "Form_Airline",
                "ident": "AAL2778",
                "user_ident": "",
                "aircrafttype": "",
                "origin": "KATL",
                "destination": "",
                "date_start": 0,
                "date_end": 0,
                "channels": [
                    {
                        "channel_id": 16,
                        "channel_name": "FlightXML push",
                        "mask_summary": "meetingFlight",
                        "e_filed": true,
                        "e_departure": true,
                        "e_arrival": true,
                        "e_diverted": true,
                        "e_cancelled": true,
                        "target_address": "LakeFrontCargo"
                    }
                ],
                "alert_created": 1552143778,
                "alert_changed": 1552143778
            },
            {
                "alert_id": 28970465,
                "enabled": true,
                "description": "Southwest 4272 From KATL",
                "type": "Form_Airline",
                "ident": "SWA4272",
                "user_ident": "",
                "aircrafttype": "",
                "origin": "KATL",
                "destination": "",
                "date_start": 1552089600,
                "date_end": 1552176000,
                "channels": [
                    {
                        "channel_id": 16,
                        "channel_name": "FlightXML push",
                        "mask_summary": "meetingFlight",
                        "e_filed": true,
                        "e_departure": true,
                        "e_arrival": true,
                        "e_diverted": true,
                        "e_cancelled": true,
                        "target_address": "LakeFrontCargo"
                    }
                ],
                "alert_created": 1552144265,
                "alert_changed": 1552144265
            }
        ]
    }
}

Am i possibly not sending the date correctly?

SOLVED…This is suddenly working again with no modifications

It looks like in most cases the alert is being set a few hours before the desired flight departs. In this case you may experience more reliability by not setting the alert start time.

Also, if you are looking for a very specific flight then submitting the alert using the faFlightID as the ident will remove the need to use start and end times.

1 Like

Thanks, I thought I had the issue resolved but was still buggy for me. This works PERFECTLY!