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.