Including a cursor in order search returns same result set

When I include a cursor in order search it returns same result set, see below:
1st call with no cursor:
{ “location_ids”:[“LVPWT9XXH5FNX”], “return_entries”: false, “query”: { “filter”: { “date_time_filter”: { “closed_at”: { “start_at”: “2022-06-01T00:00:00+00:00”, “end_at”: “2022-09-09T23:59:59+00:00” } }, “state_filter”: { “states”: [“COMPLETED”] } }, “sort”: { “sort_field”: “CLOSED_AT”, “sort_order”: “DESC” }, “limit”: “9999”, “cursor”: “” } }

Found: 2022-09-08T20:21:26.983Z|2|2500|J7WJ4H0X3N3JZEZCY697GJD444|

Found: 2022-09-08T19:50:16.532Z|2|2500|X99105VEND6HQ94QFE20097DR4|ck#4467

Found: 2022-09-08T19:41:03.964Z|2|2500|3J14C66WB2JJGQFA6WX8PH59FC|

Found: 2022-09-07T18:39:47.196Z|2|2500|KMC516VCS52N7C0Z92FHDK413C|

Found: 2022-09-07T17:17:01.149Z|2|2500|BKNQAC3B1H14D09Z9B7C2AMPER|

Found: 2022-09-07T17:02:10.861Z|2|2500||

Found: 2022-09-06T18:21:50.080Z|2|2500|4QJ090PTCMW0B2HGH123FK91H0|

Found: 2022-09-02T01:33:12.000Z|2|2500||

Found: 2022-09-01T19:19:13.986Z|4|2500|3J14C66WB2JJGQFA6WX8PH59FC|

2nd call with cursor (same results):

{ “location_ids”:[“LVPWT9XXH5FNX”], “return_entries”: false, “query”: { “filter”: { “date_time_filter”: { “closed_at”: { “start_at”: “2022-06-01T00:00:00+00:00”, “end_at”: “2022-09-09T23:59:59+00:00” } }, “state_filter”: { “states”: [“COMPLETED”] } }, “sort”: { “sort_field”: “CLOSED_AT”, “sort_order”: “DESC” }, “limit”: “9999”, “cursor”: “6trB2BDZkjRCZR8QpEDVoCDzJToIRRf038RRDhjyEvesc16OfR5VRBQInCOcTtKncGOptK0pOusCPDNL7wj7cmENY1cgjJJ1UPOtwWjCWPEtxFxD63o2N9um9WUAOdcfrjLKNeiGYZO2OpcAM67ZRS4GEnDxSZrluCVmxokVkmithBtJyMZF4Augj5V6QOxcZM9qxNK2CQsTP1xE3G8NlmBoZg7XHX9D0naebtm1EQLUGX0FknSsQ5LMIXuU43NejTx7A7lJgHersjgdB5D3SBhAQDb70YxsOVVWMpVvn8PPCRp5wcyB9B9NHyef9wRtTrnJgFvM4H42gukFu0MPzZ9Px40TCpEFyyRShoFPTOAYSOqoTgP8k9amUPxUD1BJBBEvl2JYI7c7aoLjWKi69IOW5EpF88TLb6I4bX2BxjWdrmFwnE9a4N0Evt0RIOM774joUE” } }

Found: 2022-09-08T20:21:26.983Z|2|2500|J7WJ4H0X3N3JZEZCY697GJD444|

Found: 2022-09-08T19:50:16.532Z|2|2500|X99105VEND6HQ94QFE20097DR4|ck#4467

Found: 2022-09-08T19:41:03.964Z|2|2500|3J14C66WB2JJGQFA6WX8PH59FC|

Found: 2022-09-07T18:39:47.196Z|2|2500|KMC516VCS52N7C0Z92FHDK413C|

Found: 2022-09-07T17:17:01.149Z|2|2500|BKNQAC3B1H14D09Z9B7C2AMPER|

Found: 2022-09-07T17:02:10.861Z|2|2500||

Found: 2022-09-06T18:21:50.080Z|2|2500|4QJ090PTCMW0B2HGH123FK91H0|

Found: 2022-09-02T01:33:12.000Z|2|2500||

Found: 2022-09-01T19:19:13.986Z|4|2500|3J14C66WB2JJGQFA6WX8PH59FC|

Looks like the cursor is nested too deep. If you bring it out one layer like this it’ll work:

{
  "location_ids": [
    "LVPWT9XXH5FNX"
  ],
  "return_entries": false,
  "query": {
    "filter": {
      "date_time_filter": {
        "closed_at": {
          "start_at": "2022-06-01T00:00:00+00:00",
          "end_at": "2022-09-09T23:59:59+00:00"
        }
      },
      "state_filter": {
        "states": [
          "COMPLETED"
        ]
      }
    },
    "sort": {
      "sort_field": "CLOSED_AT",
      "sort_order": "DESC"
    }
  },
      "cursor": "mIdZ6n3wLW6YE6R8YX2FWSW4xxQ09iBvBXrfF2GE0rbqoxZDDLdY3bieMZJJOYK71haZmBpE1Xq6IeiMT9cbJPCuXIrx8nCJmtLUiF9fQY3MAJU5WPYKbBJJiHnfMyGYOhlloxswjDqdG84Q4pZ0IFGTSFFHAxDZRFv9cW6wAowchD8fXRPJ4gsgzxIbVFnfAPGGRUvP9S5CrO6Gl40SMLe6eSnZTP6CafoqgsK8hoMSNs6Ux5uxTW6U2V9mvJYUFz9n0qbPPIQgaF7w7KPmea7XWCSmtMzVgI6iwMi1kxEG7BIQBOJhLWUFLgJMfNGCK0ganuF0B6fEJNUYgOK2WwTBaW6JbCxQ98RBHwOJ1UZh6lN55zfWwre3m4VckMzfNYZ28cOFvVuBYO4Bu6Anq9ex2oYIfzvd2AmSCAkCuf5BQBzaXdGb4N0Evt0RIOM774joUE"
}

:slightly_smiling_face:

Yep, you are right! Good catch and thank you.