question

roy8765 avatar image
0 Likes"
roy8765 asked

Location information missing in the Browse API search responses

We are trying to migrate from Finding API findItems to Browse API search but unfortunately, we don't see a proper "postalCode" in the responses in the new API. That's a core use-case for our local shopping application and until that field is added, there's really no point for us to migrate... Are there any workarounds to this or any plans to add that information in the future? Basically, searching within a radius of a geo-location or zipcode and getting approx. location information in the response items is requested.
Thank you.

searchbrowse apilocationresponsepostalcodezipcode
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
jitendra_developersupport avatar image
0 Likes"
jitendra_developersupport answered

Hi @roy8765,


Postal code can be used for calculating proximity searches. It is anonymized when returned in the itemLocation.postalCode field of the Browsw API calls.


You can use the X-EBAY-C-ENDUSERCTX header when submitting Browse API methods. This header increases the accuracy of the estimated delivery window information and is needed for the calculated shipping information. When using this header, you must always include the country code and the zip code if zip codes are used in that country.

Shipping header example:

X-EBAY-C-ENDUSERCTX: contextualLocation=country=US,zip=19406


Important! Because the contextualLocation has multiple name value pairs, these need to be URL encoded.

X-EBAY-C-ENDUSERCTX: contextualLocation=country%3DUS%2Czip%3D19406

Best Regards,
eBay Developer Support

10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.