laravel-shopify icon indicating copy to clipboard operation
laravel-shopify copied to clipboard

The fulfillment order's assigned fulfillment service must be of api type

Open tariqbilal opened this issue 2 years ago • 0 comments

I am trying to use fulfilmentRequest Resource but I am getting the error

The fulfillment order's assigned fulfillment service must be of api type

Steps to Reproduce

$fulfillment_array = [
                'fulfillment_request' => 
                [
                    'message' => "Fulfill this ASAP please.",
                    'fulfillment_order_id' => $fulfillment_id,
                ]
            ];
			$fulfillment_request = $shop->api()->rest('POST', '/admin/api/2022-07/fulfillment_orders/' . $fulfillment_id . '/fulfillment_request.json', $fulfillment_array);
       ```		
### Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

* Laravel Version: v8
* PHP Version: v8

{"errors":true,"response":{},"status":422,"body":["The fulfillment order's assigned fulfillment service must be of api type"],"link":null,"exception":{},"timestamps":[]}

I have searched over the internet hope I could get some information from you seems like a bug 

tariqbilal avatar Aug 04 '22 18:08 tariqbilal

Hi @tariqbilal

That looks like an error from the Shopify api itself with your request not meeting their requirements.

A quick google search brings up this - the same error and possible solution. https://community.shopify.com/c/shopify-apis-and-sdks/fulfillment-api-returning-404/td-p/779115 https://community.shopify.com/c/shopify-apis-and-sdks/unable-to-mark-orders-fulfilled-via-api-call/td-p/931264

As this is not an issue with the package I am closing this ticket.

Kyon147 avatar Aug 26 '22 08:08 Kyon147