Querying shipment details
You may need to get a detailed shipments data in order to be able to reconcile it on your end (for example). The query may look something like this:
Query
query($from: ISO8601DateTime) {
shipments(dispatchDate: {after: $from}) {
nodes {
id
distributorId
dispatchDate
order {
... on CheckoutOrder {
user {
...customerLocation
}
}
... on SubscriptionOrder {
subscription {
user {
...customerLocation
}
}
}
lineItems {
productVariant {
name
properties {
name
value
}
}
quantity
priceBreakdown {
discounts {
...currencyAmount
}
products {
...currencyAmount
}
tax {
...currencyAmount
}
total {
...currencyAmount
}
unit {
...currencyAmount
}
}
}
priceBreakdown {
discounts {
...currencyAmount
}
products {
...currencyAmount
}
tax {
...currencyAmount
}
total {
...currencyAmount
}
shipping {
...currencyAmount
}
insurance {
...currencyAmount
}
}
payments {
date
paymentMethod {
... on CardPaymentMethod {
cardType
nameOnCard
expiryMonth
expiryYear
lastDigits
}
}
}
}
}
}
}
fragment currencyAmount on CurrencyAmount {
amount
currency
}
fragment customerLocation on AccountHolder {
serviceStore {
name
number
}
}Variables
{
"from": "2021-05-19T07:00:00-05:00"
}Response
{
"data": {
"shipments": {
"nodes": [
{
"id": "Shipment-6E3C2988Z62",
"distributorId": null,
"dispatchDate": "2021-05-20T00:03:00-05:00",
"order": {
"subscription": {
"user": {
"serviceStore": null
}
},
"lineItems": [
{
"productVariant": {
"name": "Simparica 5 mg Chewable Tablets for Dogs",
"properties": []
},
"quantity": 1,
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "17.27",
"currency": "USD"
},
"tax": {
"amount": "0.0",
"currency": "USD"
},
"total": {
"amount": "17.27",
"currency": "USD"
},
"unit": {
"amount": "17.27",
"currency": "USD"
}
}
},
{
"productVariant": {
"name": "Milpro 12.5mg/125mg Worming Tablets for Dogs",
"properties": []
},
"quantity": 2,
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "35.18",
"currency": "USD"
},
"tax": {
"amount": "0.0",
"currency": "USD"
},
"total": {
"amount": "35.18",
"currency": "USD"
},
"unit": {
"amount": "17.59",
"currency": "USD"
}
}
}
],
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "20.0",
"currency": "USD"
},
"tax": {
"amount": "0.0",
"currency": "USD"
},
"total": {
"amount": "20.0",
"currency": "USD"
},
"shipping": {
"amount": "0.0",
"currency": "USD"
},
"insurance": {
"amount": "0.0",
"currency": "USD"
}
},
"payments": [
{
"date": "2021-05-20T05:00:00Z",
"paymentMethod": {
"cardType": "visa",
"nameOnCard": "H Gruss",
"expiryMonth": 11,
"expiryYear": 2024,
"lastDigits": "3103"
}
}
]
}
},
{
"id": "Shipment-8XWCO9JZNNL",
"distributorId": null,
"dispatchDate": "2021-05-20T00:03:00-05:00",
"order": {
"user": {
"serviceStore": null
},
"lineItems": [
{
"productVariant": {
"name": "Biotrue Solution 300ml",
"properties": []
},
"quantity": 1,
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "10.0",
"currency": "USD"
},
"tax": {
"amount": "1.0",
"currency": "USD"
},
"total": {
"amount": "10.0",
"currency": "USD"
},
"unit": {
"amount": "10.0",
"currency": "USD"
}
}
}
],
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "10.0",
"currency": "USD"
},
"tax": {
"amount": "1.0",
"currency": "USD"
},
"total": {
"amount": "13.99",
"currency": "USD"
},
"shipping": {
"amount": "2.99",
"currency": "USD"
},
"insurance": {
"amount": "0.0",
"currency": "USD"
}
},
"payments": [
{
"date": "2021-05-20T05:00:00Z",
"paymentMethod": {
"cardType": "visa",
"nameOnCard": "B Johnson",
"expiryMonth": 12,
"expiryYear": 2031,
"lastDigits": "1111"
}
}
]
}
},
{
"id": "Shipment-93YCWE2N44",
"distributorId": null,
"dispatchDate": "2021-05-20T00:03:00-05:00",
"order": {
"subscription": {
"user": {
"serviceStore": null
}
},
"lineItems": [
{
"productVariant": {
"name": "ACUVUE OASYS 6 Pack",
"properties": [
{
"name": "power",
"value": "+1.00"
},
{
"name": "bc",
"value": "9.0"
},
{
"name": "dia",
"value": "14.2"
}
]
},
"quantity": 1,
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "30.0",
"currency": "USD"
},
"tax": {
"amount": "1.0",
"currency": "USD"
},
"total": {
"amount": "30.0",
"currency": "USD"
},
"unit": {
"amount": "30.0",
"currency": "USD"
}
}
},
{
"productVariant": {
"name": "ACUVUE OASYS 6 Pack",
"properties": [
{
"name": "power",
"value": "+1.00"
},
{
"name": "bc",
"value": "9.0"
},
{
"name": "dia",
"value": "14.2"
}
]
},
"quantity": 1,
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "30.0",
"currency": "USD"
},
"tax": {
"amount": "1.0",
"currency": "USD"
},
"total": {
"amount": "30.0",
"currency": "USD"
},
"unit": {
"amount": "30.0",
"currency": "USD"
}
}
},
{
"productVariant": {
"name": "Biotrue Solution 300ml",
"properties": []
},
"quantity": 1,
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "10.0",
"currency": "USD"
},
"tax": {
"amount": "1.0",
"currency": "USD"
},
"total": {
"amount": "10.0",
"currency": "USD"
},
"unit": {
"amount": "10.0",
"currency": "USD"
}
}
}
],
"priceBreakdown": {
"discounts": {
"amount": "0.0",
"currency": "USD"
},
"products": {
"amount": "70.0",
"currency": "USD"
},
"tax": {
"amount": "3.0",
"currency": "USD"
},
"total": {
"amount": "75.99",
"currency": "USD"
},
"shipping": {
"amount": "2.99",
"currency": "USD"
},
"insurance": {
"amount": "0.0",
"currency": "USD"
}
},
"payments": [
{
"date": "2021-05-20T05:00:00Z",
"paymentMethod": {
"cardType": "visa",
"nameOnCard": "B Johnson",
"expiryMonth": 12,
"expiryYear": 2031,
"lastDigits": "1111"
}
}
]
}
}
]
}
}
}