Error received with purchase_order_update


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

mutation {
  purchase_order_update(data: { po_id: "2541", packing_note: "test note" }) {

and receiving the following error response:

  "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?


@tomasw Any idea what is going wrong with this?

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!

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…


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