# Erhalte Response "Method Not Allowed" bei \_action/order/{id}/state/process

**URL:** <https://forum.shopware.com/t/erhalte-response-method-not-allowed-bei-action-order-id-state-process/70992>\
**Category:** Programmierung\
**Created:** [18. November 2020 um 10:55 UTC](https://forum.shopware.com/t/erhalte-response-method-not-allowed-bei-action-order-id-state-process/70992 "2020-11-18T10:55:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin\_wehrli](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/martin_wehrli/32/13151_2.png) [@martin\_wehrli](https://forum.shopware.com/u/martin_wehrli)\
**Post date:** [18. November 2020 um 10:55 UTC](https://forum.shopware.com/t/erhalte-response-method-not-allowed-bei-action-order-id-state-process/70992/1 "2020-11-18T10:55:44Z")

</div>

Ich versuche Bestellungen mittels \_action-Methode vom Status “offen” auf “in Bearbeitung” zu patchen, erhalte aber den StatusCode: MethodNotAllowed zurück.

&nbsp;

Ich habe meinen Aufruf verglichen mit dem, welcher das Backend erzeugt, wenn der Status manuell geändert wird und kann ausser der API-Version (habe es mit v2 und v3 versucht) keinen Unterschied erkennen.

&nbsp;

**Hier die komplette Response (inkl RequestMessage):**

```
{StatusCode: 405, ReasonPhrase: 'Method Not Allowed', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
  Connection: Keep-Alive
  Server: Apache
  sw-language-id:
  Transfer-Encoding: chunked
  Keep-Alive: timeout=5, max=10
  Cache-Control: private
  Date: Tue, 17 Nov 2020 07:49:43 GMT
  Vary: Authorization
  X-Frame-Options: deny
  X-Powered-By: PleskLin
  sw-version-id:
  Access-Control-Allow-Headers: Content-Type,Authorization,sw-context-token,sw-access-key,sw-language-id,sw-version-id,sw-inheritance,fail-on-error,indexing-behavior,single-operation,sw-include-seo-urls
  Access-Control-Allow-Origin: *
  Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
  sw-context-token:
  Content-Type: application/json
}}
    Content: {System.Net.Http.StreamContent}
    Headers: {Connection: Keep-Alive
Server: Apache
sw-language-id:
Transfer-Encoding: chunked
Keep-Alive: timeout=5, max=10
Cache-Control: private
Date: Tue, 17 Nov 2020 07:49:43 GMT
Vary: Authorization
X-Frame-Options: deny
X-Powered-By: PleskLin
sw-version-id:
Access-Control-Allow-Headers: Content-Type,Authorization,sw-context-token,sw-access-key,sw-language-id,sw-version-id,sw-inheritance,fail-on-error,indexing-behavior,single-operation,sw-include-seo-urls
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
sw-context-token:
}
    IsSuccessStatusCode: false
    ReasonPhrase: "Method Not Allowed"
    RequestMessage: {Method: PATCH, RequestUri: 'https://sw.webcrew.ch/api/v3/_action/order/ab639153cb6a4b1eb8dae906929a443b/state/process', Version: 2.0, Content: System.Net.Http.StringContent, Headers:
{
  Accept: application/vnd.api+json
  Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjBhYzJlYTMzNDQzMThjZTY3Mjc5YWYyMTg1ZGY0NmI2NmRhZjA5NjZjNmM2NGYwYzQ2Yjk2NGM1Y2IzMjE3ODM5NjA5ZjU5NGJlMWNhZjkwIn0.eyJhdWQiOiJhZG1pbmlzdHJhdGlvbiIsImp0aSI6IjBhYzJlYTMzNDQzMThjZTY3Mjc5YWYyMTg1ZGY0NmI2NmRhZjA5NjZjNmM2NGYwYzQ2Yjk2NGM1Y2IzMjE3ODM5NjA5ZjU5NGJlMWNhZjkwIiwiaWF0IjoxNjA1NTk5MzI0LCJuYmYiOjE2MDU1OTkzMjQsImV4cCI6MTYwNTU5OTkyNCwic3ViIjoiYzZiODE2MTU2Yjk2NGZhNzkxYWI5ZjA5MTUxODIzOWEiLCJzY29wZXMiOlsid3JpdGUiLCJhZG1pbiJdfQ.m5KBTsYM1j3TZsYOs5JJw07t7g2vMU1RLXguK9LQ0qyFFbnEBpw6E3bz2ezwqhKKn53eq-s6LUSwJvzeghiwBbH3QiLw9b2tO0fBN4i1T3gGXOm2gOztuon9UNkTof2n7F5ysweAGRLR_v38Fvpsr3yjzRzX-NdtBtQ4bJ9slp8IvmxBZd4uLT_ItCL2Gd6T0j4SbfFU5Kuj9UDWzJXDKUKk3ZRQvZH8OOOvMHR4KcEsPEdTg8ILIBRvSXgr43BJB1WVjHysfIqi9O9oifaOBqXu-sEnsGeL_ISq_gfNXI6Mk9MSLV4-iZhug5LJ0Wml3f1FRkIrFz2zHKWOg_Vlcg
  Accept-Encoding: gzip
  Accept-Encoding: deflate
  Accept-Encoding: br
  Content-Type: application/json; charset=utf-8
  Content-Length: 47
}}
    StatusCode: MethodNotAllowed
    Version: {1.1}

```

**Screenshot XHR - bei setzen des Status über das Backend von Shopware zum Vergleich:**

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/7/75216cfd94ebaa21ced928316514bdc0233546de.jpeg)

&nbsp;

Ich habe mich als völliger Shopware und REST-API Newbee schon ziemlich weit “vorgekämpft”, aber dabei stehe ich mal richtig auf dem Schlauch und frage mich was ich falsch mache.Jede Hilfe ist daher hoch willkommen.

---

<div class="post-metadata">

**Author:** ![martin\_wehrli](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/martin_wehrli/32/13151_2.png) [@martin\_wehrli](https://forum.shopware.com/u/martin_wehrli)\
**Post date:** [18. November 2020 um 11:53 UTC](https://forum.shopware.com/t/erhalte-response-method-not-allowed-bei-action-order-id-state-process/70992/2 "2020-11-18T11:53:06Z")

</div>

Einfach zu dämlich! Ich sollte die Action halt nicht mit PATCH sondern mit POST aufrufen – und schon funktioniert es!
