question

curlytech avatar image
curlytech asked ·

Order not returned when queried via REST API by createdTime filter

I'm trying to diagnose an issue where a small number of orders are missing when I attempt to query a days worth of orders via the production REST API.


As a repeatable example, when I query this order by ID:

https://api.clover.com/v3/merchants/0SH.../orders/QXT... 

It returns, as expected:

{
    "href": "https://www.clover.com/v3/merchants/0SH.../orders/PK5...",
    "id": "PK5...",
    "currency": "USD",
    "customers": {
        "elements": [
            {
                "href": "https://www.clover.com/v3/merchants/0SH.../customers/WSY...",
                "id": "WSY..."
            }
        ]
    },
    "employee": {
        "id": "NMJ..."
    },
    "total": 3802,
    "paymentState": "OPEN",
    "title": "C54...",
    "note": "#customer: ...",
    "orderType": {
        "id": "2DV..."
    },
    "taxRemoved": false,
    "isVat": false,
    "manualTransaction": false,
    "groupLineItems": true,
    "testMode": false,
    "payType": "FULL",
    "createdTime": 1619028504000,
    "clientCreatedTime": 1619028504000,
    "modifiedTime": 1619028504000
}


However, when I attempt to query a full day's orders, or even the missing order's specific createdTime (1619028504000), this order is missing from the query results, example:

https://api.clover.com/v3/merchants/0SH.../orders?filter=createdTime>=1619028504000&filter=createdTime<=1619028504000


Returns

{
    "elements": [],
    "href": "http://api.clover.com/v3/merchants/0SH.../orders?filter=createdTime%3E%3D1619028504000&filter=createdTime%3C%3D1619028504000&filter=stateIS%20NOT%20NULL&limit=100"
}


This is only the case for a small number of orders -- this same query works for all the others -- but it is preventing accurate reconciliation against online reports. Any ideas as to why certain orders would not be queryable by other than by ID?


Many, many thanks in advance.

OrdersREST API
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered ·

Can you provide the full order Id in a moderator's only post?

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community