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):
Quotecurl --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):
Quotecurl -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 🙏
.png.022b5452a8f28f552bc9430097a16da2.png)