Query shipments from_date and to_date

Hello,

I have a bit of a head scratcher. Trying to pull shipments for a specific day, and not having much luck with any results.

Here’s my query:

query {
shipments(date_from: “2019-10-03”, date_to: “2019-10-01”) {

this does not pull back any orders, yet I have an order shipped on 2019-10-02.

I can pull the shipment if I specify shipments(order_id: “105292483”) {

Help please :slight_smile:

Hi asdf,

I think your dates may be switched. date_from should be the earlier date, and date_to should be the later date. i.e:

query {
shipments(date_from: “2019-10-01”, date_to: “2019-10-03”) {
…

Also note that from my own testing, I think date_to is non-inclusive, so you will get shipments from 10-01 and 10-02, but not 10-03. The gurus can jump in and verify/clarify on that, though. :slight_smile:

1 Like