Solved

All api requests returns 404 error

Sp1ke
Tourist
10 3 3

When doing API call to /admin/api/2023-04/orders.xml we are receiving 404 error. We didn't change anything in system/job/connection configuration.

The only one thing, I know last months our managers did store closing/re-opening so not sure if it could be related to this issue. They mentioned that all is working fine after re-opening store.

 

Here is part of raw response that was done from SoapUI:

HTTP/1.1 404 Not Found
Date: Tue, 01 Aug 2023 16:47:02 GMT
Content-Type: text/html
X-Shopify-API-Version: 2023-04
X-Request-ID: 8489cc72-e324-474f-873c-a96e6473e32c

From the application side we are receiving different 415 error:

 

HTTP/1.1 415 Unsupported Media Type
Date: Tue, 01 Aug 2023 00:00:12 GMT
Content-Type: text/html
X-Shopify-API-Version: 2022-07
X-Request-ID: 1ddf4b6b-8672-4819-b08c-9e9eab7b7468

Please let me know if you need more info for investigating but I believe you can find it by request-ID.

Thank you!

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1249 201 442

This is an accepted solution.

Hi @Sp1ke ,

 

Thanks for your post. XML support was removed as of REST Admin API version 2022-07 so the 404 and 415 errors are expected, and in order to continue using the API the application will need to be able to work with JSON and use the JSON endpoints.

 

So for example it would be /admin/api/2023-04/orders.json instead of /admin/api/2023-04/orders.xml.

 

Here's the changelog announcement about that with a date of June 1, 2022:

https://shopify.dev/changelog/support-for-the-xml-response-format-is-deprecated-from-the-admin-rest-...

 

Support for the XML response format is deprecated from the Admin REST API
Starting in version 2022-07, support for the XML response format and XML payloads in the Admin REST API is removed. Requests expecting an XML response will result in a 404. Requests that send an XML payload will result in a 415.

It's also mentioned in the 2022-07 release notes like this:

 

The REST Admin API no longer supports XML-format responses and payloads. If you're using XML for REST Admin API requests and payloads, then you need to switch to using JSON format.

 

More info about Shopify API Versioning can be found here:

https://shopify.dev/docs/api/usage/versioning 

 

The last version of the API with XML support was 2022-04 which is now expired and no longer being served.

 

Sincerely,
Jon551

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1249 201 442

This is an accepted solution.

Hi @Sp1ke ,

 

Thanks for your post. XML support was removed as of REST Admin API version 2022-07 so the 404 and 415 errors are expected, and in order to continue using the API the application will need to be able to work with JSON and use the JSON endpoints.

 

So for example it would be /admin/api/2023-04/orders.json instead of /admin/api/2023-04/orders.xml.

 

Here's the changelog announcement about that with a date of June 1, 2022:

https://shopify.dev/changelog/support-for-the-xml-response-format-is-deprecated-from-the-admin-rest-...

 

Support for the XML response format is deprecated from the Admin REST API
Starting in version 2022-07, support for the XML response format and XML payloads in the Admin REST API is removed. Requests expecting an XML response will result in a 404. Requests that send an XML payload will result in a 415.

It's also mentioned in the 2022-07 release notes like this:

 

The REST Admin API no longer supports XML-format responses and payloads. If you're using XML for REST Admin API requests and payloads, then you need to switch to using JSON format.

 

More info about Shopify API Versioning can be found here:

https://shopify.dev/docs/api/usage/versioning 

 

The last version of the API with XML support was 2022-04 which is now expired and no longer being served.

 

Sincerely,
Jon551

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog