Order -> customer -> lastOrder -> clientIp is gone?

The graphQL docs for the latest API version show the “clientIp“ field under order → customer → lastOrder. The field always comes back empty. I assume this field was deprecated when other IP address fields were removed, and the docs just haven’t caught up? Can someone confirm?

Hey @Dill_Bessy - I had a look at this and the clientIp field hasn’t been deprecated or removed. It’s still on the Order object and I was able to confirm it returns data on checkout-placed orders in testing.

The most likely reason you’re seeing it come back empty is that clientIp is classified as protected customer data. If your app is a public app, you need to have protected customer data access approved in the Partner Dashboard. Without it, the field silently returns null with no error.

The other thing to check is how the orders were created. Only orders placed through a browser checkout will have a client IP recorded. Orders created via the API, draft orders, or POS won’t have one since there’s no browser session involved.

If you’ve already got the right access configured and you’re querying checkout-placed orders, share an x-request-id header from a request where it comes back empty and I can take a closer look

It was actually a permissions issue! We’re not a public app, but I did need to add an access scope and release a new version, which solved it.

1 Like