admin管理员组文章数量:1277337
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.
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.
1 Answer
Reset to default 0A 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
}
}
}
}
}
}
}
}
本文标签: shopifyGraphQL Admin API Shipping Address Returns Null for Abandoned CheckoutsStack Overflow
版权声明:本文标题:shopify - GraphQL Admin API: Shipping Address Returns Null for Abandoned Checkouts - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741261774a2367756.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论