Missing information of shipping address on Admin API

Missing information of shipping address on Admin API

raulvaquerizo
Shopify Partner
15 3 5

Hello,

I have created an admin API, just as I have done before with other Shopify stores, to retrieve orders. In all other stores, I receive a response from the API with the complete address, but in this store, it does not return the full information. I am attaching an example:

 

Incorrect:

shipping_address: {
province: 'Barcelona',
country: 'Spain',
country_code: 'ES',
province_code: 'B'
}
Correct:

shipping_address: {
first_name: '',
address1: '',
phone: '',
city: 'Patterson',
zip: '95363',
province: 'California',
country: 'United States',
last_name: 'test',
address2: null,
company: null,
latitude: ,
longitude: ,
name: 'test',
country_code: 'US',
province_code: 'CA'
}


The scopes are the same in all my stores, and the version is also the same: 2024-07.

Thanks in advance.

Replies 2 (2)

CodingFifty
Shopify Partner
613 97 116

Hi @raulvaquerizo,

 

 

It seems like the issue might be specific to the way this particular store is storing or returning shipping address data. Here are a few steps to help resolve it:

1. Check for Missing Fields in Shopify Admin

Make sure the shipping information is correctly filled out in the Shopify Admin. Sometimes, missing or incomplete address data on an order (e.g., no first name, last name, address1, etc.) might cause incomplete data to be returned via the API.

  • Manually verify the orders with missing information in the Shopify Admin to see if the address fields are complete.

2. Inspect API Response Fields

When you make the API request to retrieve orders, try to explicitly specify the fields you want to retrieve to ensure that all address details are included:

 

 
GET /admin/api/2024-07/orders.json?fields=id,shipping_address

 

If the shipping address is partially returned, it's possible that the specific fields you're expecting aren't being included in the API response for some reason. This could also depend on the order status or other factors within the store.

3. Check for API Limitations or Errors

Review the response headers to see if any errors or limitations are being applied. You might be hitting a rate limit or encountering some other backend issue that is preventing the full address data from being returned.

4. Verify API Scopes and Permissions

Double-check that the API app you're using has the correct permissions to access the full address information. Even though you mentioned the scopes are the same, it's still worth confirming that read_shipping_addresses is explicitly enabled.

5. API Call Specificity

It’s possible the issue arises from the way the API is set up in this store. Try the following to fetch shipping data:

 

 
GET /admin/api/2024-07/orders.json?status=any&fields=shipping_address,shipping_lines


This ensures that you are retrieving orders regardless of their status and including full shipping data.

6. Possible Custom Store Configurations

If the store has custom scripts or apps, they might be modifying the data. Verify if there’s any custom configuration or app in the store that could be altering the shipping address data. Sometimes custom apps can suppress certain fields from the API response.

7. Compare with Another Store

If possible, compare the data from another store where the shipping address is returned correctly. Check for any differences in how the orders or shipping addresses are being handled or stored.

 

Coding Fifty || Shopify Partner
For any custom section queries, please visit: Fiverr Profile
Found my response useful? Like it and mark as Accepted Solution!
For additional discussions, reach out via: Email ID: codingfifty@gmail.com
raulvaquerizo
Shopify Partner
15 3 5

Hi @CodingFifty ,

I’ve tested and checked what you mentioned, and it’s still returning the same fields, and everything is correct in the configuration.

I’ve read on other sites that it could be caused by the chosen plan. The store where this is happening has the Basic plan.

Do you know if it could be because of that?

Thank you.