question

ohope avatar image
ohope asked ohope commented

Rate Limit - using externalReferenceId & createdTime filters

Hi,

I am updating my api call for getting orders to take a start and end time of 90 days.

In testing, i'm using February 1st, 2023 and February 10th, 2023 as my createdTime filters.

My transaction with externalReferenceId=12587 was createdTime February 2nd 2023

screenshot-2023-07-18-at-20446-pm.png

https://api.clover.com/v3/merchants/[merchant-id]/orders?expand=refunds,lineItems,payments,discounts,lineItems&filter=createdTime>=1674864000&filter=createdTime<=1676092800&filter=externalReferenceId=12587

This returns

{
    "elements": [],
    "href": "http://api.clover.com/v3/merchants/[merchant-id]/orders?filter=createdTime%3E%3D1677346800&filter=createdTime%3C%3D1677645600&filter=externalReferenceId%3D12587&filter=stateIS%20NOT%20NULL&limit=100"
}

If I remove the external reference id I still get no orders for between those days

https://api.clover.com/v3/merchants/[merchant-id]/orders?expand=refunds,lineItems,payments,discounts,lineItems&filter=createdTime>=1674864000&filter=createdTime<=1676092800

Even tho the clover dashboard shows 11.

screenshot-2023-07-18-at-20701-pm.png


If I remove all the other filters and just use the createdTime>= I get a result set

https://api.clover.com/v3/merchants/[merchant-id]/orders?expand=refunds,lineItems,payments,discounts,lineItems&filter=createdTime>=1674864000

Now in the api reference I read this line..

Note: Search results for the list of orders list is restricted to the last 90 days if the filter fields include: [deletedTime, externalReferenceId, createdTime, total, payType, title, note, state, manualTransaction, cardTransaction.last4, testMode, touched]

Does this mean if you use externalReferenceId there is no longer the ability to find orders by externalReferenceId that were created more than 90 days ago?

This has broken quite a bit of functionality in the application, and the documentation is not very clear.

There is also a typo in the documentation found here, there shouldn't be an escape character in the last createdTime

https://docs.clover.com/docs/limits-added-to-calls-to-payments-and-orders-endpoints

Thank you

REST API
5 comments
10 |2000

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

bryanvargas avatar image bryanvargas ♦♦ commented ·

Check your time, it has to be in UNIX time


For Feburary 1, 2023 the milliseconds since epoch is 1675227600000

1 Like 1 ·
ohope avatar image ohope bryanvargas ♦♦ commented ·
Thank you that works for fixing the issue for the date filters.


Do you or anyone have any insight on if we can use externalReferenceId along with these filters still?

When I try I get empty set.

0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ ohope commented ·
you should still be able to use it. Just make sure you are using the correct fields. I would verify the fields by running the get single order API and make sure the externalReferenceId is in fact 12587
1 Like 1 ·
Show more comments

0 Answers

·

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