How to update the delivery status via Shopware 6 API?

97 views Asked by At

I can't update the delivery status of an order via the Shopware 6 Admin API. This is the request URL: https://example.com/api/_action/order_delivery/018d1bb8cbeb739e8ce3e82075f0f1c4/state/ship And this is the relevant part of the response:

{
        "status": "400",
        "code": "SYSTEM__STATE_MACHINE_INVALID_STATE_FIELD",
        "title": "Bad Request",
        "detail": "Field \"stateId\" does not exists or isn't of type StateMachineStateField.",
}

When I send this body with the post request, I get the same error:

{
  "sendMail": null,
  "documentIds": [],
  "mediaIds": [],
  "stateFieldName": "state_id"
}

The ID of the order delivery is 100% correct. What am I doing wrong?

0

There are 0 answers