# API PUT /v2/orders/{order\_id} Can't set fulfillment state or order state

**URL:** <https://developer.squareup.com/forums/t/api-put-v2-orders-order-id-cant-set-fulfillment-state-or-order-state/1259>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [November 16, 2020, 4:23am UTC](https://developer.squareup.com/forums/t/api-put-v2-orders-order-id-cant-set-fulfillment-state-or-order-state/1259 "2020-11-16T04:23:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanlath](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@ryanlath](https://developer.squareup.com/forums/u/ryanlath)\
**Post date:** [November 16, 2020, 4:23am UTC](https://developer.squareup.com/forums/t/api-put-v2-orders-order-id-cant-set-fulfillment-state-or-order-state/1259/1 "2020-11-16T04:23:52Z")

</div>

I tried to change order state to CANCELED. Error: need to change fulfillment state. I can’t change fulfillment state:

I send the following and get an HTTP\_CODE of 200 ( 😄) and an order object in return that shows no change ( ☹). I queried the order to verify no change.

Is this a bug?

```auto
curl https://connect.squareup.com/v2/orders/{ORDER_ID}\
  -X PUT \
  -H 'Square-Version: 2020-10-28' \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "order": {
    "location_id":"LOCATION_ID",
    "version":LATEST_VERSION,
    "fulfillment": [
      {
        "state": "CANCELED"
      }
    ]
  }
}'

```

---

<div class="post-metadata">

**Author:** ![sjosey](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/sjosey/32/40_2.png) [@sjosey](https://developer.squareup.com/forums/u/sjosey)\
**Post date:** [November 16, 2020, 6:11pm UTC](https://developer.squareup.com/forums/t/api-put-v2-orders-order-id-cant-set-fulfillment-state-or-order-state/1259/2 "2020-11-16T18:11:56Z")

</div>

`fulfillment` should be `fulfillments`. It probably is ignoring that field since it’s invalid, and thus not changing anything and returning a 200 since it had no errors.

---

<div class="post-metadata">

**Author:** ![ryanlath](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@ryanlath](https://developer.squareup.com/forums/u/ryanlath)\
**Post date:** [November 16, 2020, 7:42pm UTC](https://developer.squareup.com/forums/t/api-put-v2-orders-order-id-cant-set-fulfillment-state-or-order-state/1259/3 "2020-11-16T19:42:14Z")

</div>

OK, I corrected my typo. And for future reference here’s what I needed to cancel the fulfillment. Thanks.

```auto
curl https://connect.squareup.com/v2/orders/{ORDER_ID}\
  -X PUT \
  -H 'Square-Version: 2020-10-28' \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "order": {
    "location_id":"LOCATION_ID",
    "version":LATEST_VERSION,
    "fulfillments": [
      {
        "uid": UID,
        "state": "CANCELED"
      }
    ]
  }
}'

```
