I'm trying to build a fulfillment workflow using the APIs as described here: https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments
However, the REST API appears to be missing a critical piece of data. The line items don't contain SKUs. Yet everything works off of the SKUs, including the inventory APIs described on the same page here: https://shopify.dev/apps/fulfillment/fulfillment-service-apps/manage-fulfillments#step-9-share-inven...
Am I missing something? How do I get the REST API to give me the SKUs in line items? I am aware I can get them via GraphQL, but if I have to use GraphQL, then why even have REST APIs?
What call are you using, exactly?
SKUs will show up in the data. If you use this, it definitely works:
/admin/api/[api version]/orders/[order number].json
I'm using the new fulfillment system as it is linked in the original post. The REST endpoint is:
Okay, I don't see it in that particular call but you can get it from the other call they describe:
Yeah, but with the new system you have to accept a FulfillmentOrder before you can create a Fulfillment. This is why it's a problem. It's going to be a problem for everyone using fulfillments in a while because they're ditching the old Fulfillment system according to the attached note on this page: https://shopify.dev/apps/fulfillment/fulfillment-service-apps
If your app is using the Order (REST or GraphQL) and Fulfillment (REST or GraphQL) API resources to fulfill orders, then you're using a legacy workflow. As of API version 2022-07, the legacy workflow will no longer be supported.
By API version 2023-04, all apps should be using the FulfillmentOrder object to manage fulfillments. For more information on fulfillment-related resources that were removed in API version 2022-07, refer to the 2022-07 release notes.
Okay but even so, you are getting item IDs and inventory IDs. You can look up the SKU from the inventory ID, if not the item ID.
Yes there are absolutely work arounds, including using the GraphQL version of this same object instead of REST (which is what I did). My point is that every other part of the new FulfillmentOrders API uses SKUs, not product IDs. Thus the REST endpoint for assigned_fulfillment_orders should include SKUs, not product IDs.
Understood. I was just trying to explore options but I absolutely agree.
There's no good reason to omit the SKU from the line item data. Shopify needs to address this problem.