API Limitations

Posting usage lines to the Pax8 Usage API is currently a synchronous request, meaning the client making the request is on the hook, and is waiting for the request to complete with an http 200 status code in order to verify success or failure.

An asynchronous method where Pax8 would accept payloads by responding with a 201 accepted status, asynchronously processing the usage, and then providing some method to poll the status of the usage processing request, is not supported at this time.

Since posting usage is synchronous, there is an upper limit to the size of the payload you can send to the API before you will start seeing time-outs. Right now, we advise vendors to send no more than fifty (50) usage lines in a single request payload. This will ensure the Pax8 system can process each request before the client would time out.

This limitation can lead to some difficulty if you want to create summaries that have more than 50 usage lines with the same summaryKey, since the default behavior of the usage API when receiving two batches of 50 lines for the same summaryKey on the same day is to overwrite the first batch with the second batch. In order to avoid this issue, you can include a parameter called overwriteSameDayUsage and set it to false when posting usage. That will enable you to configure whether the API will overwrite that first batch of lines, or append to it. Please refer to this page that has some examples of how you might do this: https://devx.pax8.com/docs/overwrite-same-day-usage