question

lamar1102 avatar image
lamar1102 asked lamar1102 commented

Help with getting orders within a timestamp Period

I tried using startTime and startTimestamps but the response doesnt seem to be reading this query.

Under docs I saw to use modifiedTime but I'm assuming that would be for when order was modified and not to check for orders within a range.

Really appreciate any help!

def sales_request(time,time2,mid):

    header = {
        "accept": "application/json",
        "authorization": f" Bearer {api_token}"
    }

    params = {
        "limit": "1000",
        "startTimestamp":"1634097600000",
        "endTimestamp":"1634169600000"
    }

    response = requests.get(url=f"https://api.clover.com/v3/merchants/{mid}/orders",params=params, headers=header)



    data = response.json()
OrdersREST APISale
10 |2000

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

1 Answer

David Marginian avatar image
David Marginian Deactivated answered lamar1102 commented

startTimestamp and endTimestamp? Why do you think those are valid parameters? The available filters can be found in our API docs - https://docs.clover.com/reference/ordergetorders-2.. You probably want to use clientCreatedTime. Filters need to be passed as documented here: https://docs.clover.com/docs/applying-filters.

1 comment
10 |2000

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

lamar1102 avatar image lamar1102 commented ·

I was definitely going about that the wrong way thanks for the help, got it going!

0 Likes 0 ·

Welcome to the
Clover Developer Community