Developer Forum General Discussion Unable to filter using "dateRange" for OrderHistory_v1Closed
 The Developer Forum is shutting down. Please join the Equinix Community to participate in new discussions.
GC
API User
Monday, April 12, 2021 - 22:44

When filtering with dateRange on the OrderHistory_v1 API i get a statusCode 400 returned. Other filters work fine for me and return expected results

I am using the following payload 

{
  "filters": {
    "dateRange": [
        "PAST_7_DAYS"
        ]
    }
}

 


The errors i receive errors:
 

code: "EQX-171-1212"
"/filters/dateRange"
message: "instance value (%s) not found in enum (possible values: %s)"
"PAST_7_DAYS"

Thank you in advance
 

 

ZW
API User
Friday, February 25, 2022 - 18:03

Hi there,

The dateRange values has to be passed as a key-value string instead as an array.

i.e

{
  "filters": {
    "dateRange": "PAST_7_DAYS"
    }
}

Hope this helps!