Starting September 1, 2019, the Content API for Shopping will no longer support requests or responses with XML payloads. All requests with an XML payload will fail after the sunset date.
Why is this change happening?
Version 2 of the Content API for Shopping changed the default request and response format from XML to JSON, and version 2.1 of the API (currently marked experimental) will not support XML. The majority of API requests now use JSON, so we’ve decided to sunset XML support and instead focus on enriching our JSON APIs with new features and functionality.
What should you do?
Prior to the sunset date, identify the components of your application that are using XML payloads for any of the following impacted services:
For each case, modify your application to:
- Send the request body as JSON.
- Ensure you have removed the
alt=xmlparameter from the request.
- Process the response as JSON.
- Test your updated application using a separate test account.
When converting a given request, you can use the JSON and XML tabs in the Request body section of the documentation for the method. For example, here’s a partial screenshot of the XML tab for
The corresponding JSON tab for that method is:
Compare the two tabs and use that as a guide when converting your request from XML to JSON.
You can find similar JSON and XML information for the response in one of the following locations:
- Directly in the Response section for the method.
- In the Resource representations section of the documentation for the resource returned in the response.
If you have any questions or feedback about this change, or any other questions about the Content API for Shopping, please let us know on the forum.
Powered by WPeMatico