jarilodesignltd avatar image
jarilodesignltd asked

GZIP stopped working in the Trading API.

Hi There

Something has changed on the Trading API, whenever you specify the HTTP header Accept-Encoding, the server no longer sends back a value for Content-Encoding, nor listens to the encoding request. In the .NET SDK and prior you were able to specify gzip which helped performance, and cut down bandwidth, however now this actually breaks requests using the .NET SDK because of the server change.

If possible can someone official look into this please? Considering this comes at the expense of eBay's servers, I imagine this would be benefit to many to get resolved asap.

trading apigzipaccept-encodingdeflate
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

jarilodesignltd avatar image
1 Like"
jarilodesignltd answered

It's frustrating that after 6 months there still has not been any response to this. We posted an issue a few weeks after this on the Etsy github issues page for a different issue and had a developer come back within days with a fix.

Either way it seems we have figured out what's going on. It seems a developer at eBay has changed the behaviour to work correctly for some of the newer APIs, and not make the necessary effort to update the documentation for older APIs. Today we encountered an obscure knowledge base article (updated 11/28/2020) on the developer eBay site that says this:

Q: If I request compressed content, do I always get back compressed content?
A: If compressed content is requested, and the API call results in more than 500 bytes and less than 7.5 Megabytes of uncompressed data to be returned to the caller then the data will be returned compressed, otherwise the data will be returned uncompressed. These boundary values are subject to change, and we will do our best to have a process that documents the current boundary values. Our recommendation is that you only use compression for the following API calls:


We may add more API calls to this recommendation list in the future.

So back when gzip compression was working for calls like GetSellerItem and GetItem, the behaviour was incorrect and thus got fixed to only work with the calls the eBay dev team has chosen to support with this feature.

Sorry if this comes as a disappointment to those following the article, but at-least perhaps you have an answer to work with now. Here's a link to the article we found for reference:

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.