API GET Request over 30 MB

Hi there,

I am making an get request to grab numbers for YTD. I was curious about one of the parameters for the get orders endpoint.

 const ordoroClientGetConfig = {
    method: "get",
    url: `${ORDORO_API_URL}`,
    auth: {
      username: ORDORO_API_USERNAME,
      password: ORDORO_API_PASSWORD,
    },
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Content-Type": "application/json",
    },
    params: {
      limit: 10000,
      created_after: firstOfTheYearString,
      printed: true,
      sku: "test-sku"
    },
  };

This works, and pulls data in about 15s (still like 12 MB…) but I want to be able to pull data for a select few products. When I pass in an array of products, I get an response like so

    data: {
      error_message: "Additional properties are not allowed ('sku[]' was unexpected)",
      param: null
    }

Are there any thoughts on this? I would love to be able to discuss further.

Thank you,
John

Hello @jsanchez

Can you post an example of your request using CURL or a similar tool? In the response you should see a header titled X-API-REQUEST-ID, please post it as well so we can find the request on our end and diagnose any issues.

Hi @syork,

I apologize for the delayed response. I went ahead and made a request on Postman to see if it was any different. I got errors for limits of 10,000 and 5,000, so 1,000 was the most I could do.

The request ID was 5dc2b506-30ca-4332-9bf3-6e657265e832, and it was 7.59 MB in size.

Thank you,
John

Thanks @jsanchez
We should be enforcing a maximum limit of 1000. We’ll get it updated so the API returns a clean error response rather than timing out.

@syork

I will say, in my React application it will pull a response for a limit of 10,000. That was a limitation of postman timing out. I didn’t get a response for those at all. Those take upwards of 60-75 seconds to get a response back from the server.

For pulling data with a query number like that, would I need to apply some sort of offset to catch records all the way from 1-10000?

Thank you,
John

Yes, we use limit + offset for paginating. You can see some info on our list endpoints here