Feature request: include buyer address coordinates (lat/long) in Carrier Service API

Hello,

we’re working on an app that calculates the distance between the shipping origin and the buyer’s address to propose a dynamic shipping rate.

When we receive a request from the Carrier Service API, we get the address data in the fields rate.origin and rate.destination.

We observe that in the origin object the coordinates (latitude / longitude) are provided correctly — but in destination, when the address is entered during checkout, these values are null.

Interestingly, when the customer is logged in and uses a saved address — the coordinate fields are filled correctly.

In the official documentation of the Carrier Service resource (both REST Admin API and GraphQL Admin API) I didn’t find any guarantee that geolocation (latitude/longitude) of addresses is included for origin/destination.

Moreover — although in the changelog for Carrier Service API there was an announcement about adding new fields like order_totals and “customer tags” to the callback payload (see Carrier Service API now includes order totals and customer tags - Shopify developer changelog ) — these changes also were not reflected in the documentation - Carrier Service and new order_totals field

In our case, missing geolocation data for destination forces us to perform an additional external geocoding API request each time to obtain the buyer’s coordinates — so we can calculate the distance.

This significantly slows down the response and makes it hard to comply with the performance requirements of Carrier Service API callback (fast response time, high reliability).

Therefore my question: is it possible that Shopify starts providing coordinates (latitude, longitude) for the destination address in every case (checkout, guest, saved address)?

That would allow us to avoid additional external API calls and greatly improve performance and predictability of our app.

Thanks in advance for any clarifications.

2 Likes

Hey @sebastian.pisula, thanks for the detailed write-up

The behavior you’re seeing would be expected(as you are aware). I’ve submitted this as a feature request to our product team:

Request: Include latitude/longitude coordinates for destination addresses in all Carrier Service API callback scenarios (checkout, guest, saved address) to enable distance-based shipping calculations without external geocoding calls.

You also raised a good point about the changelog entries (order_totals, customer_tags) not being reflected in docs. I’ll flag that alongside this request.

Changes will be posted in the developers changelog if/when implemented.

1 Like

hey @KyleG-Shopify

Thanks for forwarding this to the product team!

Do you know when we might expect a response or an update regarding this feature request?

1 Like

Hey Sebastian,

Unfortunately I can’t commit to a specific timeline for feature requests. A change like this would be tied to an API version, so I would recommend to keeping an eye on the developer changelog (at minimum, check it quarterly) for any updates.

Regarding our docs not reflecting the new fields, that should be updated soon. I’ll reply here again once it is.