Skip to content

feat(fulfillment_order): add Fulfillments (GET fulfillment_orders/{id}/fulfillments.json) - #343

Merged
oliver006 merged 1 commit into
bold-commerce:masterfrom
hseinmoussa:feat/fulfillment-order-fulfillments-upstream
Jul 10, 2026
Merged

feat(fulfillment_order): add Fulfillments (GET fulfillment_orders/{id}/fulfillments.json)#343
oliver006 merged 1 commit into
bold-commerce:masterfrom
hseinmoussa:feat/fulfillment-order-fulfillments-upstream

Conversation

@hseinmoussa

Copy link
Copy Markdown

What

Adds FulfillmentOrderService.Fulfillments(ctx, fulfillmentOrderId), wrapping the Shopify Admin REST endpoint:

GET /admin/api/{version}/fulfillment_orders/{fulfillment_order_id}/fulfillments.json

https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillment#get-fulfillment-orders-fulfillment-order-id-fulfillments

Why

FulfillmentService.List is 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

  • New Fulfillments method on FulfillmentOrderService / FulfillmentOrderServiceOp, returning []Fulfillment via the existing FulfillmentsResource shape.
  • Unit test TestFulfillmentOrderFulfillments mirroring the existing FulfillmentOrder test style (httpmock).

Additive only — no changes to existing methods or types. go build ./... and go test ./... pass.

…}/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.
@oliver006

Copy link
Copy Markdown
Collaborator

Thanks for the PR - I'll try to review it in the coming days.

@oliver006
oliver006 merged commit 4603d16 into bold-commerce:master Jul 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants