Post Alert error

Hello,

I am starting to see random occurances of an error when we are posting an alert. The alert error I received from the API is

Aero API callout failed: 400 : {“title”:“Invalid Argument”,“reason”:“INVALID_ARGUMENT”,“detail”:“This alert will have more than 50 duplicates currently enabled”,“status”:400}

The request is: {“start”:“2024-10-17”,“origin”:“KMEM”,“max_weekly”:1000,“ident”:“AAL439”,“events”:{“out”:true,“on”:true,“off”:true,“in”:true,“filed”:false,“diverted”:true,“departure”:false,“cancelled”:true,“arrival”:false},“eta”:0,“end”:“2024-10-17”,“destination”:“KMIA”}

I am trying to set an alert for a single flight, so I am setting an alert for a flight number for 1 day. I dont understand why I am getting this error as there should not be no more than 2 flights for this flight number in one day. I dont see how there can be more than 50. Is the information such as the flight number incorrect?

Any help would be greatly appeciated.

Thanks,
Jim

Your account has multiple occurrences of 50 or more enabled alerts that have the same ident+origin+destination combination. Are you actually intending to do that, or is that a mistake in your own logic?

 m_ident | m_origin | m_destination | count
---------+----------+---------------+-------
 ENY3769 | KTLH     | KMIA          |    52
 ENY3865 | KMRY     | KPHX          |    51
 AAL148  | KPHX     | KBFL          |    51
 ENY3865 | KPHX     | KMRY          |    51
 ENY3451 | KMIA     | KTLH          |    51
 ENY4259 | KPHX     | KNYL          |    51
 ENY3986 | KNYL     | KPHX          |    50
 AAL1622 | KMCI     | KPHX          |    50
 ENY3542 | KDFW     | KMGM          |    50
 ENY3493 | KMHK     | KDFW          |    50
 ENY3897 | KOKC     | KDFW          |    50
 ENY3479 | KDFW     | KICT          |    50
 ENY3850 | KDFW     | KLIT          |    50
 ENY4146 | KICT     | KORD          |    50
 ENY3460 | KDFW     | KLEX          |    50
 ENY3823 | KDFW     | KHRL          |    50
 ENY3848 | KMLU     | KDFW          |    50
 ENY3479 | KICT     | KDFW          |    50
 ENY3787 | KORD     | KTUL          |    50
 ENY3382 | KORD     | KICT          |    50
 ENY3556 | KDFW     | KSGF          |    50
 ENY3459 | KGRK     | KDFW          |    50
 ENY3671 | KDFW     | KSGF          |    50
 ENY3542 | KMGM     | KDFW          |    50
 ENY3867 | KTUL     | KPHX          |    50
 ENY3689 | KDFW     | KOKC          |    50
 ENY3543 | KDFW     | KSJT          |    50
 AAL148  | KBFL     | KPHX          |    50
 ENY3553 | KDFW     | KSGF          |    50
 ENY4279 | KDFW     | KMAF          |    50
 ENY3903 | KTRI     | KDFW          |    50
 ENY3884 | KSGF     | KDFW          |    50
 ENY3394 | KRDU     | KORD          |    50
 ENY3704 | KMAF     | KDFW          |    50
 ENY3878 | KPHX     | KABQ          |    50
 UAL2645 | KMCI     | KDEN          |    50
 ENY3850 | KLIT     | KDFW          |    50
 UAL1542 | KDEN     | KSBA          |    50
 ENY3637 | KPHX     | KRDM          |    50
 UAL1039 | TNCA     | KEWR          |    50

Wasnt expecting that. I must have misinterpreted how that worked. Here is our process :
We receive a list of flights we need to track on a daily basis. We set an alert for that flight on that day. We have the scheduled flight info so we are trying to set the alert for that specific flight. That seemed to be working. When we receive the ‘IN’ alert we are suppose to delete the alert. However, I also reported we were not getting the actual in, and therefore those flight alerts would not get deleted. From your suggestion, we are in the process of making the changes to process the estimated time when the actual in is not received. Based on your list, there are a lot of alerts that did not get deleted. I deleted them last night and will run a job that will clean up old alerts on a nightly basis. But the count numbers seem high compared to the number of alert deletions due to missing actual in.

