Hi, we are going to start using the API and we have noticed there is a rate limit on it, and there was some mention of being penalised for hitting the Rate Limit. Our system sends all of our invoices in one go. So only about 300 per month - but all in one minute. I would like to let it run, and if we hit the rate limit, deal with the ones invoices that don’t get imported and import them later. But will we be penalised for continuing after we have hit the rate limit? I could make some simple changes so, as soon as we hits the rate limit, it doesn’t try again. But would we still be penalised for hitting it once? Some more information on this would be good, as I don’t want to change our system until I know what the options are. What I don’t want to do is slow our system down, so it takes 10 minutes to do a 10 second job, just to add them to free agent.
You will hit a rate limit here but you’d actually hit the same rate limit in the web app if you click fast enough (I managed it!).
Just look for the failed response and add an exponential backoff to it (first failure, wait 1 second, second wait 2, third wait 4).
It won’t add tons of time to your run.
If you find yourself running 3,000 invoices instead just make them a batch job and let them run in the background.