I need help with a strange error I’m getting.
I am trying to use the orders post endpoint to add already fulfilled orders. Usually it work with no problems, but some requests returns with status code 422 and the message: “{ errors: { base: [ ‘Internal error’ ] } }”. As the error code is 422 I would assume there is a fault in the request format or data on my end, but I have tried changing almost everything without any luck. The message ‘Internal error’, is also kind of puzzling as it would contradict the error code of 422?
Could this actually be an internal problem with the API endpoint or is there something
After some more digging I have figured out that removing the fulfillment status and fulfillments with location id, makes the request succeed, although not as I want it.
The orders that fail have multiple line items some with known variant ids and some unknown products (price, title, quantity). Removing the products with known variant ids, also made the request succeed.
I tried making sure the specific product ids were set to available in the store I was creating the fulfillment at, as well as setting that store’s inventory of the product variant to plenty enough.
Still haven’t figured out how to fix the problem…