So I am assumming that the start and end date does not make the alert unique and is striclty going off the flight number origin and arrival. Are the alerts continuosly firing for those flights regardless of the start and end times? Looking at our usage something went out of whack late September. We track ~2000 flights a month and get 4 alerts (out,off,on,in) normally excluding delays and diversions. How do we have 28,0000 push requests this month, normally is under 8,000. We have been running pretty consistant for the year. We havent changed anything and our requests have been tthe same. I thought by specifying the start and end date we wouldn’t get alerted on those flights outside of that day.

Thanks for you help,
Jim

If you specify an end date for the alert, then it should get automatically disabled by us once the date passes–you don’t absolutely need to delete it yourself in that case. However, start or end dates (or any other fields) do not make the alerts unique and prevent you from creating more alerts with the same criteria. Sometimes creating duplicate alerts is desirable, such as when you are provisioning alerts for unrelated end-users on your side.

I don’t have convenient access to your request history, however if you have had 50x duplicate alerts configured for several dozen different flights, then you may have been getting delivered many more pushed events than you were expecting, and that would contribute your higher-than-expected usage.

And just to clarify, the 50x duplicate enabled alerts that your account had were typically showing identical date_start and date_end parameters, and did not appear to be the accumulation of alerts from prior days.

Is it possible to send me the list of alerts you received on Sept 28 so I can debug what happend. That appears ti be the date that had the spike.

Here’s the number of alerts on your account, based on the date_start parameter, so Sept 28 isn’t the only date involved in your high usage

 date_start | count
------------+-------
 2024-10-22 |  1300
 2024-10-21 |  2000
 2024-10-20 |    77
 2024-10-19 |    70
 2024-10-18 |    68
 2024-10-17 |  1050
 2024-10-16 |   888
 2024-10-15 |    48
 2024-10-14 |   700
 2024-10-13 |    68
 2024-10-12 |  1050
 2024-10-11 |    51
 2024-10-10 |    56
 2024-10-09 |    55
 2024-10-08 |    52
 2024-10-07 |    56
 2024-10-06 |    56
 2024-10-05 |    61
 2024-10-04 |   150
 2024-10-03 |    48
 2024-10-02 |    53
 2024-10-01 |    65
 2024-09-30 |    62
 2024-09-29 |    61
 2024-09-28 |  1400            <------
 2024-09-27 |    62
 2024-09-26 |    67
 2024-09-25 |    73
 2024-09-24 |    61
 2024-09-23 |    73
 2024-09-22 |    78
 2024-09-21 |    65
 2024-09-20 |    76
 2024-09-19 |    79
 2024-09-18 |    66
 2024-09-17 |    67
 2024-09-16 |    84
 2024-09-15 |   244
 2024-09-14 |    80
 2024-09-13 |    64
 2024-09-12 |    87
 2024-09-11 |    62
 2024-09-10 |    45

Here are the first few (not all 1400) alerts created for date_start of Sept 28, ordered by the created timestamp column. (Maybe you are creating them on a 5-minute interval?)

    id    |       created       |       deleted       | m_ident | m_origin | m_destination | date_start |  date_end
