How to retrieve all the orders with date range parameters?

raviravi Member Posts: 4
edited January 25 in Development

Hi, I am trying to export all the orders into xml file by passing date range parameters created_at_min and created_at_max. But unfortunately it is not returning all the orders and not sure why.

Does anyone have similar issue? if so can anyone help on this

Thanks in advance

Post edited by Geanny on


  • GeannyGeanny Moderator, Lightspeed Staff Posts: 113 moderator
    edited January 25

    Hi Ravi,

    I'll move this post to the eCom API Development forum.

    One of our moderators will soon respond to your question.

  • raviravi Member Posts: 4

    Thank you Geanny. But no responded to my post so far

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 879 moderator

    Hi @ravi,

    Thank you for contacting us.

    I've tested it out and these parameters are working for me, can you show me what you are doing? My request is:

    GET /orders.json?created_at_min=2020-11-27&created_at_max=2021-01-15
  • raviravi Member Posts: 4
    edited February 4

    Hi @LucienVersendaal

    I am passing parameters exactly same you did. But what's happening was it was not able to return all the order records, It returns only few

    For Example

    if I have 100 orders in the month of jan and if I give date range of 01-01-2021 to 01-31-2021 it returns recent first 50 orders instead of all 100 order

    I can see 100 records in ecom account but why try to fetch them through API it return few of recent orders

    Should I have pass any other parameters in order to get rest of them?

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 879 moderator

    Hi @ravi,

    Correct, please check the filters here:

    Default is showing you 50 results with the max of 250

  • raviravi Member Posts: 4

    Thankyou so much for the help

Sign In or Register to comment.