Jay Chauhan Posted yesterday at 05:17 AM Share Posted yesterday at 05:17 AM (edited) Hello, I am facing two main issues with the PrestaShop Webservice API while running PrestaShop in Docker container (local environment). 1. Authentication API with JSON format When I call the API with output_format=JSON, it returns 500 Internal Server Error. The same request works fine with XML format. Example request (API key hidden for security): Quote curl --location 'http://localhost:8080/api?output_format=JSON' \ --header 'Authorization: Basic <API_KEY>' Response: 500 Internal Server Error Logs show no additional info (please guide where to check deeper logs if needed). 2. Updating Order Status My order flow is: Current status: Authorized I successfully updated to: Processing in Progress Next, when I try to update to: Shipped → I get 500 Internal Server Error. Same sequence works correctly when changing statuses inside the Back Office. API Request (simplified, key hidden): Quote curl -X PUT 'http://localhost:8080/api/orders/ORDER_ID' \ -H 'Authorization: Basic <API_KEY>' \ -H 'Content-Type: application/xml' \ -d '<prestashop>...<current_state><![CDATA[4]]></current_state>...</prestashop>' Question: Is there a predefined sequence of allowed order status changes in the API? Or is this a bug with the Webservice, since the same transitions work in Back Office? Steps to Reproduce Run PrestaShop in Docker (local mode). Create an order (status = Authorized). Use API to change status → Processing in Progress (works). Use API again to change status → Shipped (fails with 500). Try API call with output_format=JSON → also fails with 500. Environment PrestaShop Version: 9 Running in: Docker image (local) Mode: Developer Questions: Why does the API fail with output_format=JSON while XML works? Is there a required/predefined sequence of order status transitions when using the API (different from Back Office)? Thank you in advance 🙏 Edited yesterday at 05:24 AM by Jay Chauhan (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now