Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

FulfillmentCreateV2 BREAKING CHANGES outside of API version control

Solved

FulfillmentCreateV2 BREAKING CHANGES outside of API version control

Parcel_Intellig
Shopify Partner
107 1 52

Hi Shopify

 

We've been using FulfillmentCreateV2 (2022-10) to create fulfilments and up until now we've been sending each line item separately (as to why we do this is a different problem altogether :)), it's been working great up until today where the API is throwing an error saying Fulfillment payloads must contain unique fulfillment order ids

 

i.e. we are sending this:

 

"lineItemsByFulfillmentOrder": [
      {
        "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/11111111",
        "fulfillmentOrderLineItems": {
          "id": "gid://shopify/FulfillmentOrderLineItem/123456",
          "quantity": 1
        }
      },
      {
        "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/11111111",
        "fulfillmentOrderLineItems": {
          "id": "gid://shopify/FulfillmentOrderLineItem/789012",
          "quantity": 1
        }
      }
    ],

 

 

rather than this:

 

{
        "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/11111",
        "fulfillmentOrderLineItems": [{
          "id": "gid://shopify/FulfillmentOrderLineItem/123456",
          "quantity": 1
        },{
          "id": "gid://shopify/FulfillmentOrderLineItem/789012",
          "quantity": 1
        }]
      }

 

 

Shouldn't any changes to API behaviour, especially breaking changes be rolled out inline with new API versions rather than pushed to previous API versions? we are using 2022-10 which is still a supported version and therefore there shouldn't be any breaking changes rolled out to this version right?

Accepted Solution (1)

marcusturner
Shopify Staff
4 1 5

This is an accepted solution.

Hi

 

Thank you for your report!

 

This was a bug which was introduced while adding functionality to a future release which would prevent overfulfillment.

 

A fix for this was shipped today so you should hopefully not be running into this issue now.

 

Out of interest, may you share with us your use case for specify the same fulfilment order multiple times, rather then specify it once and supply it with a list of fulfillmentOrderLineItems?

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 3 (3)

garyrgilbert
Shopify Partner
431 41 185

Wow, Glad I found your post. I just rolled out a new version of our app and started getting these errors. At first I couldn't figure out what was going on then noticed the docs had changed and then discovered your post.

 

There is nothing wrong with sending the line items separately if you end up doing partial fulfillments 🙂

 

Introducing a breaking change in older api version! Wow..

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution

marcusturner
Shopify Staff
4 1 5

This is an accepted solution.

Hi

 

Thank you for your report!

 

This was a bug which was introduced while adding functionality to a future release which would prevent overfulfillment.

 

A fix for this was shipped today so you should hopefully not be running into this issue now.

 

Out of interest, may you share with us your use case for specify the same fulfilment order multiple times, rather then specify it once and supply it with a list of fulfillmentOrderLineItems?

To learn more visit the Shopify Help Center or the Community Blog.

Parcel_Intellig
Shopify Partner
107 1 52

Hi @marcusturner ,

 

That's great! We don't really have a use case for doing it multiple times, it was just built like that, however will be fixed in future.