Occasionally when I call the FulfillmentRequest via rest using:
I get an error message which I do not understand:
The fulfillment order's assigned fulfillment service must be of api type
Is this something I have to check each time I make this request? It seems to only occur occasionally for the same store.
Heres my request Id:
I would be happy to look into this for you, if you're still running into that error.
I haven't been able to reproduce the said behaviour, and the logs associated with the request id you provided have expired. If you wouldn't mind, could you provide the request id of a more recent request (within the last week) you've made so I can investigate this behaviour further.
After doing some investigation, I've been able to find out the reason you get that error message for some requests. Find below an explanation of what that error means, and why you're possibly seeing it.
line_item in an order has a
fulfillment_service which indicates a third-party warehouse that's fulfilling the item as described here. Valid values are
manual (merchant would fulfill item), or the name of the provider, such as
shipwire (a warehouse capable of fulfilling the item) as shown in the docs here.
An order item with
manual indicates the merchant would be fulfilling that order 'themselves' (used loosely here to mean there isn't an automated third-party service), and hence no need to make a request to a third-party service to handle that order. On the other hand, if the
fulfillment_service of the order item is a service (amazon, shipwire, etc.), then the merchant would be using that service to fulfill the order item.
The FulfillmentOrder resource which represents either an item or a group of items in an order that are to be fulfilled from the same location has a
fulfillment_service_handle field indicating how a fulfillment order would be handled. This isn't documented but I believe the
fulfillment_service_handle expects the same valid values as
fulfillment_service mentioned above. Thus, the only time one would need to send a fulfillment request for a fulfillment order is when the
fulfillment_service_handle has a valid value other than
Making a fulfillment request sends a request to a service provider asking them to handle a fulfillment order (all orders associated with it) or an order item from the fulfillment order. For such a call to be valid, the
fulfillment_service_handle should have the value of a valid fulfillment service centre capable of API integrations.
To answer your question about checks, yes, I believe that is the case. You would have to check to make sure the
fulfillment_service_handle field of a fulfillment order is not
manual before making a fulfillment request.
I hope this throws more light on the error in question and helps you take measures to avoid having this error message or to handle the error appropriately should you encounter it.
Let me know if there's anything you'd like me to throw more light on. Thank you!