I’m working on an integration and am testing out the Shipments query with Altair before implementing in code. I’ve limited the scope of the query to just the surrounding days. I can see in the Web UI that a shipment was created on July 9 at 4pm; however, when querying for all shipments from July 8 to July 10, I get an empty response and no error messages.
Here is the web UI history of the order noting that an App User shipped the item from within ShipHero.
I’ve run the following query to try and retrieve this shipment data:
query($recordLimit:Int=5 $itemLimit:Int=10 $cursor:String="" $dateFrom:ISODateTime="2020-07-08" $dateTo:ISODateTime="2020-07-10" $sort:String="created_date") {
shipments(date_from:$dateFrom date_to:$dateTo) {
...shipmentFields
}
}
fragment shipmentFields on ShipmentsQueryResult {
request_id
complexity
data(after:$cursor first:$recordLimit sort:$sort) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
legacy_id
order_id
user_id
warehouse_id
pending_shipment_id
address {
name
address1
address2
city
state
country
zip
phone
}
picked_up
created_date
line_items(first:$itemLimit) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
line_item_id
quantity
line_item {
barcode
sku
}
}
cursor
}
}
shipping_labels {
status
tracking_number
carrier
shipping_name
shipping_method
cost
address {
name
address1
address2
city
state
country
zip
phone
}
shipment_line_items(first:$itemLimit) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
line_item_id
quantity
line_item {
sku
shipped_line_item_lots {
lot_id
lot_name
lot_expiration_date
}
}
}
cursor
}
}
}
order {
id
order_number
partner_order_id
shop_name
fulfillment_status
order_date
email
packing_note
}
}
cursor
}
}
}
The response I get is:
{
"data": {
"shipments": {
"request_id": "5f1af91b37302d2805771bee",
"complexity": 101,
"data": {
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": null,
"endCursor": null
},
"edges": []
}
}
}
}
Why can I not retrieve shipment information for this shipment that clearly exists?