----------+---------------------+---------------------+---------+----------+---------------+------------+------------
 73318485 | 2024-09-28 05:05:26 | 2024-10-22 06:42:24 | ENY3366 | KMIA     | KSDF          | 2024-09-28 | 2024-09-28
 73318483 | 2024-09-28 05:05:26 | 2024-10-22 06:42:24 | ENY3768 | KMIA     | KPNS          | 2024-09-28 | 2024-09-28
 73318484 | 2024-09-28 05:05:26 | 2024-10-22 06:42:24 | ENY3768 | KPNS     | KMIA          | 2024-09-28 | 2024-09-28
 73318489 | 2024-09-28 05:05:27 | 2024-10-22 06:42:24 | AAL2296 | KMCI     | KDFW          | 2024-09-28 | 2024-09-28
 73318486 | 2024-09-28 05:05:27 | 2024-10-22 06:42:24 | ENY3719 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318488 | 2024-09-28 05:05:27 | 2024-10-22 06:42:24 | ENY3580 | KORD     | KMCI          | 2024-09-28 | 2024-09-28
 73318491 | 2024-09-28 05:05:27 | 2024-10-22 06:42:24 | AAL2351 | MMMX     | KDFW          | 2024-09-28 | 2024-09-28
 73318490 | 2024-09-28 05:05:27 | 2024-10-22 06:42:24 | AAL2350 | KDFW     | MMMX          | 2024-09-28 | 2024-09-28
 73318487 | 2024-09-28 05:05:27 | 2024-10-22 06:42:25 | ENY4107 | KMEM     | KORD          | 2024-09-28 | 2024-09-28
 73318497 | 2024-09-28 05:05:28 | 2024-10-22 06:42:25 | ENY3833 | KORD     | KBHM          | 2024-09-28 | 2024-09-28
 73318493 | 2024-09-28 05:05:28 | 2024-10-22 06:42:25 | ENY3846 | KBTV     | KORD          | 2024-09-28 | 2024-09-28
 73318495 | 2024-09-28 05:05:28 | 2024-10-22 06:42:25 | ENY3555 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318496 | 2024-09-28 05:05:28 | 2024-10-22 06:42:25 | ENY3629 | KLEX     | KORD          | 2024-09-28 | 2024-09-28
 73318494 | 2024-09-28 05:05:28 | 2024-10-22 06:42:25 | ENY3631 | KORD     | KSGF          | 2024-09-28 | 2024-09-28
 73318502 | 2024-09-28 05:05:29 | 2024-10-22 06:42:26 | ENY3837 | KDFW     | KAMA          | 2024-09-28 | 2024-09-28
 73318505 | 2024-09-28 05:05:29 | 2024-10-22 06:42:25 | ENY3931 | KORD     | KDTW          | 2024-09-28 | 2024-09-28
 73318499 | 2024-09-28 05:05:29 | 2024-10-22 06:42:26 | ENY3463 | KMIA     | MMMD          | 2024-09-28 | 2024-09-28
 73318498 | 2024-09-28 05:05:29 | 2024-10-22 06:42:25 | AAL497  | KSAN     | KCLT          | 2024-09-28 | 2024-09-28
 73318500 | 2024-09-28 05:05:29 | 2024-10-22 06:42:26 | ENY3587 | MMMD     | KDFW          | 2024-09-28 | 2024-09-28
 73318504 | 2024-09-28 05:05:29 | 2024-10-22 06:42:26 | ENY3567 | KMCI     | KORD          | 2024-09-28 | 2024-09-28
 73318508 | 2024-09-28 05:05:30 | 2024-10-22 06:42:26 | AAL1325 | KCLT     | KDSM          | 2024-09-28 | 2024-09-28
 73318509 | 2024-09-28 05:05:30 | 2024-10-22 06:42:26 | ENY3437 | KORD     | KRST          | 2024-09-28 | 2024-09-28
 73318510 | 2024-09-28 05:05:30 | 2024-10-22 06:42:26 | ENY3892 | KPHX     | MMMZ          | 2024-09-28 | 2024-09-28
 73318507 | 2024-09-28 05:05:30 | 2024-10-22 06:42:26 | AAL2291 | KMEM     | KCLT          | 2024-09-28 | 2024-09-28
 73318506 | 2024-09-28 05:05:30 | 2024-10-22 06:42:26 | ENY3931 | KDTW     | KORD          | 2024-09-28 | 2024-09-28
 73318511 | 2024-09-28 05:05:31 | 2024-10-22 06:42:26 | ENY3892 | MMMZ     | KPHX          | 2024-09-28 | 2024-09-28
 73318513 | 2024-09-28 05:05:31 | 2024-10-22 06:42:27 | ENY3461 | KLIT     | KCLT          | 2024-09-28 | 2024-09-28
 73318512 | 2024-09-28 05:05:31 | 2024-10-22 06:42:27 | ENY3859 | KPHX     | KSEA          | 2024-09-28 | 2024-09-28
 73318556 | 2024-09-28 05:10:27 | 2024-10-22 06:42:27 | ENY3768 | KMIA     | KPNS          | 2024-09-28 | 2024-09-28
 73318557 | 2024-09-28 05:10:28 | 2024-10-22 06:42:27 | ENY3768 | KPNS     | KMIA          | 2024-09-28 | 2024-09-28
 73318559 | 2024-09-28 05:10:28 | 2024-10-22 06:42:27 | ENY3719 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318558 | 2024-09-28 05:10:28 | 2024-10-22 06:42:27 | ENY3366 | KMIA     | KSDF          | 2024-09-28 | 2024-09-28
 73318562 | 2024-09-28 05:10:29 | 2024-10-22 06:42:27 | AAL2296 | KMCI     | KDFW          | 2024-09-28 | 2024-09-28
 73318565 | 2024-09-28 05:10:29 | 2024-10-22 06:42:28 | ENY3846 | KBTV     | KORD          | 2024-09-28 | 2024-09-28
 73318560 | 2024-09-28 05:10:29 | 2024-10-22 06:42:28 | ENY4107 | KMEM     | KORD          | 2024-09-28 | 2024-09-28
 73318561 | 2024-09-28 05:10:29 | 2024-10-22 06:42:28 | ENY3580 | KORD     | KMCI          | 2024-09-28 | 2024-09-28
 73318563 | 2024-09-28 05:10:29 | 2024-10-22 06:42:27 | AAL2350 | KDFW     | MMMX          | 2024-09-28 | 2024-09-28
 73318564 | 2024-09-28 05:10:29 | 2024-10-22 06:42:27 | AAL2351 | MMMX     | KDFW          | 2024-09-28 | 2024-09-28
 73318569 | 2024-09-28 05:10:30 | 2024-10-22 06:42:28 | ENY3833 | KORD     | KBHM          | 2024-09-28 | 2024-09-28
 73318568 | 2024-09-28 05:10:30 | 2024-10-22 06:42:28 | ENY3629 | KLEX     | KORD          | 2024-09-28 | 2024-09-28
 73318567 | 2024-09-28 05:10:30 | 2024-10-22 06:42:28 | ENY3555 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318570 | 2024-09-28 05:10:30 | 2024-10-22 06:42:28 | AAL497  | KSAN     | KCLT          | 2024-09-28 | 2024-09-28
 73318566 | 2024-09-28 05:10:30 | 2024-10-22 06:42:28 | ENY3631 | KORD     | KSGF          | 2024-09-28 | 2024-09-28
 73318572 | 2024-09-28 05:10:31 | 2024-10-22 06:42:29 | ENY3587 | MMMD     | KDFW          | 2024-09-28 | 2024-09-28
 73318574 | 2024-09-28 05:10:31 | 2024-10-22 06:42:29 | ENY3567 | KMCI     | KORD          | 2024-09-28 | 2024-09-28
 73318575 | 2024-09-28 05:10:31 | 2024-10-22 06:42:29 | ENY3931 | KORD     | KDTW          | 2024-09-28 | 2024-09-28
 73318571 | 2024-09-28 05:10:31 | 2024-10-22 06:42:29 | ENY3463 | KMIA     | MMMD          | 2024-09-28 | 2024-09-28
 73318573 | 2024-09-28 05:10:31 | 2024-10-22 06:42:28 | ENY3837 | KDFW     | KAMA          | 2024-09-28 | 2024-09-28
 73318579 | 2024-09-28 05:10:32 | 2024-10-22 06:42:29 | ENY3437 | KORD     | KRST          | 2024-09-28 | 2024-09-28
 73318576 | 2024-09-28 05:10:32 | 2024-10-22 06:42:29 | ENY3931 | KDTW     | KORD          | 2024-09-28 | 2024-09-28
 73318577 | 2024-09-28 05:10:32 | 2024-10-22 06:42:29 | AAL2291 | KMEM     | KCLT          | 2024-09-28 | 2024-09-28
 73318580 | 2024-09-28 05:10:32 | 2024-10-22 06:42:29 | ENY3892 | KPHX     | MMMZ          | 2024-09-28 | 2024-09-28
 73318578 | 2024-09-28 05:10:32 | 2024-10-22 06:42:29 | AAL1325 | KCLT     | KDSM          | 2024-09-28 | 2024-09-28
 73318581 | 2024-09-28 05:10:33 | 2024-10-22 06:42:30 | ENY3892 | MMMZ     | KPHX          | 2024-09-28 | 2024-09-28
 73318583 | 2024-09-28 05:10:33 | 2024-10-22 06:42:29 | ENY3461 | KLIT     | KCLT          | 2024-09-28 | 2024-09-28
 73318582 | 2024-09-28 05:10:33 | 2024-10-22 06:42:30 | ENY3859 | KPHX     | KSEA          | 2024-09-28 | 2024-09-28
 73318644 | 2024-09-28 05:20:08 | 2024-10-22 06:42:30 | ENY3768 | KMIA     | KPNS          | 2024-09-28 | 2024-09-28
 73318648 | 2024-09-28 05:20:09 | 2024-10-22 06:42:30 | ENY4107 | KMEM     | KORD          | 2024-09-28 | 2024-09-28
 73318645 | 2024-09-28 05:20:09 | 2024-10-22 06:42:30 | ENY3768 | KPNS     | KMIA          | 2024-09-28 | 2024-09-28
 73318646 | 2024-09-28 05:20:09 | 2024-10-22 06:42:30 | ENY3366 | KMIA     | KSDF          | 2024-09-28 | 2024-09-28
 73318647 | 2024-09-28 05:20:09 | 2024-10-22 06:42:30 | ENY3719 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318649 | 2024-09-28 05:20:10 | 2024-10-22 06:42:31 | ENY3580 | KORD     | KMCI          | 2024-09-28 | 2024-09-28
 73318653 | 2024-09-28 05:20:10 | 2024-10-22 06:42:31 | ENY3846 | KBTV     | KORD          | 2024-09-28 | 2024-09-28
 73318650 | 2024-09-28 05:20:10 | 2024-10-22 06:42:31 | AAL2296 | KMCI     | KDFW          | 2024-09-28 | 2024-09-28
 73318651 | 2024-09-28 05:20:10 | 2024-10-22 06:42:30 | AAL2350 | KDFW     | MMMX          | 2024-09-28 | 2024-09-28
 73318652 | 2024-09-28 05:20:10 | 2024-10-22 06:42:31 | AAL2351 | MMMX     | KDFW          | 2024-09-28 | 2024-09-28
 73318657 | 2024-09-28 05:20:11 | 2024-10-22 06:42:41 | ENY3833 | KORD     | KBHM          | 2024-09-28 | 2024-09-28
 73318654 | 2024-09-28 05:20:11 | 2024-10-22 06:42:40 | ENY3631 | KORD     | KSGF          | 2024-09-28 | 2024-09-28
 73318656 | 2024-09-28 05:20:11 | 2024-10-22 06:42:31 | ENY3629 | KLEX     | KORD          | 2024-09-28 | 2024-09-28
 73318658 | 2024-09-28 05:20:11 | 2024-10-22 06:42:41 | AAL497  | KSAN     | KCLT          | 2024-09-28 | 2024-09-28
 73318655 | 2024-09-28 05:20:11 | 2024-10-22 06:42:41 | ENY3555 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318661 | 2024-09-28 05:20:12 | 2024-10-22 06:42:41 | ENY3837 | KDFW     | KAMA          | 2024-09-28 | 2024-09-28
 73318660 | 2024-09-28 05:20:12 | 2024-10-22 06:42:41 | ENY3587 | MMMD     | KDFW          | 2024-09-28 | 2024-09-28
 73318662 | 2024-09-28 05:20:12 | 2024-10-22 06:42:41 | ENY3567 | KMCI     | KORD          | 2024-09-28 | 2024-09-28
 73318659 | 2024-09-28 05:20:12 | 2024-10-22 06:42:41 | ENY3463 | KMIA     | MMMD          | 2024-09-28 | 2024-09-28
 73318663 | 2024-09-28 05:20:12 | 2024-10-22 06:42:42 | ENY3931 | KORD     | KDTW          | 2024-09-28 | 2024-09-28
 73318668 | 2024-09-28 05:20:13 | 2024-10-22 06:42:42 | ENY3892 | KPHX     | MMMZ          | 2024-09-28 | 2024-09-28
 73318667 | 2024-09-28 05:20:13 | 2024-10-22 06:42:42 | ENY3437 | KORD     | KRST          | 2024-09-28 | 2024-09-28
 73318664 | 2024-09-28 05:20:13 | 2024-10-22 06:42:42 | ENY3931 | KDTW     | KORD          | 2024-09-28 | 2024-09-28
 73318666 | 2024-09-28 05:20:13 | 2024-10-22 06:42:42 | AAL1325 | KCLT     | KDSM          | 2024-09-28 | 2024-09-28
 73318669 | 2024-09-28 05:20:13 | 2024-10-22 06:42:42 | ENY3892 | MMMZ     | KPHX          | 2024-09-28 | 2024-09-28
 73318665 | 2024-09-28 05:20:13 | 2024-10-22 06:42:42 | AAL2291 | KMEM     | KCLT          | 2024-09-28 | 2024-09-28
 73318672 | 2024-09-28 05:20:14 | 2024-10-22 06:42:42 | ENY3461 | KLIT     | KCLT          | 2024-09-28 | 2024-09-28
 73318671 | 2024-09-28 05:20:14 | 2024-10-22 06:42:42 | ENY3859 | KPHX     | KSEA          | 2024-09-28 | 2024-09-28
 73318736 | 2024-09-28 05:30:04 | 2024-10-22 06:42:43 | ENY3768 | KMIA     | KPNS          | 2024-09-28 | 2024-09-28
 73318740 | 2024-09-28 05:30:05 | 2024-10-22 06:42:43 | ENY3366 | KMIA     | KSDF          | 2024-09-28 | 2024-09-28
 73318743 | 2024-09-28 05:30:05 | 2024-10-22 06:42:43 | ENY4107 | KMEM     | KORD          | 2024-09-28 | 2024-09-28
 73318741 | 2024-09-28 05:30:05 | 2024-10-22 06:42:43 | ENY3719 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318737 | 2024-09-28 05:30:05 | 2024-10-22 06:42:43 | ENY3768 | KPNS     | KMIA          | 2024-09-28 | 2024-09-28
 73318750 | 2024-09-28 05:30:06 | 2024-10-22 06:42:43 | AAL2351 | MMMX     | KDFW          | 2024-09-28 | 2024-09-28
 73318747 | 2024-09-28 05:30:06 | 2024-10-22 06:42:43 | AAL2296 | KMCI     | KDFW          | 2024-09-28 | 2024-09-28
 73318749 | 2024-09-28 05:30:06 | 2024-10-22 06:42:43 | AAL2350 | KDFW     | MMMX          | 2024-09-28 | 2024-09-28
 73318752 | 2024-09-28 05:30:06 | 2024-10-22 06:42:43 | ENY3846 | KBTV     | KORD          | 2024-09-28 | 2024-09-28
 73318746 | 2024-09-28 05:30:06 | 2024-10-22 06:42:44 | ENY3580 | KORD     | KMCI          | 2024-09-28 | 2024-09-28
 73318754 | 2024-09-28 05:30:07 | 2024-10-22 06:42:44 | ENY3631 | KORD     | KSGF          | 2024-09-28 | 2024-09-28
 73318755 | 2024-09-28 05:30:07 | 2024-10-22 06:42:44 | ENY3555 | KSGF     | KDFW          | 2024-09-28 | 2024-09-28
 73318757 | 2024-09-28 05:30:07 | 2024-10-22 06:42:44 | ENY3833 | KORD     | KBHM          | 2024-09-28 | 2024-09-28
 73318756 | 2024-09-28 05:30:07 | 2024-10-22 06:42:44 | ENY3629 | KLEX     | KORD          | 2024-09-28 | 2024-09-28
 73318758 | 2024-09-28 05:30:07 | 2024-10-22 06:42:44 | AAL497  | KSAN     | KCLT          | 2024-09-28 | 2024-09-28
 73318759 | 2024-09-28 05:30:08 | 2024-10-22 06:42:45 | ENY3463 | KMIA     | MMMD          | 2024-09-28 | 2024-09-28
 73318760 | 2024-09-28 05:30:08 | 2024-10-22 06:42:45 | ENY3587 | MMMD     | KDFW          | 2024-09-28 | 2024-09-28
 73318761 | 2024-09-28 05:30:08 | 2024-10-22 06:42:45 | ENY3837 | KDFW     | KAMA          | 2024-09-28 | 2024-09-28
 73318762 | 2024-09-28 05:30:08 | 2024-10-22 06:42:44 | ENY3567 | KMCI     | KORD          | 2024-09-28 | 2024-09-28
 73318764 | 2024-09-28 05:30:08 | 2024-10-22 06:42:45 | ENY3931 | KDTW     | KORD          | 2024-09-28 | 2024-09-28
 73318763 | 2024-09-28 05:30:08 | 2024-10-22 06:42:44 | ENY3931 | KORD     | KDTW          | 2024-09-28 | 2024-09-28
 73318765 | 2024-09-28 05:30:09 | 2024-10-22 06:42:45 | AAL2291 | KMEM     | KCLT          | 2024-09-28 | 2024-09-28
 73318767 | 2024-09-28 05:30:09 | 2024-10-22 06:42:45 | AAL1325 | KCLT     | KDSM          | 2024-09-28 | 2024-09-28
 73318770 | 2024-09-28 05:30:09 | 2024-10-22 06:42:45 | ENY3892 | MMMZ     | KPHX          | 2024-09-28 | 2024-09-28
 73318768 | 2024-09-28 05:30:09 | 2024-10-22 06:42:45 | ENY3437 | KORD     | KRST          | 2024-09-28 | 2024-09-28
 73318769 | 2024-09-28 05:30:09 | 2024-10-22 06:42:45 | ENY3892 | KPHX     | MMMZ          | 2024-09-28 | 2024-09-28
 73318771 | 2024-09-28 05:30:10 | 2024-10-22 06:42:46 | ENY3859 | KPHX     | KSEA          | 2024-09-28 | 2024-09-28
 73318772 | 2024-09-28 05:30:10 | 2024-10-22 06:42:46 | ENY3461 | KLIT     | KCLT          | 2024-09-28 | 2024-09-28
 73318899 | 2024-09-28 05:40:05 | 2024-10-22 06:42:46 | ENY3768 | KMIA     | KPNS          | 2024-09-28 | 2024-09-28
 73318900 | 2024-09-28 05:40:05 | 2024-10-22 06:42:46 | ENY3768 | KPNS     | KMIA          | 2024-09-28 | 2024-09-28
 73318901 | 2024-09-28 05:40:06 | 2024-10-22 06:42:46 | ENY3366 | KMIA     | KSDF          | 2024-09-28 | 2024-09-28

