feat(fulfillment_order): add Fulfillments (GET fulfillment_orders/{id}/fulfillments.json) - #343
Merged
oliver006 merged 1 commit intoJul 10, 2026
Conversation
…}/fulfillments.json) Adds FulfillmentOrderService.Fulfillments, which lists the fulfillments created for a specific fulfillment order. FulfillmentService.List is scoped to an ORDER, so on a split (multi-fulfillment-order) order it returns every fulfillment on the order and gives no way to tell which fulfillment belongs to which fulfillment order. This endpoint is scoped to a single fulfillment order, returning exactly its fulfillments — needed to post fulfillment events (delivery state) to the correct fulfillment on split orders.
Collaborator
|
Thanks for the PR - I'll try to review it in the coming days. |
oliver006
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
FulfillmentOrderService.Fulfillments(ctx, fulfillmentOrderId), wrapping the Shopify Admin REST endpoint:https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#get-fulfillment-orders-fulfillment-order-id-fulfillments
Why
FulfillmentService.Listis scoped to an order, so on an order that has been split into multiple fulfillment orders it returns every fulfillment on the order, with no way to tell which fulfillment belongs to which fulfillment order. There was no method for the fulfillment-order-scoped endpoint, which returns exactly the fulfillments created for a single fulfillment order.This is needed to act on the correct fulfillment of a split order — e.g. posting a fulfillment event (tracking/shipment status) to the right fulfillment instead of all of them.
Changes
Fulfillmentsmethod onFulfillmentOrderService/FulfillmentOrderServiceOp, returning[]Fulfillmentvia the existingFulfillmentsResourceshape.TestFulfillmentOrderFulfillmentsmirroring the existingFulfillmentOrdertest style (httpmock).Additive only — no changes to existing methods or types.
go build ./...andgo test ./...pass.