Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Rename shipments → fulfillments in admin API, SDK, and SPA
Damian Legawiecca2fefbd3519
diff --git a/packages/admin-sdk/src/admin-client.ts b/packages/admin-sdk/src/admin-client.tsindex c19c45d89f..34f3c0bdfa 100644--- a/packages/admin-sdk/src/admin-client.ts+++ b/packages/admin-sdk/src/admin-client.ts@@ -48,7 +48,7 @@ import type {LineItemCreateParams,LineItemUpdateParams,AdjustmentCreateParams,- ShipmentUpdateParams,+ FulfillmentUpdateParams,DirectUploadCreateParams,} from './params';@@ -172,15 +172,15 @@ export class AdminClient {this.request<void>('DELETE', `/orders/${orderId}/line_items/${id}`, options),},- shipments: {- update: (orderId: string, id: string, params: ShipmentUpdateParams, options?: RequestOptions): Promise<unknown> =>- this.request('PATCH', `/orders/${orderId}/shipments/${id}`, { ...options, body: params }),+ fulfillments: {+ update: (orderId: string, id: string, params: FulfillmentUpdateParams, options?: RequestOptions): Promise<unknown> =>+ this.request('PATCH', `/orders/${orderId}/fulfillments/${id}`, { ...options, body: params }),- ship: (orderId: string, id: string, options?: RequestOptions): Promise<unknown> =>- this.request('PATCH', `/orders/${orderId}/shipments/${id}/ship`, options),+ fulfill: (orderId: string, id: string, options?: RequestOptions): Promise<unknown> =>+ this.request('PATCH', `/orders/${orderId}/fulfillments/${id}/fulfill`, options),cancel: (orderId: string, id: string, options?: RequestOptions): Promise<unknown> =>- this.request('PATCH', `/orders/${orderId}/shipments/${id}/cancel`, options),+ this.request('PATCH', `/orders/${orderId}/fulfillments/${id}/cancel`, options),},payments: {diff --git a/packages/admin-sdk/src/params.ts b/packages/admin-sdk/src/params.tsindex f505d653eb..af7798cd1f 100644--- a/packages/admin-sdk/src/params.ts+++ b/packages/admin-sdk/src/params.ts@@ -76,9 +76,9 @@ export interface RefundCreateParams {refund_reason_id?: string;}-export interface ShipmentUpdateParams {+export interface FulfillmentUpdateParams {tracking?: string;- selected_shipping_rate_id?: string;+ selected_delivery_rate_id?: string;}export interface OrderCreateParams {diff --git a/packages/admin-sdk/tests/mocks/admin-handlers.ts b/packages/admin-sdk/tests/mocks/admin-handlers.tsindex 0cec261459..952df09ce7 100644--- a/packages/admin-sdk/tests/mocks/admin-handlers.ts+++ b/packages/admin-sdk/tests/mocks/admin-handlers.ts@@ -63,7 +63,7 @@ export const adminFixtures = {permalink: 'categories/clothing',position: 1,},- shipment: {+ fulfillment: {id: 'ship_1',number: 'H12345',state: 'ready',@@ -71,7 +71,7 @@ export const adminFixtures = {tracking_url: null,cost: '5.00',display_cost: '$5.00',- shipped_at: null,+ fulfilled_at: null,created_at: '2026-03-06T12:00:00.000Z',updated_at: '2026-03-06T12:00:00.000Z',order_id: 'or_1',@@ -382,35 +382,35 @@ export const adminHandlers = [// ============================================// Order Shipments// ============================================- http.get(`${API_PREFIX}/orders/:orderId/shipments`, () =>- HttpResponse.json({ data: [adminFixtures.shipment], meta: paginationMeta })+ http.get(`${API_PREFIX}/orders/:orderId/fulfillments`, () =>+ HttpResponse.json({ data: [adminFixtures.fulfillment], meta: paginationMeta })),- http.get(`${API_PREFIX}/orders/:orderId/shipments/:id`, () =>- HttpResponse.json(adminFixtures.shipment)+ http.get(`${API_PREFIX}/orders/:orderId/fulfillments/:id`, () =>+ HttpResponse.json(adminFixtures.fulfillment)),- http.patch(`${API_PREFIX}/orders/:orderId/shipments/:id/ship`, () =>- HttpResponse.json({ ...adminFixtures.shipment, state: 'shipped', shipped_at: '2026-03-06T14:00:00.000Z' })+ http.patch(`${API_PREFIX}/orders/:orderId/fulfillments/:id/ship`, () =>+ HttpResponse.json({ ...adminFixtures.fulfillment, state: 'shipped', fulfilled_at: '2026-03-06T14:00:00.000Z' })),- http.patch(`${API_PREFIX}/orders/:orderId/shipments/:id/cancel`, () =>- HttpResponse.json({ ...adminFixtures.shipment, state: 'canceled' })+ http.patch(`${API_PREFIX}/orders/:orderId/fulfillments/:id/cancel`, () =>+ HttpResponse.json({ ...adminFixtures.fulfillment, state: 'canceled' })),- http.patch(`${API_PREFIX}/orders/:orderId/shipments/:id/resume`, () =>- HttpResponse.json({ ...adminFixtures.shipment, state: 'ready' })+ http.patch(`${API_PREFIX}/orders/:orderId/fulfillments/:id/resume`, () =>+ HttpResponse.json({ ...adminFixtures.fulfillment, state: 'ready' })),- http.patch(`${API_PREFIX}/orders/:orderId/shipments/:id/split`, () =>+ http.patch(`${API_PREFIX}/orders/:orderId/fulfillments/:id/split`, () =>HttpResponse.json({ data: [- { ...adminFixtures.shipment, id: 'ship_1' },- { ...adminFixtures.shipment, id: 'ship_2', stock_location_id: 'sl_2' },+ { ...adminFixtures.fulfillment, id: 'ship_1' },+ { ...adminFixtures.fulfillment, id: 'ship_2', stock_location_id: 'sl_2' },] })),- http.patch(`${API_PREFIX}/orders/:orderId/shipments/:id`, () =>- HttpResponse.json({ ...adminFixtures.shipment, tracking: '1Z999AA10123456784' })+ http.patch(`${API_PREFIX}/orders/:orderId/fulfillments/:id`, () =>+ HttpResponse.json({ ...adminFixtures.fulfillment, tracking: '1Z999AA10123456784' })),// ============================================diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx b/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsxindex 76058a88e0..93c148d901 100644--- a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx@@ -491,20 +491,20 @@ function LineItemsCard({ order }: { order: Order }) {function EditTrackingDialog({orderId,- shipmentId,+ fulfillmentId,currentTracking,open,onOpenChange,}: {orderId: string- shipmentId: string+ fulfillmentId: stringcurrentTracking: string | nullopen: booleanonOpenChange: (open: boolean) => void}) {const mutation = useOrderMutation(orderId, (params: { tracking: string }) =>- adminClient.orders.shipments.update(orderId, shipmentId, params),+ adminClient.orders.fulfillments.update(orderId, fulfillmentId, params),)function handleSubmit(e: FormEvent<HTMLFormElement>) {@@ -521,7 +521,7 @@ function EditTrackingDialog({<DialogContent><DialogHeader><DialogTitle>Edit Tracking</DialogTitle>- <DialogDescription>Update the tracking number for this shipment.</DialogDescription>+ <DialogDescription>Update the tracking number for this fulfillment.</DialogDescription></DialogHeader><form onSubmit={handleSubmit}><DialogBody>@@ -555,11 +555,11 @@ function ShipmentsCard({ order }: { order: Order }) {tracking: string | null} | null>(null)- const shipMutation = useOrderMutation(orderId, (shipmentId: string) =>- adminClient.orders.shipments.ship(orderId, shipmentId, {}),+ const fulfillMutation = useOrderMutation(orderId, (fulfillmentId: string) =>+ adminClient.orders.fulfillments.fulfill(orderId, fulfillmentId, {}),)- const cancelShipmentMutation = useOrderMutation(orderId, (shipmentId: string) =>- adminClient.orders.shipments.cancel(orderId, shipmentId, {}),+ const cancelFulfillmentMutation = useOrderMutation(orderId, (fulfillmentId: string) =>+ adminClient.orders.fulfillments.cancel(orderId, fulfillmentId, {}),)if (fulfillments.length === 0) return null@@ -578,12 +578,12 @@ function ShipmentsCard({ order }: { order: Order }) {</CardAction></CardHeader><CardContent className="flex flex-col gap-4">- {fulfillments.map((shipment) => (- <div key={shipment.id} className="rounded-lg border p-4 flex flex-col gap-3">+ {fulfillments.map((fulfillment) => (+ <div key={fulfillment.id} className="rounded-lg border p-4 flex flex-col gap-3"><div className="flex items-center justify-between"><div className="flex items-center gap-2">- <StatusBadge status={shipment.status} />- <span className="text-sm font-medium">{shipment.number}</span>+ <StatusBadge status={fulfillment.status} />+ <span className="text-sm font-medium">{fulfillment.number}</span></div><DropdownMenu><DropdownMenuTrigger asChild>@@ -594,17 +594,17 @@ function ShipmentsCard({ order }: { order: Order }) {<DropdownMenuContent align="end"><DropdownMenuItemonClick={() =>- setEditTracking({ id: shipment.id, tracking: shipment.tracking })+ setEditTracking({ id: fulfillment.id, tracking: fulfillment.tracking })}><PencilIcon className="size-4" />- {shipment.tracking ? 'Edit Tracking' : 'Add Tracking'}+ {fulfillment.tracking ? 'Edit Tracking' : 'Add Tracking'}</DropdownMenuItem>- {shipment.status === 'ready' && (+ {fulfillment.status === 'ready' && (<DropdownMenuItemonClick={() => {- if (window.confirm('Ship this shipment?')) {- shipMutation.mutate(shipment.id)+ if (window.confirm('Ship this fulfillment?')) {+ fulfillMutation.mutate(fulfillment.id)}}}>@@ -612,14 +612,14 @@ function ShipmentsCard({ order }: { order: Order }) {Ship</DropdownMenuItem>)}- {['pending', 'ready'].includes(shipment.status) && (+ {['pending', 'ready'].includes(fulfillment.status) && (<><DropdownMenuSeparator /><DropdownMenuItemclassName="text-destructive focus:text-destructive"onClick={() => {- if (window.confirm('Cancel this shipment?')) {- cancelShipmentMutation.mutate(shipment.id)+ if (window.confirm('Cancel this fulfillment?')) {+ cancelFulfillmentMutation.mutate(fulfillment.id)}}}>@@ -632,41 +632,41 @@ function ShipmentsCard({ order }: { order: Order }) {</DropdownMenu></div>- {shipment.delivery_method && (+ {fulfillment.delivery_method && (<div className="flex items-center justify-between text-sm">- <span className="text-muted-foreground">{shipment.delivery_method.name}</span>- <span>{shipment.display_cost}</span>+ <span className="text-muted-foreground">{fulfillment.delivery_method.name}</span>+ <span>{fulfillment.display_cost}</span></div>)}- {shipment.stock_location && (+ {fulfillment.stock_location && (<div className="flex items-center gap-1.5 text-xs text-muted-foreground"><MapPinIcon className="size-3" />- {shipment.stock_location.name}+ {fulfillment.stock_location.name}</div>)}- {shipment.tracking && (+ {fulfillment.tracking && (<div className="text-sm"><span className="text-muted-foreground">Tracking: </span>- {shipment.tracking_url ? (+ {fulfillment.tracking_url ? (<a- href={shipment.tracking_url}+ href={fulfillment.tracking_url}target="_blank"rel="noopener noreferrer"className="text-blue-600 hover:underline">- {shipment.tracking}+ {fulfillment.tracking}</a>) : (- <span>{shipment.tracking}</span>+ <span>{fulfillment.tracking}</span>)}</div>)}- {shipment.fulfilled_at && (+ {fulfillment.fulfilled_at && (<span className="text-xs text-muted-foreground">- Shipped {timeAgo(shipment.fulfilled_at)}+ Shipped {timeAgo(fulfillment.fulfilled_at)}</span>)}</div>@@ -677,7 +677,7 @@ function ShipmentsCard({ order }: { order: Order }) {{editTracking && (<EditTrackingDialogorderId={orderId}- shipmentId={editTracking.id}+ fulfillmentId={editTracking.id}currentTracking={editTracking.tracking}open={!!editTracking}onOpenChange={(open) => !open && setEditTracking(null)}diff --git a/packages/admin/src/tables/orders.tsx b/packages/admin/src/tables/orders.tsxindex dff3d2be35..5b8e0cff7f 100644--- a/packages/admin/src/tables/orders.tsx+++ b/packages/admin/src/tables/orders.tsx@@ -47,7 +47,7 @@ defineTable('orders', {render: (order) => order.email ?? '—',},{- key: 'payment_state',+ key: 'payment_status',label: 'Payment',sortable: true,filterable: true,@@ -60,11 +60,11 @@ defineTable('orders', {{ value: 'paid', label: 'Paid' },{ value: 'void', label: 'Void' },],- render: (order) => (order.payment_state ? <StatusBadge status={order.payment_state} /> : '—'),+ render: (order) => (order.payment_status ? <StatusBadge status={order.payment_status} /> : '—'),},{- key: 'shipment_state',- label: 'Shipment',+ key: 'fulfillment_status',+ label: 'Fulfillment',sortable: true,filterable: true,default: true,@@ -75,19 +75,19 @@ defineTable('orders', {{ value: 'partial', label: 'Partial' },{ value: 'pending', label: 'Pending' },{ value: 'ready', label: 'Ready' },- { value: 'shipped', label: 'Shipped' },+ { value: 'fulfilled', label: 'Fulfilled' },],render: (order) =>- order.shipment_state ? <StatusBadge status={order.shipment_state} /> : '—',+ order.fulfillment_status ? <StatusBadge status={order.fulfillment_status} /> : '—',},{- key: 'item_count',+ key: 'total_quantity',label: 'Items',sortable: true,default: true,className: 'text-right tabular-nums text-sm text-muted-foreground',render: (order) => {- const count = order.item_count ?? 0+ const count = order.total_quantity ?? 0return `${count} ${count === 1 ? 'item' : 'items'}`},},diff --git a/spree/api/app/controllers/spree/api/v3/admin/orders/shipments_controller.rb b/spree/api/app/controllers/spree/api/v3/admin/orders/fulfillments_controller.rbsimilarity index 79%rename from spree/api/app/controllers/spree/api/v3/admin/orders/shipments_controller.rbrename to spree/api/app/controllers/spree/api/v3/admin/orders/fulfillments_controller.rbindex a42d40b57e..8c58a03432 100644--- a/spree/api/app/controllers/spree/api/v3/admin/orders/shipments_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/admin/orders/fulfillments_controller.rb@@ -3,10 +3,10 @@ module Spreemodule V3module Adminmodule Orders- class ShipmentsController < BaseController- before_action :set_resource, only: [:show, :update, :ship, :cancel, :resume, :split]+ class FulfillmentsController < BaseController+ before_action :set_resource, only: [:show, :update, :fulfill, :cancel, :resume, :split]- # PATCH /api/v3/admin/orders/:order_id/shipments/:id+ # PATCH /api/v3/admin/orders/:order_id/fulfillments/:iddef updatewith_order_lock doresult = Spree.shipment_update_service.call(@@ -22,8 +22,8 @@ module Spreeendend- # PATCH /api/v3/admin/orders/:order_id/shipments/:id/ship- def ship+ # PATCH /api/v3/admin/orders/:order_id/fulfillments/:id/fulfill+ def fulfillwith_order_lock do@resource.ship!render json: serialize_resource(@resource.reload)@@ -32,7 +32,7 @@ module Spreeendend- # PATCH /api/v3/admin/orders/:order_id/shipments/:id/cancel+ # PATCH /api/v3/admin/orders/:order_id/fulfillments/:id/canceldef cancelwith_order_lock do@resource.cancel!@@ -42,7 +42,7 @@ module Spreeendend- # PATCH /api/v3/admin/orders/:order_id/shipments/:id/resume+ # PATCH /api/v3/admin/orders/:order_id/fulfillments/:id/resumedef resumewith_order_lock do@resource.resume!@@ -52,7 +52,7 @@ module Spreeendend- # PATCH /api/v3/admin/orders/:order_id/shipments/:id/split+ # PATCH /api/v3/admin/orders/:order_id/fulfillments/:id/splitdef splitwith_order_lock dovariant = Spree::Variant.find_by_prefix_id!(params[:variant_id])@@ -67,10 +67,9 @@ module Spreefulfilment_changer = @resource.transfer_to_location(variant, quantity, stock_location)if fulfilment_changer.run!- # Original shipment may be destroyed if all items were transferred- shipments = @order.reload.shipments+ fulfillments = @order.reload.shipmentsrender json: {- data: shipments.map { |s| serialize_resource(s) }+ data: fulfillments.map { |s| serialize_resource(s) }}elserender_validation_error(fulfilment_changer.errors)@@ -85,7 +84,7 @@ module Spreeenddef serializer_class- Spree.api.admin_shipment_serializer+ Spree.api.admin_fulfillment_serializerenddef parent_associationdiff --git a/spree/api/config/routes.rb b/spree/api/config/routes.rbindex 735d4bb581..64c8263629 100644--- a/spree/api/config/routes.rb+++ b/spree/api/config/routes.rb@@ -137,9 +137,9 @@ Spree::Core::Engine.add_routes doendresources :line_items, controller: 'orders/line_items'- resources :shipments, controller: 'orders/shipments', only: [:index, :show, :update] do+ resources :fulfillments, controller: 'orders/fulfillments', only: [:index, :show, :update] domember do- patch :ship+ patch :fulfillpatch :cancelpatch :resumepatch :splitdiff --git a/spree/api/spec/controllers/spree/api/v3/admin/orders/shipments_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/admin/orders/fulfillments_controller_spec.rbsimilarity index 84%rename from spree/api/spec/controllers/spree/api/v3/admin/orders/shipments_controller_spec.rbrename to spree/api/spec/controllers/spree/api/v3/admin/orders/fulfillments_controller_spec.rbindex 33f36451ee..23676c8f14 100644--- a/spree/api/spec/controllers/spree/api/v3/admin/orders/shipments_controller_spec.rb+++ b/spree/api/spec/controllers/spree/api/v3/admin/orders/fulfillments_controller_spec.rb@@ -1,6 +1,6 @@require 'spec_helper'-RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controller do+RSpec.describe Spree::Api::V3::Admin::Orders::FulfillmentsController, type: :controller dorender_viewsinclude_context 'API v3 Admin authenticated'@@ -11,7 +11,7 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controbefore { request.headers.merge!(headers) }describe 'GET #index' do- it 'returns shipments for the order' do+ it 'returns fulfillments for the order' doget :index, params: { order_id: order.prefixed_id }, as: :jsonexpect(response).to have_http_status(:ok)@@ -21,7 +21,7 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controenddescribe 'GET #show' do- it 'returns the shipment' do+ it 'returns the fulfillment' doget :show, params: { order_id: order.prefixed_id, id: shipment.prefixed_id }, as: :jsonexpect(response).to have_http_status(:ok)@@ -32,7 +32,7 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controenddescribe 'PATCH #update' do- it 'updates shipment tracking' do+ it 'updates fulfillment tracking' dopatch :update, params: {order_id: order.prefixed_id,id: shipment.prefixed_id,@@ -44,11 +44,11 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controendend- describe 'PATCH #ship' do- it 'marks the shipment as shipped' do+ describe 'PATCH #fulfill' do+ it 'marks the fulfillment as shipped' doshipment.ready! if shipment.can_ready?- patch :ship, params: {+ patch :fulfill, params: {order_id: order.prefixed_id,id: shipment.prefixed_id}, as: :json@@ -59,7 +59,7 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controenddescribe 'PATCH #cancel' do- it 'cancels the shipment' do+ it 'cancels the fulfillment' dopatch :cancel, params: {order_id: order.prefixed_id,id: shipment.prefixed_id@@ -71,7 +71,7 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controenddescribe 'PATCH #resume' do- it 'resumes a canceled shipment' do+ it 'resumes a canceled fulfillment' doshipment.cancel!patch :resume, params: {@@ -85,7 +85,7 @@ RSpec.describe Spree::Api::V3::Admin::Orders::ShipmentsController, type: :controenddescribe 'PATCH #split' do- it 'splits items to a new shipment at a different stock location' do+ it 'splits items to a new fulfillment at a different stock location' dovariant = shipment.inventory_units.first.varianttarget_stock_location = create(:stock_location, name: 'Warehouse 2')target_stock_location.stock_items.find_or_create_by(variant: variant).set_count_on_hand(10)diff --git a/spree/api/spec/integration/spree/api/v3/admin/orders/shipments_spec.rb b/spree/api/spec/integration/spree/api/v3/admin/orders/fulfillments_spec.rbsimilarity index 82%rename from spree/api/spec/integration/spree/api/v3/admin/orders/shipments_spec.rbrename to spree/api/spec/integration/spree/api/v3/admin/orders/fulfillments_spec.rbindex e03024b894..45c76ac6cf 100644--- a/spree/api/spec/integration/spree/api/v3/admin/orders/shipments_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/admin/orders/fulfillments_spec.rb@@ -2,18 +2,18 @@require 'swagger_helper'-RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reference/admin.yaml' do+RSpec.describe 'Admin Order Fulfillments API', type: :request, swagger_doc: 'api-reference/admin.yaml' doinclude_context 'API v3 Admin'let!(:order) { create(:order_ready_to_ship, store: store) }let!(:shipment) { order.shipments.first }let(:Authorization) { "Bearer #{admin_jwt_token}" }- path '/api/v3/admin/orders/{order_id}/shipments' do+ path '/api/v3/admin/orders/{order_id}/fulfillments' dolet(:order_id) { order.prefixed_id }- get 'List shipments' do- tags 'Shipments'+ get 'List fulfillments' do+ tags 'Fulfillments'produces 'application/json'security [api_key: [], bearer_auth: []]description 'Returns all shipments for an order.'@@ -24,7 +24,7 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'- response '200', 'shipments found' do+ response '200', 'fulfillments found' dolet(:'x-spree-api-key') { secret_api_key.plaintext_token }run_test! do |response|@@ -36,12 +36,12 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reendend- path '/api/v3/admin/orders/{order_id}/shipments/{id}' do+ path '/api/v3/admin/orders/{order_id}/fulfillments/{id}' dolet(:order_id) { order.prefixed_id }let(:id) { shipment.prefixed_id }get 'Show a shipment' do- tags 'Shipments'+ tags 'Fulfillments'produces 'application/json'security [api_key: [], bearer_auth: []]description 'Returns details of a specific shipment.'@@ -52,7 +52,7 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'parameter name: :id, in: :path, type: :string, required: true,- description: 'Shipment prefixed ID'+ description: 'Fulfillment prefixed ID'response '200', 'shipment found' dolet(:'x-spree-api-key') { secret_api_key.plaintext_token }@@ -66,7 +66,7 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reendpatch 'Update a shipment' do- tags 'Shipments'+ tags 'Fulfillments'consumes 'application/json'produces 'application/json'security [api_key: [], bearer_auth: []]@@ -78,7 +78,7 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'parameter name: :id, in: :path, type: :string, required: true,- description: 'Shipment prefixed ID'+ description: 'Fulfillment prefixed ID'parameter name: :body, in: :body, schema: {type: :object,properties: {@@ -99,12 +99,12 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reendend- path '/api/v3/admin/orders/{order_id}/shipments/{id}/ship' do- patch 'Ship a shipment' do- tags 'Shipments'+ path '/api/v3/admin/orders/{order_id}/fulfillments/{id}/fulfill' do+ patch 'Fulfill a fulfillment' do+ tags 'Fulfillments'produces 'application/json'security [api_key: [], bearer_auth: []]- description 'Marks a shipment as shipped.'+ description 'Marks a fulfillment as fulfilled.'parameter name: 'x-spree-api-key', in: :header, type: :string, required: trueparameter name: :Authorization, in: :header, type: :string, required: true,@@ -112,9 +112,9 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'parameter name: :id, in: :path, type: :string, required: true,- description: 'Shipment prefixed ID'+ description: 'Fulfillment prefixed ID'- response '200', 'shipment shipped' do+ response '200', 'fulfillment fulfilled' dolet(:'x-spree-api-key') { secret_api_key.plaintext_token }let(:order_id) { order.prefixed_id }let(:id) { shipment.prefixed_id }@@ -131,12 +131,12 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reendend- path '/api/v3/admin/orders/{order_id}/shipments/{id}/cancel' do- patch 'Cancel a shipment' do- tags 'Shipments'+ path '/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel' do+ patch 'Cancel a fulfillment' do+ tags 'Fulfillments'produces 'application/json'security [api_key: [], bearer_auth: []]- description 'Cancels a pending or ready shipment.'+ description 'Cancels a fulfillment.'parameter name: 'x-spree-api-key', in: :header, type: :string, required: trueparameter name: :Authorization, in: :header, type: :string, required: true,@@ -144,9 +144,9 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'parameter name: :id, in: :path, type: :string, required: true,- description: 'Shipment prefixed ID'+ description: 'Fulfillment prefixed ID'- response '200', 'shipment canceled' do+ response '200', 'fulfillment canceled' dolet(:'x-spree-api-key') { secret_api_key.plaintext_token }let(:order_id) { order.prefixed_id }let(:id) { shipment.prefixed_id }@@ -159,12 +159,12 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reendend- path '/api/v3/admin/orders/{order_id}/shipments/{id}/resume' do- patch 'Resume a shipment' do- tags 'Shipments'+ path '/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume' do+ patch 'Resume a fulfillment' do+ tags 'Fulfillments'produces 'application/json'security [api_key: [], bearer_auth: []]- description 'Resumes a canceled shipment.'+ description 'Resumes a canceled fulfillment.'parameter name: 'x-spree-api-key', in: :header, type: :string, required: trueparameter name: :Authorization, in: :header, type: :string, required: true,@@ -172,9 +172,9 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'parameter name: :id, in: :path, type: :string, required: true,- description: 'Shipment prefixed ID'+ description: 'Fulfillment prefixed ID'- response '200', 'shipment resumed' do+ response '200', 'fulfillment resumed' dolet(:'x-spree-api-key') { secret_api_key.plaintext_token }let(:order_id) { order.prefixed_id }let(:id) { shipment.prefixed_id }@@ -191,9 +191,9 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reendend- path '/api/v3/admin/orders/{order_id}/shipments/{id}/split' do- patch 'Split a shipment' do- tags 'Shipments'+ path '/api/v3/admin/orders/{order_id}/fulfillments/{id}/split' do+ patch 'Split a fulfillment' do+ tags 'Fulfillments'consumes 'application/json'produces 'application/json'security [api_key: [], bearer_auth: []]@@ -205,7 +205,7 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-reparameter name: :order_id, in: :path, type: :string, required: true,description: 'Order prefixed ID'parameter name: :id, in: :path, type: :string, required: true,- description: 'Shipment prefixed ID'+ description: 'Fulfillment prefixed ID'parameter name: :body, in: :body, schema: {type: :object,required: %w[variant_id quantity],@@ -216,7 +216,7 @@ RSpec.describe 'Admin Order Shipments API', type: :request, swagger_doc: 'api-re}}- response '200', 'shipment split' do+ response '200', 'fulfillment split' dolet(:'x-spree-api-key') { secret_api_key.plaintext_token }let(:order_id) { order.prefixed_id }let(:id) { shipment.prefixed_id }