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
Leave delivery confirmation to the operator
Damian Legawiecf6f88a5c6fb3
diff --git a/docs/api-reference/seller.yaml b/docs/api-reference/seller.yamlindex bf95e1c179..203ddbb6b4 100644--- a/docs/api-reference/seller.yaml+++ b/docs/api-reference/seller.yaml@@ -304,7 +304,7 @@ paths:avatar_url:sellers:- id: sel_UkLWZg9DAJ- name: Seller 35+ name: Seller 43status: approvedschema:"$ref": "#/components/schemas/AuthResponse"@@ -420,7 +420,7 @@ paths:avatar_url:sellers:- id: sel_UkLWZg9DAJ- name: Seller 56+ name: Seller 64status: approvedschema:"$ref": "#/components/schemas/AuthResponse"@@ -489,8 +489,8 @@ paths:avatar_url:sellers:- id: sel_UkLWZg9DAJ- name: Seller 44- slug: seller-44+ name: Seller 52+ slug: seller-52status: approvedpermissions:- allow: true@@ -12293,6 +12293,541 @@ paths:required:- data- meta+ "/api/v3/seller/delivery_methods":+ get:+ summary: List delivery methods+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ description: |+ How this seller's goods can ship: the methods they created themselves,+ plus any the marketplace shares with its sellers.++ A shared marketplace method comes back with `editable: false` — it is+ listed so the seller can see what already ships their goods, and every+ write against it is a 404.+ parameters:+ - name: X-Spree-Seller-Id+ in: header+ required: true+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Records per page (max 100)+ schema:+ type: integer+ responses:+ '200':+ description: delivery methods listed+ content:+ application/json:+ example:+ data:+ - id: dm_UkLWZg9DAJ+ name: My courier+ code: UPS_GROUND+ estimated_transit_business_days_min:+ estimated_transit_business_days_max:+ digital: false+ pickup: false+ pickup_point: false+ admin_name:+ storefront_visible: true+ tracking_url:+ created_at: '2026-01-15T12:00:00.000Z'+ updated_at: '2026-01-15T12:00:00.000Z'+ rules: []+ editable: true+ delivery_profile_id: fp_UkLWZg9DAJ+ delivery_zone_id:+ calculator_type: Spree::Calculator::Shipping::FlatRate+ calculator_preferences:+ amounts: {}+ amount: '10.0'+ currency: USD+ - id: dm_gbHJdmfrXB+ name: Marketplace post+ code: UPS_GROUND+ estimated_transit_business_days_min:+ estimated_transit_business_days_max:+ digital: false+ pickup: false+ pickup_point: false+ admin_name:+ storefront_visible: true+ tracking_url:+ created_at: '2026-01-15T12:00:00.000Z'+ updated_at: '2026-01-15T12:00:00.000Z'+ rules: []+ editable: false+ delivery_profile_id: fp_UkLWZg9DAJ+ delivery_zone_id:+ calculator_type: Spree::Calculator::Shipping::FlatRate+ calculator_preferences:+ amounts: {}+ amount: '10.0'+ currency: USD+ meta:+ page: 1+ limit: 25+ count: 2+ pages: 1+ from: 1+ to: 2+ in: 2+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/DeliveryMethod"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ post:+ summary: Create a delivery method+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ description: |+ Adds a way for this seller to ship. The method is always the seller's+ own, whatever the payload says.++ Neither the rate provider nor the fulfillment provider is settable: a+ seller prices their own rates and enters tracking numbers by hand,+ because carrier accounts belong to the marketplace.+ parameters:+ - name: X-Spree-Seller-Id+ in: header+ required: true+ schema:+ type: string+ responses:+ '201':+ description: delivery method created+ content:+ application/json:+ example:+ id: dm_EfhxLZ9ck8+ name: Next day+ code:+ estimated_transit_business_days_min:+ estimated_transit_business_days_max:+ digital: false+ pickup: false+ pickup_point: false+ admin_name:+ storefront_visible: true+ tracking_url:+ created_at: '2026-01-15T12:00:00.000Z'+ updated_at: '2026-01-15T12:00:00.000Z'+ rules: []+ editable: true+ delivery_profile_id: fp_gbHJdmfrXB+ delivery_zone_id:+ calculator_type: Spree::Calculator::Shipping::FlatRate+ calculator_preferences:+ amounts: {}+ amount: '9.99'+ currency: USD+ schema:+ "$ref": "#/components/schemas/DeliveryMethod"+ '422':+ description: invalid request+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ admin_name:+ type: string+ nullable: true+ code:+ type: string+ nullable: true+ delivery_profile_id:+ type: string+ description: One of the marketplace's delivery profiles+ delivery_zone_id:+ type: string+ nullable: true+ description: Narrows where the method ships+ storefront_visible:+ type: boolean+ tracking_url:+ type: string+ nullable: true+ estimated_transit_business_days_min:+ type: integer+ nullable: true+ estimated_transit_business_days_max:+ type: integer+ nullable: true+ calculator_type:+ type: string+ calculator_preferences:+ type: object+ rules:+ type: array+ description: Conditions on the method, from `/delivery_methods/rule_types`+ items:+ type: object+ properties:+ type:+ type: string+ preferences:+ type: object+ required:+ - name+ "/api/v3/seller/delivery_methods/{id}":+ parameters:+ - name: id+ in: path+ description: Delivery method ID+ required: true+ schema:+ type: string+ - name: X-Spree-Seller-Id+ in: header+ required: true+ schema:+ type: string+ get:+ summary: Retrieve a delivery method+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ responses:+ '200':+ description: delivery method found+ content:+ application/json:+ example:+ id: dm_UkLWZg9DAJ+ name: My courier+ code: UPS_GROUND+ estimated_transit_business_days_min:+ estimated_transit_business_days_max:+ digital: false+ pickup: false+ pickup_point: false+ admin_name:+ storefront_visible: true+ tracking_url:+ created_at: '2026-01-15T12:00:00.000Z'+ updated_at: '2026-01-15T12:00:00.000Z'+ rules: []+ editable: true+ delivery_profile_id: fp_UkLWZg9DAJ+ delivery_zone_id:+ calculator_type: Spree::Calculator::Shipping::FlatRate+ calculator_preferences:+ amounts: {}+ amount: '10.0'+ currency: USD+ schema:+ "$ref": "#/components/schemas/DeliveryMethod"+ patch:+ summary: Update a delivery method+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ description: Only the seller's own methods can be changed — a marketplace method+ shared with sellers is read-only.+ parameters: []+ responses:+ '200':+ description: delivery method updated+ content:+ application/json:+ example:+ id: dm_UkLWZg9DAJ+ name: My express courier+ code: UPS_GROUND+ estimated_transit_business_days_min:+ estimated_transit_business_days_max:+ digital: false+ pickup: false+ pickup_point: false+ admin_name:+ storefront_visible: true+ tracking_url:+ created_at: '2026-01-15T12:00:00.000Z'+ updated_at: '2026-01-15T12:00:00.000Z'+ rules: []+ editable: true+ delivery_profile_id: fp_UkLWZg9DAJ+ delivery_zone_id:+ calculator_type: Spree::Calculator::Shipping::FlatRate+ calculator_preferences:+ amounts: {}+ amount: '10.0'+ currency: USD+ schema:+ "$ref": "#/components/schemas/DeliveryMethod"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ admin_name:+ type: string+ nullable: true+ code:+ type: string+ nullable: true+ delivery_profile_id:+ type: string+ description: One of the marketplace's delivery profiles+ delivery_zone_id:+ type: string+ nullable: true+ description: Narrows where the method ships+ storefront_visible:+ type: boolean+ tracking_url:+ type: string+ nullable: true+ estimated_transit_business_days_min:+ type: integer+ nullable: true+ estimated_transit_business_days_max:+ type: integer+ nullable: true+ calculator_type:+ type: string+ calculator_preferences:+ type: object+ rules:+ type: array+ description: Replaces the whole set — a rule dropped here is deleted,+ so re-send surviving rules with their `id`.+ items:+ type: object+ properties:+ id:+ type: string+ type:+ type: string+ preferences:+ type: object+ delete:+ summary: Retire a delivery method+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ responses:+ '204':+ description: delivery method retired+ "/api/v3/seller/delivery_methods/rule_types":+ get:+ summary: List the conditions a method can carry+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ description: The eligibility rules a seller may put on their own method, with+ the preference schema each form is rendered from.+ parameters:+ - name: X-Spree-Seller-Id+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: rule types listed+ content:+ application/json:+ example:+ data:+ - type: item_total_rule+ name: Item total+ description: Limits the delivery method to carts within an item+ total range+ preference_schema:+ - key: minimum_amount+ type: decimal+ default:+ - key: maximum_amount+ type: decimal+ default:+ - type: weight_rule+ name: Weight+ description: Limits the delivery method to packages within a weight+ range+ preference_schema:+ - key: minimum_weight+ type: decimal+ default:+ - key: maximum_weight+ type: decimal+ default:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ type: object+ properties:+ type:+ type: string+ name:+ type: string+ description:+ type: string+ preference_schema:+ type: array+ items:+ type: object+ required:+ - data+ "/api/v3/seller/delivery_methods/calculators":+ get:+ summary: List the ways a method can be priced+ tags:+ - Delivery Methods+ security:+ - bearer_auth: []+ parameters:+ - name: X-Spree-Seller-Id+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: calculators listed+ content:+ application/json:+ example:+ data:+ - type: Spree::Calculator::Shipping::FlatPercentItemTotal+ name: Flat Percent+ preference_schema:+ - key: flat_percent+ type: decimal+ default: 0+ - type: Spree::Calculator::Shipping::FlatRate+ name: Flat rate+ preference_schema:+ - key: amounts+ type: hash+ default: {}+ - key: amount+ type: decimal+ default: 0+ - key: currency+ type: string+ default: USD+ - type: Spree::Calculator::Shipping::FlexiRate+ name: Flexible Rate per package item+ preference_schema:+ - key: first_item+ type: decimal+ default: 0.0+ - key: additional_item+ type: decimal+ default: 0.0+ - key: max_items+ type: integer+ default: 0+ - key: currency+ type: string+ default: USD+ - type: Spree::Calculator::Shipping::PerItem+ name: Flat rate per package item+ preference_schema:+ - key: amounts+ type: hash+ default: {}+ - key: amount+ type: decimal+ default: 0+ - key: currency+ type: string+ default: USD+ - type: Spree::Calculator::Shipping::PriceSack+ name: Price sack+ preference_schema:+ - key: minimal_amount+ type: decimal+ default: 0+ - key: normal_amount+ type: decimal+ default: 0+ - key: currency+ type: string+ default: USD+ - key: discount_amount+ type: decimal+ default: 0+ - type: Spree::Calculator::Shipping::DigitalDelivery+ name: Digital Delivery+ preference_schema:+ - key: amounts+ type: hash+ default: {}+ - key: amount+ type: decimal+ default: 0+ - key: currency+ type: string+ default: USD+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ type: object+ properties:+ type:+ type: string+ name:+ type: string+ preference_schema:+ type: array+ items:+ type: object+ required:+ - data"/api/v3/seller/delivery_profiles":get:summary: List delivery profiles@@ -12336,9 +12871,11 @@ paths:- id: fp_UkLWZg9DAJname: Generaldefault: true+ digital: false- id: fp_gbHJdmfrXBname: Oversizeddefault: false+ digital: falsemeta:page: 1limit: 25@@ -12361,6 +12898,78 @@ paths:required:- data- meta+ "/api/v3/seller/delivery_zones":+ get:+ summary: List delivery zones+ tags:+ - Delivery Zones+ security:+ - bearer_auth: []+ description: |+ The marketplace's delivery zones — where its methods may ship to.++ Read only: a seller narrows their own method to one of these and never+ draws one. Pass `delivery_profile_id` to list only the zones under the+ profile a method belongs to, which is what the method form's picker+ asks for.+ parameters:+ - name: X-Spree-Seller-Id+ in: header+ required: true+ schema:+ type: string+ - name: delivery_profile_id+ in: query+ required: false+ description: Only zones under this delivery profile+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Records per page (max 100)+ schema:+ type: integer+ responses:+ '200':+ description: delivery zones listed+ content:+ application/json:+ example:+ data:+ - id: dz_UkLWZg9DAJ+ name: Domestic+ description: Maxime illum debitis veritatis porro accusantium laudantium+ omnis.+ delivery_profile_id: fp_gbHJdmfrXB+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/DeliveryZone"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta"/api/v3/seller/onboarding":get:summary: Get onboarding checklist@@ -12931,8 +13540,8 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 1593250- slug: product-1593250+ name: Product 1583250+ slug: product-1583250meta_title:meta_description:meta_keywords:@@ -13175,8 +13784,8 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 1626710- slug: product-1626710+ name: Product 1616710+ slug: product-1616710meta_title:meta_description:meta_keywords:@@ -13255,7 +13864,7 @@ paths:example:id: prod_UkLWZg9DAJname: Hand-thrown mug, large- slug: product-1658212+ slug: product-1648212meta_title:meta_description:meta_keywords:@@ -13368,8 +13977,8 @@ paths:application/json:example:id: sel_UkLWZg9DAJ- name: Seller 73- slug: seller-73+ name: Seller 81+ slug: seller-81about: ''about_html: ''logo_url:@@ -13441,7 +14050,7 @@ paths:example:id: sel_UkLWZg9DAJname: Acme Supplies- slug: seller-75+ slug: seller-83about: ''about_html: ''logo_url:@@ -14184,10 +14793,10 @@ paths:application/json:example:direct_upload:- url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJuem5oOGdra3VxendvbDc1ODBxNHNwZmpmMjVxIiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vcGRmIiwiY29udGVudF9sZW5ndGgiOjUxMjM0LCJjaGVja3N1bSI6IlZqaHowNGxRdUVHdXY0bkR2aHNhTlE9PSIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl90b2tlbiJ9fQ==--b056044b1ff1b40c20f91b97529aa76b19bb3a28+ url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJuem5oOGdra3VxendvbDc1ODBxNHNwZmpmMjVxIiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vcGRmIiwiY29udGVudF9sZW5ndGgiOjUxMjM0LCJjaGVja3N1bSI6IlZqaHowNGxRdUVHdXY0bkR2aHNhTlE9PSIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl90b2tlbiJ9fQ==--646a62035fe9802198cc67c2a36c19e463e623d9headers:Content-Type: application/pdf- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--9cb3e17a08ef383d43853a0decd2b0dc4780fff2+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--05abc4a54ff4795f9255952c049b07263b96fc22schema:"$ref": "#/components/schemas/DirectUploadResponse"requestBody:@@ -15224,74 +15833,6 @@ paths:options_text: ''schema:"$ref": "#/components/schemas/Fulfillment"- "/api/v3/seller/orders/{order_id}/fulfillments/{id}/mark_delivered":- parameters:- - name: order_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- patch:- summary: Confirm delivery- tags:- - Fulfillments- security:- - bearer_auth: []- description: |- Confirms the customer received the goods — the point the returns- window runs from, and recordable by hand for a seller posting parcels- without a carrier integration.- parameters:- - name: X-Spree-Seller-Id- in: header- required: true- schema:- type: string- responses:- '200':- description: delivery confirmed- content:- application/json:- example:- id: ful_UkLWZg9DAJ- number: R1001-F1- status: delivered- tracking: U10000- tracking_url:- tracking_carrier:- tracking_status:- fulfilled_at: '2026-01-15T12:00:00.000Z'- created_at: '2026-01-15T12:00:00.000Z'- updated_at: '2026-01-15T12:00:00.000Z'- fulfillment_type: shipping- delivery_method_name: UPS Ground- stock_location_name: Jamila Cremin- fulfillment_items:- - id: fi_UkLWZg9DAJ- quantity: 1- line_item_id: li_UkLWZg9DAJ- variant_id: variant_UkLWZg9DAJ- name: Product 1524588- sku: SKU-194- options_text: ''- schema:- "$ref": "#/components/schemas/Fulfillment"- requestBody:- content:- application/json:- schema:- type: object- properties:- delivered_at:- type: string- nullable: true- notify_customer:- type: boolean"/api/v3/seller/tracking_carriers":get:summary: List tracking carriers@@ -15431,7 +15972,7 @@ paths:display_total: "$110.00"items:- id: li_UkLWZg9DAJ- name: Product 15495+ name: Product 15395options_text: ''quantity: 1currency: USD@@ -15440,7 +15981,7 @@ paths:total: '10.0'display_total: "$10.00"variant_id: variant_UkLWZg9DAJ- sku: SKU-196+ sku: SKU-195thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -15461,8 +16002,8 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 15495- sku: SKU-196+ name: Product 15395+ sku: SKU-195options_text: ''shipping_address:id: addr_gbHJdmfrXB@@ -15470,7 +16011,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 143 Lovely Street+ address1: 141 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -15492,7 +16033,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 142 Lovely Street+ address1: 140 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -15581,7 +16122,7 @@ paths:display_total: "$110.00"items:- id: li_UkLWZg9DAJ- name: Product 1559755+ name: Product 1549755options_text: ''quantity: 1currency: USD@@ -15590,7 +16131,7 @@ paths:total: '10.0'display_total: "$10.00"variant_id: variant_UkLWZg9DAJ- sku: SKU-197+ sku: SKU-196thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -15611,8 +16152,8 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 1559755- sku: SKU-197+ name: Product 1549755+ sku: SKU-196options_text: ''shipping_address:id: addr_gbHJdmfrXB@@ -15620,7 +16161,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 145 Lovely Street+ address1: 143 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -15642,7 +16183,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 144 Lovely Street+ address1: 142 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -15720,7 +16261,7 @@ paths:display_total: "$110.00"items:- id: li_UkLWZg9DAJ- name: Product 1586554+ name: Product 1576554options_text: ''quantity: 1currency: USD@@ -15729,7 +16270,7 @@ paths:total: '10.0'display_total: "$10.00"variant_id: variant_UkLWZg9DAJ- sku: SKU-200+ sku: SKU-199thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -15750,8 +16291,8 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 1586554- sku: SKU-200+ name: Product 1576554+ sku: SKU-199options_text: ''shipping_address:id: addr_gbHJdmfrXB@@ -15759,7 +16300,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 151 Lovely Street+ address1: 149 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -15781,7 +16322,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 150 Lovely Street+ address1: 148 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -15926,7 +16467,7 @@ paths:example:error:code: processing_error- message: Only 1 of Product 1697120 can be returned+ message: Only 1 of Product 1687120 can be returnedrequestBody:content:application/json:@@ -16458,9 +16999,15 @@ tags:do- name: Countriesdescription: Country and state reference data for the panel's address forms+- name: Delivery Methods+ description: The seller's own ways to ship, and the marketplace methods shared with+ them- name: Delivery Profilesdescription: The marketplace's delivery vocabulary — what kind of goods a productis, which decides how it ships+- name: Delivery Zones+ description: The marketplace's destinations, for narrowing where a seller's own+ method ships- name: Onboardingdescription: The marketplace checklist a seller completes before admission, andwhat they submit against it@@ -17390,6 +17937,105 @@ components:- canceled_at- memox-typelizer: true+ DeliveryMethodRule:+ type: object+ properties:+ id:+ type: string+ active:+ type: boolean+ type:+ type: string+ name:+ type: string+ description:+ type: string+ preferences:+ type: object+ preference_schema:+ type: object+ required:+ - id+ - active+ - type+ - name+ - description+ - preferences+ - preference_schema+ x-typelizer: true+ DeliveryMethod:+ type: object+ properties:+ id:+ type: string+ name:+ type: string+ code:+ type: string+ nullable: true+ estimated_transit_business_days_min:+ type: number+ nullable: true+ estimated_transit_business_days_max:+ type: number+ nullable: true+ digital:+ type: boolean+ pickup:+ type: boolean+ pickup_point:+ type: boolean+ admin_name:+ type: string+ nullable: true+ storefront_visible:+ type: boolean+ tracking_url:+ type: string+ nullable: true+ created_at:+ type: string+ updated_at:+ type: string+ rules:+ type: array+ items:+ "$ref": "#/components/schemas/DeliveryMethodRule"+ editable:+ type: boolean+ delivery_profile_id:+ type: string+ nullable: true+ delivery_zone_id:+ type: string+ nullable: true+ calculator_type:+ type: string+ nullable: true+ calculator_preferences:+ type: object+ nullable: true+ required:+ - id+ - name+ - code+ - estimated_transit_business_days_min+ - estimated_transit_business_days_max+ - digital+ - pickup+ - pickup_point+ - admin_name+ - storefront_visible+ - tracking_url+ - created_at+ - updated_at+ - rules+ - editable+ - delivery_profile_id+ - delivery_zone_id+ - calculator_type+ - calculator_preferences+ x-typelizer: trueDeliveryProfile:type: objectproperties:@@ -17399,10 +18045,31 @@ components:type: stringdefault:type: boolean+ digital:+ type: booleanrequired:- id- name- default+ - digital+ x-typelizer: true+ DeliveryZone:+ type: object+ properties:+ id:+ type: string+ name:+ type: string+ description:+ type: string+ nullable: true+ delivery_profile_id:+ type: string+ required:+ - id+ - name+ - description+ - delivery_profile_idx-typelizer: trueExchangeLineItem:type: objectdiff --git a/packages/seller-dashboard/src/components/orders/fulfillments-card.tsx b/packages/seller-dashboard/src/components/orders/fulfillments-card.tsxindex a8190daa7e..6e0492f3e3 100644--- a/packages/seller-dashboard/src/components/orders/fulfillments-card.tsx+++ b/packages/seller-dashboard/src/components/orders/fulfillments-card.tsx@@ -27,7 +27,6 @@ import { FulfillmentTrackingDialog } from './fulfillment-tracking-dialog'// these off "not unfulfilled" once badged a canceled parcel as a success.const CAN_SHIP = ['unfulfilled']const CAN_CANCEL = ['unfulfilled']-const CAN_MARK_DELIVERED = ['fulfilled']/** Every parcel owed on this order, and what the seller can do with each. */export function FulfillmentsCard({ order }: { order: Order }) {@@ -67,7 +66,7 @@ export function FulfillmentsCard({ order }: { order: Order }) {function FulfillmentRow({ orderId, fulfillment }: { orderId: string; fulfillment: Fulfillment }) {const { t } = useTranslation()const confirm = useConfirm()- const { cancel, resume, markDelivered } = useFulfillmentActions(orderId)+ const { cancel, resume } = useFulfillmentActions(orderId)const [shipping, setShipping] = useState(false)const [trackingOpen, setTrackingOpen] = useState(false)@@ -76,7 +75,6 @@ function FulfillmentRow({ orderId, fulfillment }: { orderId: string; fulfillmentconst status = fulfillment.status ?? ''const shippable = CAN_SHIP.includes(status)const cancelable = CAN_CANCEL.includes(status)- const deliverable = CAN_MARK_DELIVERED.includes(status)const splittable = shippable && (fulfillment.fulfillment_items?.length ?? 0) > 0async function handleCancel() {@@ -118,14 +116,6 @@ function FulfillmentRow({ orderId, fulfillment }: { orderId: string; fulfillment{t('orders.fulfillments.split')}</DropdownMenuItem>)}- {deliverable && (- <DropdownMenuItem- disabled={markDelivered.isPending}- onClick={() => markDelivered.mutate(fulfillment.id)}- >- {t('orders.fulfillments.mark_delivered')}- </DropdownMenuItem>- )}{status === 'canceled' && (<DropdownMenuItemdisabled={resume.isPending}diff --git a/packages/seller-dashboard/src/hooks/use-fulfillments.ts b/packages/seller-dashboard/src/hooks/use-fulfillments.tsindex bb415f7c33..d6dfc02a78 100644--- a/packages/seller-dashboard/src/hooks/use-fulfillments.ts+++ b/packages/seller-dashboard/src/hooks/use-fulfillments.ts@@ -64,10 +64,6 @@ export function useFulfillmentActions(orderId: string) {sellerClient().orders.fulfillments.resume(orderId, fulfillmentId),)- const markDelivered = useFulfillmentMutation((fulfillmentId: string) =>- sellerClient().orders.fulfillments.markDelivered(orderId, fulfillmentId),- )-const split = useFulfillmentMutation(({fulfillmentId,@@ -80,5 +76,5 @@ export function useFulfillmentActions(orderId: string) {}) => sellerClient().orders.fulfillments.split(orderId, fulfillmentId, params),)- return { fulfill, update, cancel, resume, markDelivered, split }+ return { fulfill, update, cancel, resume, split }}diff --git a/packages/seller-dashboard/src/locales/en.json b/packages/seller-dashboard/src/locales/en.jsonindex 3f22ab5775..ebba8797db 100644--- a/packages/seller-dashboard/src/locales/en.json+++ b/packages/seller-dashboard/src/locales/en.json@@ -301,7 +301,6 @@"units_selected": "{{selected}} of {{total}} units selected","partial_warning": "Sending part of this parcel moves the rest onto a new one.","quantity_for": "Quantity for {{name}}",- "mark_delivered": "Mark as delivered","resume": "Resume","cancel": "Cancel parcel","cancel_title": "Cancel this parcel?",diff --git a/spree/api/app/controllers/spree/api/v3/seller/orders/fulfillments_controller.rb b/spree/api/app/controllers/spree/api/v3/seller/orders/fulfillments_controller.rbindex 4943a3de34..fc8e0f55d4 100644--- a/spree/api/app/controllers/spree/api/v3/seller/orders/fulfillments_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/seller/orders/fulfillments_controller.rb@@ -20,7 +20,7 @@ module Spreebefore_action :set_orderbefore_action :set_fulfillment,- only: [:show, :update, :fulfill, :cancel, :resume, :split, :mark_delivered]+ only: [:show, :update, :fulfill, :cancel, :resume, :split]def index# This action builds its own collection rather than going through@@ -87,23 +87,6 @@ module Spreerun_workflow(Spree.fulfillment_resume_workflow)end- # PATCH /api/v3/seller/orders/:order_id/fulfillments/:id/mark_delivered- #- # Confirms the customer received the goods — the anchor the- # returns window runs from, and recordable by hand for a seller- # posting parcels without a carrier integration.- def mark_delivered- with_order_lock do- result = Spree.fulfillment_mark_delivered_workflow.call(- fulfillment: @fulfillment,- delivered_at: params[:delivered_at],- notify_customer: notify_customer?(params[:notify_customer])- )-- render_workflow_result(result)- end- end-# PATCH /api/v3/seller/orders/:order_id/fulfillments/:id/split## Moves part of what this parcel holds onto one of its own, for@@ -141,7 +124,7 @@ module Spreeauthorize! :show, @orderend- WRITE_ACTIONS = %w[update fulfill cancel resume split mark_delivered].freeze+ WRITE_ACTIONS = %w[update fulfill cancel resume split].freezedef set_fulfillment@fulfillment = @order.fulfillments.find_by_prefix_id!(params[:id])diff --git a/spree/api/config/routes.rb b/spree/api/config/routes.rbindex b91b2ca8b8..72edba13d3 100644--- a/spree/api/config/routes.rb+++ b/spree/api/config/routes.rb@@ -863,13 +863,15 @@ Spree::Core::Engine.add_routes dopatch :cancelend+ # No `mark_delivered`: that a parcel arrived is the buyer's word,+ # not the sender's, so confirming receipt stays with the operator+ # and the carrier feed.resources :fulfillments, only: [:index, :show, :update], controller: 'orders/fulfillments' domember dopatch :fulfillpatch :cancelpatch :resumepatch :split- patch :mark_deliveredendenddiff --git a/spree/api/spec/controllers/spree/api/v3/seller/orders/fulfillments_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/seller/orders/fulfillments_controller_spec.rbindex 0ed61e441d..3e8b4a7af1 100644--- a/spree/api/spec/controllers/spree/api/v3/seller/orders/fulfillments_controller_spec.rb+++ b/spree/api/spec/controllers/spree/api/v3/seller/orders/fulfillments_controller_spec.rb@@ -151,14 +151,13 @@ RSpec.describe Spree::Api::V3::Seller::Orders::FulfillmentsController, type: :coendend- describe 'PATCH #mark_delivered' do- it 'confirms the customer received the goods' do- Spree.fulfillment_fulfill_workflow.call(fulfillment: fulfillment)-- patch :mark_delivered, params: { order_id: order.prefixed_id, id: fulfillment.prefixed_id }, as: :json-- expect(response).to have_http_status(:ok)- expect(fulfillment.reload).to be_delivered+ # Confirming receipt is deliberately not on this branch: a parcel having+ # arrived is the buyer's word, not the sender's.+ describe 'marking delivered' do+ it 'has no route' do+ expect {+ patch :mark_delivered, params: { order_id: order.prefixed_id, id: fulfillment.prefixed_id }, as: :json+ }.to raise_error(ActionController::UrlGenerationError)endenddiff --git a/spree/api/spec/integration/spree/api/v3/seller/fulfillments_spec.rb b/spree/api/spec/integration/spree/api/v3/seller/fulfillments_spec.rbindex f5c4a79202..faf607237b 100644--- a/spree/api/spec/integration/spree/api/v3/seller/fulfillments_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/seller/fulfillments_spec.rb@@ -181,48 +181,6 @@ RSpec.describe 'Seller Fulfillments API', type: :request, swagger_doc: 'api-refeendend- path '/api/v3/seller/orders/{order_id}/fulfillments/{id}/mark_delivered' do- parameter name: :order_id, in: :path, type: :string- parameter name: :id, in: :path, type: :string-- patch 'Confirm delivery' do- tags 'Fulfillments'- consumes 'application/json'- produces 'application/json'- security [bearer_auth: []]- description <<~DESC- Confirms the customer received the goods — the point the returns- window runs from, and recordable by hand for a seller posting parcels- without a carrier integration.- DESC-- parameter name: 'X-Spree-Seller-Id', in: :header, type: :string, required: true- parameter name: :body, in: :body, required: false, schema: {- type: :object,- properties: {- delivered_at: { type: :string, nullable: true },- notify_customer: { type: :boolean }- }- }-- response '200', 'delivery confirmed' do- let(:Authorization) { "Bearer #{seller_jwt_token}" }- let(:'X-Spree-Seller-Id') { seller.prefixed_id }- let(:order_id) { order.prefixed_id }- let(:id) { fulfillment.prefixed_id }- let(:body) { {} }-- before { Spree.fulfillment_fulfill_workflow.call(fulfillment: fulfillment) }-- schema '$ref' => '#/components/schemas/Fulfillment'-- run_test! do- expect(fulfillment.reload).to be_delivered- end- end- end- end-path '/api/v3/seller/tracking_carriers' doget 'List tracking carriers' dotags 'Fulfillments'