Fulfillment.CreateV2 Returning {"Errors":"The Api_client Does Not Have The Required Permission(s)."}

Good day,
I encountered this error when I tried using shopify-node-api’s fulfillment.createV2() function using the parameters : fulfillment.createV2({orderId, status, location_id, notify_customer, line_items}). We were previously using the fulfillment.create(orderId, {status, location_id, notify_customer, line_items}) function but since we need to update regarding the breaking changes for shopify I’m trying to make the V2 function work.

So I was wondering where the problem lies here, am I using the wrong parameters for createV2? if yes can anyone point me where to find the right parameter docs, I only found a list of functions in the shopify node api documentation and no explanation on what parameters to use. or do I need something else to make this work?

Will greatly appreciate your responses thanks!

It’s probably expecting stuff related to fulfillment orders:

fulfillment.line_items_by_fulfillment_order = [
  {
    "fulfillment_order_id": 1046000786,
    "fulfillment_order_line_items": [
      {
        "id": 1058737504,
        "quantity": 1
      }
    ]
  }
];

See: https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#post-fulfillments for more info.

shopify-api-node isn’t something that’s maintained by Shopify, you may want to open an issue in their repo: https://github.com/MONEI/Shopify-api-node