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

Hi all,

I’m trying to do the following mutation

mutation = f"""
    mutation {{
        fulfillmentOrderAcceptFulfillmentRequest(id: "{fulfillment_order_id}", message: "{message}") {{
            fulfillmentOrder {{
                id
                status
                requestStatus
            }}
            userErrors {{
                field
                message
            }}
        }}
    }}
"""

and I’m getting the following error:

“The fulfillment order’s assigned fulfillment service must be of api type”

Here’s the full response:

"Result: {‘data’: {‘fulfillmentOrderAcceptFulfillmentRequest’: {‘fulfillmentOrder’: None, ‘userErrors’: [{‘field’: None, ‘message’: “The fulfillment order’s assigned fulfillment service must be of api type”}]}}, ‘extensions’: {‘cost’: {‘requestedQueryCost’: 10, ‘actualQueryCost’: 10, ‘throttleStatus’: {‘maximumAvailable’: 2000.0, ‘currentlyAvailable’: 1990, ‘restoreRate’: 100.0}}}}

I’ve searched the forums and google but couldn’t find a straight answer. Would someone be able to give me some guidance?

Thank you!!

Is this your own fulfillment service that you have created or are you looking to create a fulfillment?

Theres some good docs here Apps in orders and fulfillment

Hi Jordan,

Thanks for responding. I’m sorry I’m a little new at this, so I’m not sure how to answer your question. Probably best to describe my scenario.

I have a python program which uses Shopify’s graphql to query fulfillment orders looking for unfulfilled orders pertaining to my client’s warehouse location and processing them. Right now when it sees a fulfillment order, it double checks warehouse inventory, generates a shipping label (via shipengine), sends the order details to the warehouse staff for fulfillment, and immediately creates the fulfillment record in Shopify, which marks the order as fulfilled.

This all works well. But it’s not ideal. The problem is, until the product physically leaves the warehouse, we shouldn’t be marking the item fulfilled, it should be showing “in progress” instead. At that point is where the program should create the fulfillment record once the order was actually fulfilled.

I do not have a custom fulfillment service. I’m using Shopify’s default fulfillment service and my program simply calls to graphql using my api keys. I only want to change the status to “in progress”, is there a simpler way to do this?

Thanks!

Hey Gil,

What warehouse are you using out of interest?

So if you are using Shopifys default fulfillment service it will automatically accept the fulfillments based on the inventory in Shopify.
If you want to accept/reject the fulfillments you would need to create your own fulfillment service I believe. Shopify Fulfillment Orders API: A Better Fulfillment Experience - Shopify

You can see the flow of how that would work here. Apps in order management


However if I may suggest that a simpler solution here would be for your warehouse integration to only create the fulfillment in Shopify when the package is despatched using that as a trigger instead of immediately fulfilling. That would probably be easier to start with, and see if that works for you.

Thanks Jordan. I was worried I had to create my own fulfillment service. Which I may end up doing in the future, but I was hoping for a more simple solution as all I needed to do right now was to just set the order status to “in_progress”

The warehouse is my client. They own a small warehouse facility, I’m not sure I can share their information here.

Thank you for your help!

Ah that makes sense. I was wondering if it was a known system I might be able to help on which to trigger your fulfillment :slight_smile:

Think the simplest thing to do would be to get the data when an order is despatched and use that to create a fulfillment

Thanks again Jordan. Yes. I agree! Would have been nice to be able to let the shopify user know the warehouse got the order and is working on it, instead of waiting until it’s fulfilled.

I don’t think that Customers get a notification for fulfillments being accepted. Its more for internal use.