# Error received with purchase\_order\_update

**URL:** <https://community.shiphero.com/t/error-received-with-purchase-order-update/1432>\
**Category:** GraphQL API\
**Created:** [July 12, 2021, 5:42pm UTC](https://community.shiphero.com/t/error-received-with-purchase-order-update/1432 "2021-07-12T17:42:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/david/32/22_2.png) [@david](https://community.shiphero.com/u/david)\
**Post date:** [July 12, 2021, 5:42pm UTC](https://community.shiphero.com/t/error-received-with-purchase-order-update/1432/1 "2021-07-12T17:42:08Z")

</div>

Hi,

We are trying to update a purchase order with the following:

```auto
mutation {
  purchase_order_update(data: { po_id: "2541", packing_note: "test note" }) {
    request_id
    complexity
  }
}

```

and receiving the following error response:

```auto
{
  "errors": [
    {
      "message": "Cannot access the requested int. Permission denied",
      "operation": "purchase_order_update",
      "field": "purchase_order_update",
      "request_id": "60ec7e6910583ec3795714e5",
      "code": 9
    }
  ],
  "data": {
    "purchase_order_update": null
  }
}

```

The `po_id` provided above is valid and _not_ the po\_number. The error seems to be the same regardless of what fields we try to update. Any idea what we might be doing wrong?

-David

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/david/32/22_2.png) [@david](https://community.shiphero.com/u/david)\
**Post date:** [July 14, 2021, 3:06pm UTC](https://community.shiphero.com/t/error-received-with-purchase-order-update/1432/2 "2021-07-14T15:06:33Z")

</div>

@tomasw Any idea what is going wrong with this?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [July 15, 2021, 12:33am UTC](https://community.shiphero.com/t/error-received-with-purchase-order-update/1432/3 "2021-07-15T00:33:56Z")

</div>

Hi @david!

It might be the `po_id`, it looks kind of short, try the number you see on the URL (should be something like 717119)  
We have a couple of IDs when it comes to PO’s because some of them are legacy id’s used in the past.  
Let me know if that doesn’t work.  
Thanks in advance!  
Tom

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/david/32/22_2.png) [@david](https://community.shiphero.com/u/david)\
**Post date:** [July 15, 2021, 3:16pm UTC](https://community.shiphero.com/t/error-received-with-purchase-order-update/1432/4 "2021-07-15T15:16:41Z")

</div>

Hi @tomasw ,

Thanks, and yes, that was it.

We have an PO webhook in place which sends a `po_id` field. Despite the naming convention, this is _not_ the `po_id` field to be used to `purchase_order_update` calls, but is the legacy id field. The `id` field in the webhook does seem to work for PO updates.

What are the chances we can get some documentation around this? It would certainly save a little bit of head banging…

Thanks  
David

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [July 16, 2021, 1:31pm UTC](https://community.shiphero.com/t/error-received-with-purchase-order-update/1432/5 "2021-07-16T13:31:11Z")

</div>

Hi @david!  
That makes a lot of sense, thanks for bringing that up.  
We will update our webhooks docs with this.  
Thanks again!  
Tom
