Reputation: 1
I am making API requests from an app (public but not listed yet app) installed via the Shopify Partner Dashboard on a development store, and I am encountering an issue where the shippingAddress field is returning null in the abandoned checkouts query.
Query Used:
export const GET_ABANDONED_CHECKOUTS_QUERY = `
query ($first: Int!, $query: String!) {
abandonedCheckouts(first: $first, query: $query) {
edges {
node {
id
createdAt
email
recoveryUrl
customer {
firstName
lastName
email
}
billingAddress {
address1
city
country
}
shippingAddress {
address1
city
country
}
lineItems(first: 10) {
edges {
node {
title
quantity
variant {
id
price
}
}
}
}
}
}
}
}
`;
Reponse;
"default_address": {
"id": 9501xxx,
"customer_id": 812xxx,
"first_name": "MxxxT",
"last_name": "ExxxxN",
"company": null,
"address1": "TEST",
"address2": null,
"city": "AxxxA",
"province": null,
"country": "Txxxy",
"zip": null,
"phone": null,
"name": "Mxxxxxx xxxxN",
"province_code": null,
"country_code": "TR",
"country_name": "Txxxy",
"default": true
}
Setup Details:
API Version: 2025-01
Scopes Used:
read_checkouts,
read_orders,
read_customers,
write_checkouts,
write_orders,
write_products
Environment:
App installed via the Shopify Partner Dashboard;
Authenticated API requests made to a development store
Issue:
The shippingAddress field is returning null even though:
The abandoned checkout is visible in the Shopify admin panel under Orders
> Abandoned Checkouts
.
The checkout process was completed with a valid shipping address.
Other checkout details (e.g., billingAddress, customer, lineItems) return correctly.
The store primarily sells physical products that require shipping.
The API token has the necessary permissions (read_orders, read_checkouts).
Has anyone encountered this issue before? Is this an expected behavior, or could it be a bug in the API? Any guidance would be greatly appreciated.
Verified that the abandoned checkout record exists in the Shopify admin.
Checked that the app is installed via the Shopify Partner Dashboard and API requests are made with the correct authentication.
Ensured that the checkout process included a shipping address before abandonment.
Tried querying without filters (query: "") to retrieve all available abandoned checkouts.
Confirmed that billingAddress is populated correctly, but shippingAddress remains null.
Upvotes: 0
Views: 10
Reputation: 798
A couple of things.
Have you installed Shopify's GraphIQL app? I'm running your query and "email" and "recoveryURL" are not valid.
But, beyond that, I'm getting shipping address info when running that query with those bad fields removed:
query {
abandonedCheckouts(first: 10,reverse:true ) {
edges {
node {
id
createdAt
abandonedCheckoutUrl
customer {
firstName
lastName
email
}
billingAddress {
address1
city
country
}
shippingAddress {
address1
city
country
}
lineItems(first: 10) {
edges {
node {
title
quantity
variant {
id
price
}
}
}
}
}
}
}
}
Upvotes: 0