Thanks. this is helpful,

Hello,
This is the error we are getting that caused the problem for us.

Aero API callout failed: 400 : {“title”:“Invalid Argument”,“reason”:“INVALID_ARGUMENT”,“detail”:“start cannot be before current day”,“status”:400}

A request for us to set an alert can come in to us at any time. So if a request came in for a flight that already departed we still posted the alert because during our testing we still received the on and in alerts. However what I think may be happening here, is that we are setting an alert that departed at 11pm and arrives 1am. When we set the alert after midnight we get the error.

  1. Is this the expected behavior and we should not post alerts for flights on the previous day even though they are still in flight?
  2. Is this a new error or has this always been there as part of v4?
  3. Is there a way we can get a list of errors so we can incorporated better error handling on our side?

Thanks for your help.
Jim

Is it possible for the API to avoid creating duplicate alerts and just return the same alert id? I dont see why an app would need multiple alerts for the same flight.

I already mentioned a scenario where an app developer would want to intentionally be able to create multiple alerts for the same flight… Imagine the app developer is creating alerts on behalf of a small set of unrelated end-users and each end-user gets their own alert id to control. However, we still enforce the 50 limit to discourage this convenience from being used for very large numbers of end-users. At that scalability point, the added development effort to implement one’s own de-duplication and re-broadcasting might be less costly than the extra API costs involved in creating duplicate alerts. There are probably more examples of legitimate use cases, but this is the one that I usually think of.

In v2 of the API we did allow calling SetAlert with an input “alert_id” = -1 to indicate that any existing enabled alert for the same input “ident” would be overwritten, rather than unconditionally creating a new alert. This did not allow for multiple alerts for the same “ident” to exist on different date ranges or origin/destination airport matches. (Unfortunately, I think this functionality was omitted when creating the new v4 alerts interface, in the interests of simplification. It’s possible that PUT /alerts/{id} works with -1 as the id, if you want to experiment.)

Otherwise, I recommend you keep a local database table that you are tracking the alert_ids and flight idents, so that you can perform a local lookup to determine if you have already created one before unconditionally invoking the alert creation API.