Error during Prestashop update order

:bullseye: What is your goal?

Update the status of an order. I just need to get paste this error and make the scenario works.

:thinking: What is the problem & what have you tried?

Update order requires Order ID but I get an error that “id_address_delivery” is required. So I change ID to Address Delivery ID and then I get Status Code Error: 404.

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

This isn’t a Make mapping issue — it’s how the PrestaShop Orders API works.

Key point:

  • Order ID and id_address_delivery are different entities

  • The Update Order endpoint still requires id_address_delivery in the payload, even if you’re only changing the status

What’s happening:

  • Using Order ID → API complains that id_address_delivery is missing

  • Using Address Delivery ID as Order ID → 404, because that ID doesn’t exist in the orders resource

So the fix is not “switching IDs”, but sending the correct Order ID while also providing the required delivery address field.

This usually means:

  • Fetch the existing order first

  • Reuse its id_address_delivery

  • Then update the order status with the full required structure

If you want, I can explain the minimal payload structure PrestaShop expects so the update works without 404s.

Thanks for that explanation. I used ChatGPT also to help me figure out.

I don’t know how I can also gives the id_address_delivery with the order_id.

And there’s this thing that I cannot understand. If I want to change the Order Status, I must give it the value I want the order status to be after the update but where should this input be?

Great questions — this is exactly where PrestaShop’s API design is confusing, so you’re not missing anything obvious.

Let’s reset the mental model first, because this is the key part.


:one: How PrestaShop “Update Order” actually works

PrestaShop does not support partial updates for orders.

When you call Update Order, you are effectively doing a full order update, even if you only want to change the status.

That means:

  • order_id identifies which order

  • but all required order fields must still be present

  • id_address_delivery is mandatory, even if you are not changing it

That’s why:

  • Using only order_id → error: missing id_address_delivery

  • Using id_address_delivery as order_id → 404 (wrong resource)

Both behaviors are expected.


:two: Where id_address_delivery comes from

You do not invent it and you do not pass it separately.

The correct pattern is always:

  1. Get Order (using Order ID)

  2. Read the existing id_address_delivery from the response

  3. Reuse that value in the Update Order payload

You are essentially saying:

“Update this order, but keep using the same delivery address.”


:three: Where the Order Status value goes

Order status is not a top-level field.

In PrestaShop, the status is changed by updating:

current_state

So the status you want after the update is passed as:

current_state = <status_id>

Example:

  • 2 = Payment accepted

  • 3 = Preparation in progress

  • 4 = Shipped
    (depending on your shop configuration)


:four: Minimal working logic (conceptual)

The flow must be:

  1. Get Order

    • Input: Order ID

    • Output: id_address_delivery, id_customer, etc.

  2. Update Order

    • Order ID = same Order ID

    • id_address_delivery = value from Get Order

    • current_state = target status ID

If you skip step 1, PrestaShop has no way to know the required fields — and it fails.


:five: Why this feels harder than it should

This isn’t a Make issue.
This is exactly how the PrestaShop Orders API behaves, and it surprises a lot of people because it looks like a simple status update.

Once you follow the Get → Reuse required fields → Update pattern, the 404 and missing-field errors disappear.

If you want, next step I can show:

  • the minimal XML / JSON structure PrestaShop expects

  • or how to map this cleanly in Make without duplicating fields