gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

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

Closed tariqbilal closed 2 years ago

tariqbilal commented 2 years ago

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.

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

Kyon147 commented 2 years ago

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.