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 `name` to `label` in `CustomField` to match `OptionType` and `… (#13886)
Damian Legawiec12b79127fa89
diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yamlindex fe53d5c933..4d0a99b79b 100644--- a/docs/api-reference/store.yaml+++ b/docs/api-reference/store.yaml@@ -590,13 +590,13 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImQ1ODdlZTkwLTI1ZmMtNGEwZS1iZTE1LTgwZWQ5YjIzY2QzNSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1MjI4MjQyfQ.RrrhQcnl1hXg9C0hpKP8bxkv2mFu8VzI6T3F-UJc37E- refresh_token: mhGwsiuyRkEXokcJqbwMHRAJ+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjBmZWUzZGU1LTQ2NjMtNDhkYS05YjljLWEwNDMyNzhkNmViOSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1ODkxfQ.ECWom--FFBtI-gI7S_h0nfkyOEsRdQJ6GebmNbhlg4s+ refresh_token: 9q3QbTUDgwwxv11f9JrhtwGVuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Maryanna- last_name: Ondricka+ first_name: Harry+ last_name: Greenholtphone:accepts_email_marketing: falseavailable_store_credit_total: '0'@@ -671,13 +671,13 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImU0MjhjMDFiLTZhZTktNDgyNC1hMGQwLTQ4ZGRjMGZlYmRkYyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1MjI4MjQzfQ.q0iONqdKdoFN3BpqAqOTUMGKFNfG8aUOoOyf4jarDsg- refresh_token: zrzXiKToLCx1UJRSJHSphJjs+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjJmMTExN2U1LTY1YTQtNGZhMy04ZmJjLWVlY2E5ODM0NWM0MyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1ODkyfQ.5022SB2pG7NOz7yQi0Bs80KBEDRzmB1t9fM_HMS4I8c+ refresh_token: 5mvs59ePq49Lx5onjiSM7Duduser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Les- last_name: Bayer+ first_name: Irene+ last_name: Willmsphone:accepts_email_marketing: falseavailable_store_credit_total: '0'@@ -843,9 +843,9 @@ paths:data:- id: cart_gbHJdmfrXBmarket_id:- number: R472049681- token: B9MroqXEoXMVHZAQriZQTtBf8EoXQv1fEPG- email: [email protected]+ number: R596620236+ token: PGFmFM4qsZgsSRirmpcM1GMwdPwqEh8Nwc1+ email: [email protected]customer_note:currency: USDlocale: en@@ -887,8 +887,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 28450- slug: product-28450+ name: Product 25188+ slug: product-25188options_text: ''price: '10.0'display_price: "$10.00"@@ -913,7 +913,7 @@ paths:digital_links: []fulfillments:- id: ful_gbHJdmfrXB- number: H83467084851+ number: H26187165140tracking: U10000tracking_url:cost: '100.0'@@ -932,7 +932,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_32- name: Christal Block+ name: Gil Zemlakaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -994,9 +994,9 @@ paths:market:- id: cart_UkLWZg9DAJmarket_id:- number: R039406246- token: 8YriNGGGj5PsSwqkjJvM3K3gWXQ3sbWsYsE- email: [email protected]+ number: R561616820+ token: hhLTYkZ8y8MjpYnPDMBuhb9m9GT6Bxv7aJf+ email: [email protected]customer_note:currency: USDlocale: en@@ -1038,8 +1038,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 15580- slug: product-15580+ name: Product 13083+ slug: product-13083options_text: ''price: '10.0'display_price: "$10.00"@@ -1064,7 +1064,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H97722711103+ number: H87312383176tracking: U10000tracking_url:cost: '100.0'@@ -1083,7 +1083,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_32- name: Christal Block+ name: Gil Zemlakaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1218,8 +1218,8 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R844387022- token: GHSDgSdShMBQyaDw6h9isjSU7iGfYLET3EU+ number: R708931985+ token: 9SVHWZNBByB1yz3SAmwNtHTf7LVGUQjFSAvemail:customer_note:currency: USD@@ -1374,9 +1374,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R181268690- token: JkpJPKz5WKAk5FdnTfdmmRboMQASEUfdUVz- email: [email protected]+ number: R034461921+ token: 6k5KMEv2v8WQFZ8FxLyxSWdi68dX9jhiE7A+ email: [email protected]customer_note:currency: USDlocale: en@@ -1403,7 +1403,7 @@ paths:display_delivery_total: "$0.00"warnings:- code: line_item_removed- message: Product 67315 was removed because it was sold out+ message: Product 6491 was removed because it was sold outline_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJstore_credit_total: '0.0'@@ -1545,9 +1545,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R775579495- token: LESZyLA8C16AKEkrBEHhcMUPBKHKJdzvnGw- email: [email protected]+ number: R142893616+ token: WiGCZ3S7fmL8DdrA2QtzAvbt5JUxvgaxeLF+ email: [email protected]customer_note: Leave at doorcurrency: USDlocale: en@@ -1591,8 +1591,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 77268- slug: product-77268+ name: Product 76976+ slug: product-76976options_text: ''price: '19.99'display_price: "$19.99"@@ -1617,7 +1617,7 @@ paths:digital_links: []fulfillments:- id: ful_gbHJdmfrXB- number: H72160706994+ number: H54886803313tracking:tracking_url:cost: '10.0'@@ -1636,7 +1636,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_46- name: Chantell Paucek+ name: Eilene Klingaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -1865,9 +1865,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R606576238- token: 2vFwo1uvenSAzfcEWFgAdBCu581piDMBuHA- email: [email protected]+ number: R826345620+ token: Rh1ve6yZQZ4Q2hvtSYQwovBcPnSZ2nmTsfk+ email: [email protected]customer_note:currency: USDlocale: en@@ -1909,8 +1909,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 92021- slug: product-92021+ name: Product 98824+ slug: product-98824options_text: ''price: '10.0'display_price: "$10.00"@@ -1935,7 +1935,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H79447123612+ number: H93835612610tracking: U10000tracking_url:cost: '100.0'@@ -1954,7 +1954,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_54- name: Coreen Collier+ name: Shantae Gutkowskiaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2080,8 +2080,8 @@ paths:example:id: or_UkLWZg9DAJmarket_id:- number: R817214361- email: [email protected]+ number: R589411551+ email: [email protected]customer_note:currency: USDlocale: en@@ -2108,7 +2108,7 @@ paths:display_delivery_total: "$10.00"fulfillment_status: backorderpayment_status: paid- completed_at: '2026-04-03T13:57:29.860Z'+ completed_at: '2026-04-08T09:58:19.030Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -2118,8 +2118,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 117480- slug: product-117480+ name: Product 113208+ slug: product-113208options_text: ''price: '19.99'display_price: "$19.99"@@ -2144,7 +2144,7 @@ paths:digital_links: []fulfillments:- id: ful_gbHJdmfrXB- number: H16849070580+ number: H41312839821tracking:tracking_url:cost: '10.0'@@ -2163,7 +2163,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_60- name: Toney Boehm+ name: Basilia Bechtelaraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -2185,7 +2185,7 @@ paths:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJresponse_code: '12345'- number: PPFMW97Y+ number: PGE585F6amount: '29.99'display_amount: "$29.99"status: completed@@ -3040,13 +3040,13 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjYyYzhkOTcyLTI2OTEtNDBiMC1iYjUzLTRlNDVmYjFmYmJhMiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1MjI4MjU2fQ.8vIT5CvMysUFbWsertN1wyVBsfbfhT5MdSQQx-XkGhI- refresh_token: eryRiAAHEQEg8qdax1qS31tU+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijc1NzFmZjJiLWYxMTktNGY0Yi1iNmQ1LWU3ZTg0ZWExNjgxYiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1OTA1fQ.ryKBh-143o4wolj2fISVWwIg5J44wx89tg2EdY53w7U+ refresh_token: DmgXjxQuaj9UgHaCzYCEa6acuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Kay- last_name: Hills+ first_name: Amina+ last_name: Fritschphone:accepts_email_marketing: falseavailable_store_credit_total: '0'@@ -3218,8 +3218,8 @@ paths:data:- id: or_UkLWZg9DAJmarket_id:- number: R754188505- email: [email protected]+ number: R379644627+ email: [email protected]customer_note:currency: USDlocale: en@@ -3246,7 +3246,7 @@ paths:display_delivery_total: "$100.00"fulfillment_status:payment_status:- completed_at: '2026-04-03T13:57:37.079Z'+ completed_at: '2026-04-08T09:58:26.170Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -3256,8 +3256,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 208421- slug: product-208421+ name: Product 203904+ slug: product-203904options_text: ''price: '10.0'display_price: "$10.00"@@ -3282,7 +3282,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H72170370476+ number: H43775979798tracking: U10000tracking_url:cost: '100.0'@@ -3301,7 +3301,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_87- name: Kandy Schinner+ name: Rebbeca Predovicaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3455,8 +3455,8 @@ paths:example:id: or_UkLWZg9DAJmarket_id:- number: R519681367- email: [email protected]+ number: R235719220+ email: [email protected]customer_note:currency: USDlocale: en@@ -3483,7 +3483,7 @@ paths:display_delivery_total: "$100.00"fulfillment_status:payment_status:- completed_at: '2026-04-03T13:57:37.795Z'+ completed_at: '2026-04-08T09:58:26.874Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -3493,8 +3493,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 226895- slug: product-226895+ name: Product 229897+ slug: product-229897options_text: ''price: '10.0'display_price: "$10.00"@@ -3519,7 +3519,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H15368724370+ number: H01702942176tracking: U10000tracking_url:cost: '100.0'@@ -3538,7 +3538,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_93- name: Norma Lowe+ name: Lorita Vandervortaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -3650,8 +3650,8 @@ paths:content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjJiNGVlYWQ5LWZlODMtNDRkNi1hNzg5LWFlOWViYzIxMTk1NSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1MjI4MjU4fQ.lkORfxFzoIHy2DKXzwEFretOniTKqm7X7CeEaduC4aA- refresh_token: DJroaKT2NnfFGpnawBV39REV+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjY3OGI3MmIxLTQ5ZDQtNDY4Ny1iN2Y0LTEyNTAyYmRhYjk4ZiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc1NjQ1OTA4fQ.omgQwrZl7NLo52OlCBdK7X5MqzIF14JdOWSjJlO6PI8+ refresh_token: uttVDQE8s3SNFJdNirZGkparuser:id: cus_UkLWZg9DAJemail: [email protected]@@ -3764,9 +3764,9 @@ paths:application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Marchelle- last_name: O'Conner+ email: [email protected]+ first_name: June+ last_name: Pacochaphone: 555-555-0199accepts_email_marketing: falseavailable_store_credit_total: '0'@@ -3902,7 +3902,7 @@ paths:application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]+ email: [email protected]first_name: Updatedlast_name: Namephone: 555-555-0199@@ -4141,9 +4141,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R878476043- token: JwL4scprynz54yzDbNYLrBhTzg5Se7vZZfB- email: [email protected]+ number: R002486783+ token: NvYY79gubR89Bg5zLuRtfH1t7DakiRbRzT1+ email: [email protected]customer_note:currency: USDlocale: en@@ -4192,8 +4192,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 308597- slug: product-308597+ name: Product 309396+ slug: product-309396options_text: ''price: '10.0'display_price: "$10.00"@@ -4218,7 +4218,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H91288836970+ number: H18429747470tracking: U10000tracking_url:cost: '100.0'@@ -4237,7 +4237,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_119- name: Jeff Hyatt+ name: Jannette O'Reillyaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4383,9 +4383,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R653446817- token: 2MgZpfyrGsW9JsWVsNSrVKXJZk98XvMTCA6- email: [email protected]+ number: R165598824+ token: FhjAQLZX5WaqaH8nXZrYGny7ZENnhTgHMHh+ email: [email protected]customer_note:currency: USDlocale: en@@ -4427,8 +4427,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 32672- slug: product-32672+ name: Product 328866+ slug: product-328866options_text: ''price: '10.0'display_price: "$10.00"@@ -4453,7 +4453,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H71709440778+ number: H33264939971tracking: U10000tracking_url:cost: '100.0'@@ -4472,7 +4472,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_127- name: Beverlee Conn+ name: Van Halvorsonaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4607,9 +4607,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R316740870- token: Y5NdbGLqS5zuMbfnV4KeJNJFg53nJQx7ucz- email: [email protected]+ number: R390160320+ token: fBrGyJ29ER2pueELtERzfFZqgbExRFdoaro+ email: [email protected]customer_note:currency: USDlocale: en@@ -4653,8 +4653,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 348418- slug: product-348418+ name: Product 348718+ slug: product-348718options_text: ''price: '10.0'display_price: "$10.00"@@ -4679,7 +4679,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H20383362745+ number: H90203342203tracking: U10000tracking_url:cost: '100.0'@@ -4698,7 +4698,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_135- name: Denyse Nienow+ name: Alishia Ernseraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4847,9 +4847,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R563080025- token: BeEgTmWQXZ83wG6YrFKgiRH9bLcz6QZZv9x- email: [email protected]+ number: R470861463+ token: ymYuDMpSw4ohoGpP5XwfaFuv1iwRL56wUhp+ email: [email protected]customer_note:currency: USDlocale: en@@ -4870,8 +4870,8 @@ paths:display_total: "$110.00"gift_card_total: '50.0'display_gift_card_total: "$50.00"- amount_due: '110.0'- display_amount_due: "$110.00"+ amount_due: '60.0'+ display_amount_due: "$60.00"delivery_total: '100.0'display_delivery_total: "$100.00"warnings: []@@ -4888,8 +4888,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 366948- slug: product-366948+ name: Product 366792+ slug: product-366792options_text: ''price: '10.0'display_price: "$10.00"@@ -4914,7 +4914,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H13513569381+ number: H63710628591tracking: U10000tracking_url:cost: '100.0'@@ -4933,7 +4933,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_143- name: Verla Carroll+ name: Yee Lindgrenaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -4954,8 +4954,8 @@ paths:payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: 1-SC-20260403135747483751- number: PZAV4C95+ response_code: 1-SC-20260408095837040123+ number: PCUGDSTSamount: '50.0'display_amount: "$50.00"status: checkout@@ -5132,9 +5132,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R072825840- token: 9cEYgJvqNw7nxvZhjabZnFvpfsrhwJe7XVX- email: [email protected]+ number: R344678273+ token: phfQjCVHWgLYiDYqiWFeFMSGKV16hCj6UBH+ email: [email protected]customer_note:currency: USDlocale: en@@ -5176,8 +5176,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 404558- slug: product-404558+ name: Product 403487+ slug: product-403487options_text: ''price: '10.0'display_price: "$10.00"@@ -5202,7 +5202,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H92047087688+ number: H49620448730tracking: U10000tracking_url:cost: '100.0'@@ -5221,7 +5221,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_159- name: Lavera Batz+ name: Lakeshia Renneraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -5242,8 +5242,8 @@ paths:payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: 1-SC-20260403135750024404- number: PT5CAIF0+ response_code: 1-SC-20260408095839833871+ number: P7J10VUGamount: '50.0'display_amount: "$50.00"status: invalid@@ -5366,7 +5366,7 @@ paths:example:data:- id: gc_UkLWZg9DAJ- code: 8852354AA7160228+ code: E6C27BB29CA1F6AAstatus: activecurrency: USDamount: '10.0'@@ -5462,7 +5462,7 @@ paths:application/json:example:id: gc_UkLWZg9DAJ- code: D501A8FFDECD9B19+ code: 75F9CC01CD88429Astatus: activecurrency: USDamount: '10.0'@@ -5553,9 +5553,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R726238376- token: gUvZrFFo4h2enAW1dDrgooKGKV1hUAJijb3- email: [email protected]+ number: R631168633+ token: CznYtspQkFTGGmn13STBw8EUXM6pMaM9jNE+ email: [email protected]customer_note:currency: USDlocale: en@@ -5603,8 +5603,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 434452- slug: product-434452+ name: Product 436595+ slug: product-436595options_text: ''price: '10.0'display_price: "$10.00"@@ -5631,8 +5631,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 1currency: USD- name: Product 44616- slug: product-44616+ name: Product 448347+ slug: product-448347options_text: ''price: '19.99'display_price: "$19.99"@@ -5775,9 +5775,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R564868108- token: VojPSFt3YdpLqqqvT2fQQTk7z5qEWjBVBUh- email: [email protected]+ number: R648864808+ token: bSqmKYk78JgU7f954vdqWSPpuQUe3eEq7XU+ email: [email protected]customer_note:currency: USDlocale: en@@ -5822,8 +5822,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 471271- slug: product-471271+ name: Product 47114+ slug: product-47114options_text: ''price: '10.0'display_price: "$10.00"@@ -5946,9 +5946,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R929902433- token: syn5sftuc13UPXjojoYeJ2Th6XricSMmXj7- email: [email protected]+ number: R997228084+ token: t4eecwfDgnEMDcsTEJXC3JEYW8fcrJT5awo+ email: [email protected]customer_note:currency: USDlocale: en@@ -6549,7 +6549,7 @@ paths:example:id: or_UkLWZg9DAJmarket_id:- number: R364097439+ number: R364830212email: [email protected]customer_note:currency: USD@@ -6577,7 +6577,7 @@ paths:display_delivery_total: "$100.00"fulfillment_status:payment_status:- completed_at: '2026-04-03T13:57:57.819Z'+ completed_at: '2026-04-08T09:58:47.800Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -6587,8 +6587,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 517589- slug: product-517589+ name: Product 511442+ slug: product-511442options_text: ''price: '10.0'display_price: "$10.00"@@ -6613,7 +6613,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H27148992659+ number: H57425540041tracking: U10000tracking_url:cost: '100.0'@@ -6632,7 +6632,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_196- name: Belkis Upton+ name: Johnie Kochaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -6769,9 +6769,9 @@ paths:id: ps_gbHJdmfrXBstatus: pendingcurrency: USD- external_id: bogus_aa9f7c7837078ad687a22671+ external_id: bogus_4a74d30da9d9cb7ed55812c3external_data:- client_secret: bogus_secret_54f210a5800d22c6+ client_secret: bogus_secret_2f3f4946be7774d9customer_external_id:expires_at:amount: '110.0'@@ -6868,7 +6868,7 @@ paths:id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_3145ec7f0c9e89a766dd5a77+ external_id: bogus_95b98d1d87b48682ef66d0a2external_data:client_secret: secret_123customer_external_id:@@ -6929,7 +6929,7 @@ paths:id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_ae85d27086dc2397a5a14168+ external_id: bogus_c6516b7e430fe0f784f77356external_data:client_secret: secret_123customer_external_id:@@ -7030,7 +7030,7 @@ paths:id: ps_UkLWZg9DAJstatus: completedcurrency: USD- external_id: bogus_aaf43fc1440b698fdffffd0d+ external_id: bogus_5dbd6407a5acafead07c44ffexternal_data:client_secret: secret_123customer_external_id:@@ -7114,8 +7114,8 @@ paths:example:id: pss_gbHJdmfrXBstatus: pending- external_id: bogus_seti_04e9e2fd0b8d8d6867dd567d- external_client_secret: bogus_seti_secret_f1b226408d941e94+ external_id: bogus_seti_7bbc7cf11866d6c2a07c0116+ external_client_secret: bogus_seti_secret_6f5c9d835b0eaa42external_data: {}payment_method_id: pm_UkLWZg9DAJpayment_source_id:@@ -7213,8 +7213,8 @@ paths:example:id: pss_UkLWZg9DAJstatus: pending- external_id: seti_test_b88d1f335647deda1db9efad- external_client_secret: seti_secret_b72817994c45f026bbf4937d+ external_id: seti_test_0f9774b3ec7125ec23992f5e+ external_client_secret: seti_secret_29d984592f04ca7208bcf0a7external_data:client_secret: secret_123payment_method_id: pm_UkLWZg9DAJ@@ -7289,8 +7289,8 @@ paths:example:id: pss_UkLWZg9DAJstatus: completed- external_id: seti_test_25bf5f27be7e07e7b8ea129e- external_client_secret: seti_secret_c23e02b15cdd1e6512253d72+ external_id: seti_test_7f9aa4ec11f1e3e49c2eaaf2+ external_client_secret: seti_secret_ce0165ef4fc9b6db3f00b343external_data:client_secret: secret_123payment_method_id: pm_UkLWZg9DAJ@@ -7383,7 +7383,7 @@ paths:id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJresponse_code:- number: PI1KBGC7+ number: PFYUZUN8amount: '110.0'display_amount: "$110.00"status: checkout@@ -7478,7 +7478,7 @@ paths:body_html: ''- id: pol_OIJLhNcSbfname: Privacy Policy- slug: privacy-policy-883cc858-cc75-4e1b-bf2a-7448a978559f+ slug: privacy-policy-f503c800-f408-4a28-b54d-64e0e7a7dae4body: We respect your privacy.body_html: |<div class="trix-content">@@ -7722,12 +7722,12 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 612449- slug: product-612449+ name: Product 614694+ slug: product-614694meta_description:meta_keywords:variant_count: 1- available_on: '2025-04-03T13:58:08.134Z'+ available_on: '2025-04-08T09:58:58.425Z'purchasable: truein_stock: falsebackorderable: true@@ -7749,31 +7749,24 @@ paths:price_list_id:original_price:- id: prod_gbHJdmfrXB- name: Product 621326- slug: product-621326+ name: Product 627326+ slug: product-627326meta_description:meta_keywords:variant_count: 0- available_on: '2025-04-03T13:58:08.198Z'+ available_on: '2025-04-08T09:58:58.503Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- description: Distinctio quaerat esse ipsum corrupti eligendi non- architecto vel. Animi at veritatis repellendus vel. Ut laudantium- neque dignissimos modi. At eligendi tenetur enim deserunt totam.- Laudantium consequuntur adipisci voluptatibus consequatur corporis- repellat ipsa eius. Provident officiis similique quam quod quos- voluptatem expedita ab. Atque earum aperiam consectetur est sed.- Perferendis qui exercitationem voluptatibus ad sit unde molestiae.- Tempore similique iste dolores accusamus molestiae. Molestiae- consequatur excepturi cum deleniti. Cumque veniam et atque fugiat- reprehenderit nihil. Voluptas vel illo praesentium ducimus numquam- aliquid sint.- description_html: |-- Distinctio quaerat esse ipsum corrupti eligendi non architecto vel. Animi at veritatis repellendus vel. Ut laudantium neque dignissimos modi.- At eligendi tenetur enim deserunt totam. Laudantium consequuntur adipisci voluptatibus consequatur corporis repellat ipsa eius. Provident officiis similique quam quod quos voluptatem expedita ab. Atque earum aperiam consectetur est sed. Perferendis qui exercitationem voluptatibus ad sit unde molestiae.- Tempore similique iste dolores accusamus molestiae. Molestiae consequatur excepturi cum deleniti. Cumque veniam et atque fugiat reprehenderit nihil. Voluptas vel illo praesentium ducimus numquam aliquid sint.+ description: Illo enim cumque aspernatur consequatur quibusdam dolore.+ Ea voluptates sequi sapiente architecto voluptatem recusandae+ modi. Cupiditate ipsum repellendus aperiam dignissimos modi itaque+ dolores quaerat.+ description_html: Illo enim cumque aspernatur consequatur quibusdam+ dolore. Ea voluptates sequi sapiente architecto voluptatem recusandae+ modi. Cupiditate ipsum repellendus aperiam dignissimos modi itaque+ dolores quaerat.default_variant_id: variant_EfhxLZ9ck8thumbnail_url:tags: []@@ -7875,12 +7868,12 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 891846- slug: product-891846+ name: Product 893243+ slug: product-893243meta_description:meta_keywords:variant_count: 1- available_on: '2025-04-03T13:58:09.575Z'+ available_on: '2025-04-08T09:59:00.276Z'purchasable: truein_stock: falsebackorderable: true@@ -7907,7 +7900,7 @@ paths:amount_in_cents: 999currency: USDdisplay_amount: "$9.99"- recorded_at: '2026-03-19T13:58:09Z'+ recorded_at: '2026-03-24T09:59:00Z'schema:"$ref": "#/components/schemas/Product"'404':@@ -8282,9 +8275,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R770498178- token: eHS4EjgAjUps2yNvyyjoKQbowmei1fmrL1X- email: [email protected]+ number: R922531465+ token: s3TTWxDeU2DGqs8at3yauaous1WGQnJy44t+ email: [email protected]customer_note:currency: USDlocale: en@@ -8305,8 +8298,8 @@ paths:display_total: "$110.00"gift_card_total: '0.0'display_gift_card_total: "$0.00"- amount_due: '110.0'- display_amount_due: "$110.00"+ amount_due: '100.0'+ display_amount_due: "$100.00"delivery_total: '100.0'display_delivery_total: "$100.00"warnings: []@@ -8323,8 +8316,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1094839- slug: product-1094839+ name: Product 1095418+ slug: product-1095418options_text: ''price: '10.0'display_price: "$10.00"@@ -8349,7 +8342,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H01888757226+ number: H78502718671tracking: U10000tracking_url:cost: '100.0'@@ -8368,7 +8361,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_270- name: Maris Cremin+ name: Korey Kochaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -8389,8 +8382,8 @@ paths:payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: 1-SC-20260403135814742622- number: PJW8UIO9+ response_code: 1-SC-20260408095905909691+ number: PJSXJCT6amount: '10.0'display_amount: "$10.00"status: checkout@@ -8531,9 +8524,9 @@ paths:example:id: cart_UkLWZg9DAJmarket_id:- number: R354382018- token: 31dJp8gJRcwJTPffwtgj2rU8Jw6nCNTDcMo- email: [email protected]+ number: R401879956+ token: guU7jm6nVdqMTst12ivuw8iDVJRgyoU46R4+ email: [email protected]customer_note:currency: USDlocale: en@@ -8575,8 +8568,8 @@ paths:variant_id: variant_UkLWZg9DAJquantity: 1currency: USD- name: Product 1111473- slug: product-1111473+ name: Product 1111130+ slug: product-1111130options_text: ''price: '10.0'display_price: "$10.00"@@ -8601,7 +8594,7 @@ paths:digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H31670833875+ number: H34738055863tracking: U10000tracking_url:cost: '100.0'@@ -8620,7 +8613,7 @@ paths:stock_location:id: sloc_UkLWZg9DAJstate_abbr: STATE_ABBR_278- name: Angelia Wolf+ name: Danelle Pourosaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@ -8742,7 +8735,7 @@ paths:data:- id: wl_UkLWZg9DAJname: My Wishlist- token: 3UExeKLMLRJEGeLi97pWCvYc+ token: SramvG5K4zTAkvHUCaf2CmSKis_default: falseis_private: truemeta:@@ -8818,7 +8811,7 @@ paths:example:id: wl_gbHJdmfrXBname: Birthday Ideas- token: 389TaRyYLvcnnTPkT1bf1WRJ+ token: JhhpRLM7ard57UCuJ9BwTzEXis_default: falseis_private: trueschema:@@ -8914,7 +8907,7 @@ paths:example:id: wl_UkLWZg9DAJname: My Wishlist- token: ED46bvjMjnPVk3A4Agy56ja1+ token: 4HtxKcxZmzy8RifwDXRuM5Hzis_default: falseis_private: trueschema:@@ -8976,7 +8969,7 @@ paths:example:id: wl_UkLWZg9DAJname: Updated Name- token: xT6hPHzaHsh6tK3rgHmHT8qW+ token: xUWwHcXmcPuFZG7xrqBMR5dmis_default: falseis_private: trueschema:@@ -9816,7 +9809,7 @@ components:properties:id:type: string- name:+ label:type: stringtype:type: string@@ -9826,7 +9819,7 @@ components:type: objectrequired:- id- - name+ - label- type- key- valuediff --git a/docs/plans/5.4-6.0-custom-fields-rename.md b/docs/plans/5.4-6.0-custom-fields-rename.mdindex c2ae94b122..ca692025de 100644--- a/docs/plans/5.4-6.0-custom-fields-rename.md+++ b/docs/plans/5.4-6.0-custom-fields-rename.md@@ -4,7 +4,7 @@**Target:** 5.4 (API bridge) + 6.0 (model rename + visibility simplification)**Depends on:** None — 5.4 changes are serializer/prefix renames. 6.0 rename is part of the model rename wave.**Author:** Damian + Claude-**Last updated:** 2026-03-28+**Last updated:** 2026-04-08## Summary@@ -177,9 +177,9 @@ module Spreemodule Apimodule V3class CustomFieldSerializer < BaseSerializer- typelize key: :string, name: :string, type: :string, value: :any+ typelize key: :string, label: :string, type: :string, value: :any- attributes :name, :type+ attributes :label, :typeattribute :key do |metafield|metafield.full_key@@ -196,6 +196,8 @@ endSerializes `Spree::Metafield` model — same data, new file name and class name. Old `MetafieldSerializer` file is deleted.+**`label` not `name`** — Aligns with OptionType/OptionValue which also expose the human-readable display string as `label`. The programmatic identifier is `key`. `MetafieldDefinition` has a `label` alias on `name` (same delegating-method pattern as OptionType's `label` → `presentation`).+#### Admin API serializer changesRename expand parameter and response key. Keep `display_on` until 6.0:@@ -286,12 +288,12 @@ client.products.list({ expand: ['metafields'] })product.metafields// After-interface StoreCustomField { id: string; name: string; type: string; key: string; value: any }+interface StoreCustomField { id: string; label: string; type: string; key: string; value: any }client.products.list({ expand: ['custom_fields'] })product.custom_fields```-Generated types rename: `StoreMetafield` → `StoreCustomField`, `AdminMetafield` → `AdminCustomField`, `AdminMetafieldDefinition` → `AdminCustomFieldDefinition`.+Generated types rename: `StoreMetafield` → `StoreCustomField`, `AdminMetafield` → `AdminCustomField`, `AdminMetafieldDefinition` → `AdminCustomFieldDefinition`. The `name` field is renamed to `label` to align with OptionType/OptionValue naming.#### public_metadata deprecation (5.4)@@ -350,6 +352,7 @@ Full internal rename. Part of the 6.0 model rename wave alongside Shipment→Ful| `public_metafields` assoc | `storefront_custom_fields` assoc | || `private_metafields` assoc | removed | || Admin serializer `display_on: string` | `storefront_visible: boolean` | |+| Definition `name` column | `label` column | 5.4 adds alias, 6.0 renames column |#### 6.0 Metadata cleanupdiff --git a/docs/plans/5.4-metafield-translations.md b/docs/plans/5.4-metafield-translations.mdindex dd7be407fa..67995a00e6 100644--- a/docs/plans/5.4-metafield-translations.md+++ b/docs/plans/5.4-metafield-translations.md@@ -127,13 +127,13 @@ Custom fields are already serialized via `CustomFieldSerializer`. The current lo"custom_fields": [{"key": "specs.care_instructions",- "name": "Entretien",+ "label": "Entretien","type": "short_text","value": "Lavage a 30C"},{"key": "specs.weight_grams",- "name": "Poids",+ "label": "Poids","type": "number","value": 250}@@ -141,7 +141,7 @@ Custom fields are already serialized via `CustomFieldSerializer`. The current lo}```-Definition `name` is also translated via Mobility (the definition's `name` method already delegates through Mobility once we add the concern).+Definition `label` (alias for `name`) is also translated via Mobility (the definition's `name` method already delegates through Mobility once we add the concern, and `label` delegates to `name`).#### Admin API — Translation management@@ -152,7 +152,7 @@ Admin serializers expose a `translatable` flag and `translations` hash for manag```json{"key": "specs.care_instructions",- "name": "Care Instructions",+ "label": "Care Instructions","type": "short_text","value": "Machine wash at 30C","translatable": true,@@ -168,7 +168,7 @@ Non-translatable types omit `translations` or return an empty object:```json{"key": "specs.weight_grams",- "name": "Weight (grams)",+ "label": "Weight (grams)","type": "number","value": 250,"translatable": false@@ -185,14 +185,14 @@ Non-translatable types omit `translations` or return an empty object:}```-#### MetafieldDefinition Admin API — Name translations+#### MetafieldDefinition Admin API — Label translations```json{"namespace": "specs","key": "care_instructions",- "name": "Care Instructions",- "name_translations": {+ "label": "Care Instructions",+ "label_translations": {"fr": "Entretien","de": "Pflegehinweise"}@@ -207,7 +207,7 @@ Non-translatable types omit `translations` or return an empty object:module Spree::Api::V3class CustomFieldSerializer < BaseSerializer# value already reads from Mobility (current locale with fallback)- # name already reads from definition (which is now translatable)+ # label already reads from definition (which is now translatable)# No changes needed — Mobility handles locale resolution transparentlyendend@@ -302,14 +302,14 @@ end### Step 3: Serializer changes1. Update Admin `CustomFieldSerializer` to include `translatable` and `translations`-2. Update Admin `MetafieldDefinitionSerializer` to include `name_translations`+2. Update Admin `MetafieldDefinitionSerializer` to include `label_translations`3. Store API serializers need no changes (Mobility handles locale resolution)### Step 4: Controller changes1. Add translation params to Admin metafield update endpoints2. Support `translations` hash in permitted params for text-type metafields-3. Support `name_translations` hash in permitted params for definitions+3. Support `label_translations` hash in permitted params for definitions### Step 5: Testsdiff --git a/packages/admin-sdk/src/types/generated/Country.ts b/packages/admin-sdk/src/types/generated/Country.tsindex 42f756a4fb..c46b43daa2 100644--- a/packages/admin-sdk/src/types/generated/Country.ts+++ b/packages/admin-sdk/src/types/generated/Country.ts@@ -1,4 +1,4 @@-// Typelizer digest 6e35bb28fc74637d6a28153ea857b182+// Typelizer digest b178bbcdf98d347f041066d36303f61f//// DO NOT MODIFY: This file was automatically generated by Typelizer.import type {Market, State} from '@/types'@@ -11,6 +11,8 @@ interface Country {zipcode_required: boolean;states?: Array<State>;market?: Market | null;+ created_at: unknown;+ updated_at: unknown;}export default Country;diff --git a/packages/admin-sdk/src/types/generated/CustomField.ts b/packages/admin-sdk/src/types/generated/CustomField.tsindex f6ac4f163f..3edcecf0fd 100644--- a/packages/admin-sdk/src/types/generated/CustomField.ts+++ b/packages/admin-sdk/src/types/generated/CustomField.ts@@ -1,10 +1,10 @@-// Typelizer digest 50cfb19ef5ce8cd71cf2f7c6721e3cc8+// Typelizer digest ac72a53500229d0024f9135125d0ca22//// DO NOT MODIFY: This file was automatically generated by Typelizer.interface CustomField {id: string;- name: string;+ label: string;type: string;key: string;value: any;diff --git a/packages/admin-sdk/src/types/generated/State.ts b/packages/admin-sdk/src/types/generated/State.tsindex f1eb2176e9..40ca43f440 100644--- a/packages/admin-sdk/src/types/generated/State.ts+++ b/packages/admin-sdk/src/types/generated/State.ts@@ -1,10 +1,12 @@-// Typelizer digest 7b4e9a101a5db9ae57ee1dc288e50d18+// Typelizer digest 2c41762cfe57b3597bda93d8aae7c0ef//// DO NOT MODIFY: This file was automatically generated by Typelizer.interface State {abbr: string;name: string;+ created_at: unknown;+ updated_at: unknown;}export default State;diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.mdindex 0cb0939f18..59910a626f 100644--- a/packages/sdk/CHANGELOG.md+++ b/packages/sdk/CHANGELOG.md@@ -1,5 +1,11 @@# @spree/sdk+## 0.21.0++### Minor Changes++- Renamed `name` to `label` on CustomField type to align with OptionType/OptionValue naming convention. **Breaking:** API consumers reading `custom_fields[].name` must update to `custom_fields[].label`.+## 0.20.2### Patch Changesdiff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 0061692362..5da9c128e9 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -1,6 +1,6 @@{"name": "@spree/sdk",- "version": "0.20.2",+ "version": "0.21.0","description": "Official TypeScript SDK for Spree Commerce Store API","type": "module","main": "./dist/index.cjs",diff --git a/packages/sdk/src/types/generated/CustomField.ts b/packages/sdk/src/types/generated/CustomField.tsindex 96cccc2a9d..578f383235 100644--- a/packages/sdk/src/types/generated/CustomField.ts+++ b/packages/sdk/src/types/generated/CustomField.ts@@ -1,10 +1,10 @@-// Typelizer digest 3ac7ee503478b30fbadc8402bc8452bf+// Typelizer digest bf1a183ba12220f3ff56dafa12252c55//// DO NOT MODIFY: This file was automatically generated by Typelizer.interface CustomField {id: string;- name: string;+ label: string;type: string;key: string;value: any;diff --git a/packages/sdk/src/zod/generated/CustomField.ts b/packages/sdk/src/zod/generated/CustomField.tsindex a8a4e75a9c..1cca6a3047 100644--- a/packages/sdk/src/zod/generated/CustomField.ts+++ b/packages/sdk/src/zod/generated/CustomField.ts@@ -3,7 +3,7 @@ import { z } from 'zod';export const CustomFieldSchema = z.object({id: z.string(),- name: z.string(),+ label: z.string(),type: z.string(),key: z.string(),value: z.any(),diff --git a/spree/api/app/serializers/spree/api/v3/custom_field_serializer.rb b/spree/api/app/serializers/spree/api/v3/custom_field_serializer.rbindex ba4cee61f4..2d8120ab2f 100644--- a/spree/api/app/serializers/spree/api/v3/custom_field_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/custom_field_serializer.rb@@ -4,9 +4,9 @@ module Spree# Store API Custom Field Serializer# Customer-facing custom field data (public metafields only)class CustomFieldSerializer < BaseSerializer- typelize key: :string, name: :string, type: :string, value: :any+ typelize key: :string, label: :string, type: :string, value: :any- attributes :name, :type+ attributes :label, :typeattribute :key do |metafield|metafield.full_keydiff --git a/spree/api/spec/serializers/spree/api/v3/custom_field_serializer_spec.rb b/spree/api/spec/serializers/spree/api/v3/custom_field_serializer_spec.rbindex 790069076e..2be3b34710 100644--- a/spree/api/spec/serializers/spree/api/v3/custom_field_serializer_spec.rb+++ b/spree/api/spec/serializers/spree/api/v3/custom_field_serializer_spec.rb@@ -15,8 +15,8 @@ RSpec.describe Spree::Api::V3::CustomFieldSerializer doexpect(subject['key']).to include('.')end- it 'includes name' do- expect(subject['name']).to eq(metafield.name)+ it 'includes label' do+ expect(subject['label']).to eq(metafield.label)endit 'includes type' do@@ -46,7 +46,7 @@ RSpec.describe Spree::Api::V3::Admin::CustomFieldSerializer doit 'includes standard attributes' doexpect(subject).to include('key' => metafield.full_key,- 'name' => metafield.name,+ 'label' => metafield.label,'type' => metafield.type,'value' => 'admin value')diff --git a/spree/core/app/models/spree/metafield.rb b/spree/core/app/models/spree/metafield.rbindex 9421189be2..c950d68368 100644--- a/spree/core/app/models/spree/metafield.rb+++ b/spree/core/app/models/spree/metafield.rb@@ -11,7 +11,7 @@ module Spree## Delegations#- delegate :key, :full_key, :name, :display_on, to: :metafield_definition, allow_nil: true+ delegate :key, :full_key, :name, :label, :display_on, to: :metafield_definition, allow_nil: true## Callbacksdiff --git a/spree/core/app/models/spree/metafield_definition.rb b/spree/core/app/models/spree/metafield_definition.rbindex 20a99a0fc9..4c00cfa10b 100644--- a/spree/core/app/models/spree/metafield_definition.rb+++ b/spree/core/app/models/spree/metafield_definition.rb@@ -51,6 +51,16 @@ module Spreeself.whitelisted_ransackable_attributes = %w[key namespace name resource_type display_on]self.whitelisted_ransackable_scopes = %w[search multi_search]+ # 5.5 API naming bridge (DB column rename in 6.0)+ # Aligns with OptionType/OptionValue which also expose `label` for the display name.+ def label+ name+ end++ def label=(value)+ self.name = value+ end+# Returns the full key with namespace# @return [String] eg. custom.iddef full_key