Spree Commerce
Open-source headless ecommerce platform with a REST API and Next.js storefront
Alternative to: Shopify, Magento, WooCommerce, Salesforce Commerce Cloud
spree/sdk@1.2.0
2026-07-27This SDK release requires Spree 5.6.0 on the backend.
What’s Changed
-
#14339
b71e613Thanks @damianlegawiec! - Add newsletter unsubscribe endpoints.newsletterSubscribers.requestUnsubscribe({ email })asks the store to fire anewsletter_subscriber.unsubscribe_requestedwebhook event carrying an unsubscribe token (always 202, so email existence is never revealed).newsletterSubscribers.delete(id, { token })removes a subscription using that token from an email link, or — with a customer JWT instead of the token — removes the signed-in customer’s own subscription.Customernow exposes the store-scopednewsletter_subscriberonGET /customers/me, which is where a signed-in customer reads the subscription id. -
#14339
b71e613Thanks @damianlegawiec! - Money fields are now typedstring | nullacross Cart, Order, LineItem, Payment, Fulfillment, GiftCard, and Discount (Zod schemas acceptnullaccordingly). On a gated channel (prices_hidden), the Store API returnsnullfor every monetary amount — including those on records nested inside a cart or order — so anonymous visitors cannot recover hidden prices. Handlenullbefore formatting or doing arithmetic on these fields. -
#14339
b71e613Thanks @damianlegawiec! - Surface pre-order status on the Store API types.Variant,Product, andLineItemnow exposepreorder(whether the item is currently sold as a pre-order) andpreorder_ships_at(the customer-facing “ships by” promise,nullunless it’s a live pre-order), so storefronts can render a “Pre-order — ships by …” badge. Both fields are included in the generated Zod schemas. -
#14339
b71e613Thanks @damianlegawiec! - Addclient.channel.get()— returns the channel the client’s requests resolve to (API-key binding →channeloption → store default), including the resolvedstorefront_accessposture (public|prices_hidden|login_required) andguest_checkout. Gated storefronts can call it before authentication to decide whether to render a sign-in wall. Also exports theChannelandCustomerGrouptypes;customers/menow includes store-scopedcustomer_groups; andCartcarrieschannel_id, so a storefront serving several channels can verify a persisted cart belongs to the surface loading it. -
#14339
b71e613Thanks @damianlegawiec! - Support gated storefronts in the Store API. A channel (or its store) can now hide prices from anonymous visitors or require a login to browse: when prices are hidden, monetary fields on products, carts, and orders returnnullfor guests, andlogin_requiredchannels reject unauthenticated requests with401. Guest checkout can likewise be disallowed per channel, in which case completing a cart without a signed-in customer returns401.