Search Documentation
Search for a documentation page...
Settings API
REST API endpoints for store settings and checkout consents.
Read and update general store settings, and manage the checkout consent checkboxes shown to customers. Sensitive configuration – API key hashes, Stripe credentials, and deploy config – is never exposed by these endpoints. Appearance, socials, brand kit, and loyalty have their own endpoints.
Get Settings
Returns general store settings. The subdomain, domain, environment, email-domain fields, and inventory are read-only – they cannot be changed through this endpoint.
Response
Read-only fields
| Field | Type | Description |
|---|---|---|
subdomain | string | The store's *.yns.store subdomain |
domain | string | null | Custom domain, when one is connected |
environment | string | live or test |
emailDomain | string | null | Sending domain for store emails |
emailDomainVerified | boolean | Whether that domain has passed verification |
inventory.lowStockThreshold | number | Units at or below which a tracked variant counts as low stock |
inventory.lowStockThreshold is the merchant's own low-stock band, set in the dashboard under Settings → Notifications. It is always a number: the platform default of 10 when the merchant never chose one, and 0 when the band is switched off. It is the same number the dashboard, the low-stock email, and the platform storefront use, so a storefront rendering an "only N left" line should read it here instead of hard-coding a threshold:
Update Settings
Partially updates general store settings. Only the fields you send are changed; the read-only fields listed above (subdomain, domain, environment, emailDomain, emailDomainVerified, inventory) are ignored if included, and any other unknown field is rejected with a 400. Module toggles are not settings – they live on PATCH /api/v1/modules. Returns the full, updated settings object.
Grouped settings merge rule
Every grouped setting (the object fields below) follows one rule: send only the fields you are changing; null on a field clears that field; null on the entire group removes the whole group. A write never requires a read first.
Request Body – Top-level Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Public store name (min 1 char) |
description | string | null | No | Short store description |
published | boolean | No | Whether the storefront is live. false takes it offline: its public addresses show a "Coming soon" page until it is published again. An AI-builder storefront is put back online by publishing it (POST /api/v1/publish), so true is refused for it here |
currency | string | No | Base currency (ISO code). Changing it re-denominates existing prices – a product at 29.99 becomes 29.99 of the new currency. Re-price the catalog afterwards. |
defaultLanguage | string | No | Default storefront locale (e.g. en-US) – must be enabled in enabledLanguages |
enabledLanguages | object | No | Per-locale toggle map, e.g. { "en-US": true } |
enabledCurrencies | string[] | No | ISO currency codes customers can shop in besides the base currency |
notificationEmail | string | null | No | Where store notifications are sent |
contactRoutingEmails | object | null | No | Maps form routing keys to recipients, e.g. { "sales": "sales@acme.com" }. Max 20 entries. Pass null to remove. |
outboundEmail | string | null | No | From-address for customer emails (empty string allowed) |
aiInstructions | string | null | No | Custom instructions for AI features (max 20,000 chars) |
omnibus | boolean | null | No | EU Omnibus price-history compliance |
customerAccountSignUp | boolean | null | No | Whether shoppers can create an account with the store (default true). false removes the checkout "Save my information" offer, closes the store's sign-up page and refuses new accounts made through the store. Existing accounts still sign in; guest checkout and order confirmation emails are unaffected. null resets to the default |
taxBehavior | string | No | How prices are presented to shoppers: "inclusive" (shoppers see gross prices, tax included) or "exclusive" (shoppers see net prices, tax added at checkout). Prices are always stored net — see Prices and tax. |
logo | object | null | No | Storefront logo. Pass null to remove. |
logo.imageUrl | string | Yes (within logo) | Logo image URL. External URLs are re-hosted on your store CDN. |
logo.width | number | null | No | Logo width in pixels |
logo.height | number | null | No | Logo height in pixels |
Request Body – welcomeOffer
Newsletter welcome email: automatically email every new subscriber the newsletter_welcome email, with or without a discount code. With double opt-in on, it goes out once the subscriber confirms. Pass null to remove the group.
| Field | Type | Description |
|---|---|---|
enabled | boolean | Whether the welcome email is sent |
mode | string | "shared" uses an existing coupon; "unique" (paid plans) generates a single-use code per subscriber; "none" sends the welcome email without a code (the coupon fields are ignored and cleared). Defaults to "shared". |
sharedCouponId | string | null | UUID of an existing coupon. Required when mode is "shared" and enabled is true. |
uniquePrefix | string | null | Prefix for generated codes (A–Z, 0–9, hyphen; max 20 chars) |
discountType | string | "percentage" or "fixed" |
discountValue | number | null | Discount amount. Required when mode is "unique". |
expiryDays | number | Days until the code expires (1–365) |
reminderDaysBefore | number | null | Send an expiry reminder this many days before (1–30); null sends none |
Request Body – newsletterPopup
Newsletter popup copy, image, and timing. Only renders when the newsletterPopup module is enabled via PATCH /api/v1/modules. Pass null to remove the group.
| Field | Type | Description |
|---|---|---|
delaySeconds | number | Seconds on the page before the popup opens (0–300) |
heading | string | null | Popup headline (max 100 chars) |
subheading | string | null | Supporting line below the headline (max 200 chars) |
ctaText | string | null | Subscribe button label (max 50 chars) |
teaserText | string | null | Label on the tab that reopens the popup after dismissal (max 50 chars) |
imageUrl | string | null | Image shown beside the form. External URLs are re-hosted on your store CDN. |
Request Body – newsletter
Newsletter signup mechanics.
| Field | Type | Description |
|---|---|---|
doubleOptIn | boolean | Require email confirmation before counting as subscribed. While on, the welcome offer is held back until they confirm. |
Request Body – stockHold
Cart stock reservations at checkout, so two shoppers cannot buy the last unit.
| Field | Type | Description |
|---|---|---|
enabled | boolean | Reserve stock once the shopper reaches checkout |
holdMinutes | number | How long the reservation lasts (5–60 minutes) |
Request Body – invoiceSettings
Invoicing for orders. Pass null to remove the group.
| Field | Type | Description |
|---|---|---|
enabled | boolean | null | Issue invoices for orders |
template | string | Invoice template identifier (max 100 chars) |
cadence | string | Invoice numbering cycle: "monthly" or "yearly" |
notes | string | null | Footer note printed on every invoice (max 2,000 chars) |
Request Body – bankTransfer
Manual bank transfer at checkout. It also covers any "send money to X" method such as Interac e-Transfer. The order is placed unpaid and the shopper is emailed the payment details. It works without Stripe. Pass null to remove the group.
| Field | Type | Description |
|---|---|---|
enabled | boolean | Offer bank transfer at checkout. Requires bankAccountNumber to be set |
bankAccountNumber | string | null | Where shoppers send the money: an IBAN, account number, or an email for an e-Transfer (max 64 chars) |
bankName | string | null | Bank name shown with the account (max 120 chars) |
transferTitleHint | string | null | Extra note for the transfer title; the order number is always the title (max 200 chars) |
instructions | string | null | Extra instructions shown at checkout and in the payment email (max 1,000 chars) |
paymentDeadlineDays | number | Days to pay before the unpaid order is cancelled and restocked (1–60) |
methodName | string | null | Shopper-facing name replacing "Bank transfer", e.g. Interac e-Transfer (max 60 chars) |
accountLabel | string | null | Shopper-facing label replacing "Account number", e.g. Send to (max 40 chars) |
Request Body – cashOnDelivery
Cash on delivery at checkout for carts with something to deliver. The order is placed unpaid and marked paid later. It works without Stripe. Pass null to remove the group.
| Field | Type | Description |
|---|---|---|
enabled | boolean | Offer cash on delivery at checkout |
instructions | string | null | Instructions shown at checkout and in the order confirmation (max 1,000 chars) |
Request Body – emailTracking
Open and click tracking on outgoing store emails.
| Field | Type | Description |
|---|---|---|
trackOpens | boolean | Embed a tracking pixel in outgoing store emails |
trackClicks | boolean | Rewrite links in outgoing store emails to count clicks |
Request Body – blogSettings
House style and model strength for AI blog generation. Requires the blog module.
| Field | Type | Description |
|---|---|---|
systemPrompt | string | null | Rules prepended to every AI blog generation (max 20,000 chars) |
modelTier | string | Model strength: "regular", "extra", or "max" |
Request Body – bookings
Defaults and rules for the Bookings module. Individual slots are managed at /api/v1/booking-slots. Requires the bookings module.
| Field | Type | Description |
|---|---|---|
defaultSlotDuration | number | Default slot length in minutes |
bufferTime | number | Minutes held between consecutive slots |
advanceBookingDays | number | How far ahead shoppers may book |
cancellationHours | number | Cancellation cut-off before a slot starts |
autoConfirm | boolean | Confirm bookings without merchant review |
requireApproval | boolean | Hold every booking for merchant approval |
sendReminders | boolean | Email attendees before their slot |
reminderHours | number | How long before the slot the reminder goes out |
Request Body – cartRecommendations
Cart recommendation display. Requires the cartRecommendations module.
| Field | Type | Description |
|---|---|---|
layout | string | Where recommendations render: "inline" or "sidebar" |
Request Body – checkoutAppearance
Branding of the YNS-hosted checkout page. This is checkout only – the rest of the storefront's look is the storefront's own code.
| Field | Type | Description |
|---|---|---|
summaryPosition | string | null | Desktop side for the order summary: "left" or "right" |
summaryBackground | string | null | Summary panel fill: "tint", "plain", or "custom" |
summaryBackgroundColor | string | null | Used when summaryBackground is "custom" (max 32 chars) |
cornerRadius | string | null | Corner rounding: "none", "small", "medium", "large" |
payButtonLabel | string | null | Pay button wording: "pay", "completeOrder", "placeOrder" |
showHeader | boolean | null | Show the store header on the checkout page |
showPolicyLinks | boolean | null | Show the Terms / Privacy / Refund / Contact footer bar |
couponFieldDisplay | string | null | How the discount-code field appears in the order summary: "expanded" (always open, the default), "collapsed" (a row the shopper opens) or "hidden" (no field). A code already on the cart still shows as applied in every mode |
couponNote | string | null | Short note above the discount-code field (max 200 chars), e.g. which code unlocks a bundle; shown only while the store has coupons |
showCustomsNotice | boolean | null | Show a customs-duties note under the order total when the shipping country differs from the store's own |
customsNotice | string | null | Wording of that note (max 300 chars); empty uses the checkout's localized default |
Import duties are not part of a Stripe Tax total, so showCustomsNotice lets the merchant warn shoppers that a parcel crossing a border may be charged on delivery. The note renders under the order total as soon as the shopper picks a shipping country other than the country on the store's address, and a store with no address on file never shows one.
Request Body – storeChat
Shopper-facing AI assistant: its persona, its knowledge, and its spend caps. Requires the storeChat module on a plan that grants it.
| Field | Type | Description |
|---|---|---|
assistantName | string | null | Display name of the assistant (max 60 chars) |
greeting | string | null | First message the assistant opens with (max 300 chars) |
suggestedQuestions | string[] | null | Up to 4 starter prompts (120 chars each) |
knowledge | string | null | Merchant-authored Markdown facts injected into the prompt. Never storefront-visible. (max 10,000 chars) |
monthlyAllowance | number | Monthly credit budget (0–1,000,000) |
merchantReserve | number | Credits held back for the merchant (0–1,000,000) |
visitorDailyTurns | number | Per-visitor daily message cap (1–500) |
Example
Response (200)
Returns the full settings object with the updated values.
Errors
| Status | Condition |
|---|---|
400 | sharedCouponId does not reference an existing coupon in this store (shared mode) |
400 | discountValue is missing when using unique mode |
400 | Unique welcome codes require a paid plan |
400 | Logo or newsletter popup image URL is unreachable |
400 | defaultLanguage is not enabled in enabledLanguages |
400 | bankTransfer.enabled is true but no bankTransfer.bankAccountNumber is set |
422 | taxBehavior set to inclusive while the Stripe Tax module is enabled — Stripe Tax only works on tax-exclusive prices |
List Checkout Consents
Returns the consent checkboxes shown at checkout, ordered by their position. Each consent includes both the stored TipTap content document and a rendered contentHtml string.
Response
Create Checkout Consent
Adds a consent checkbox to checkout. Pass content as a plain string (auto-wrapped into a single paragraph) or a TipTap JSON document (type: "doc") for rich text such as links. Invalid TipTap documents are rejected with a 400.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | object | Yes | Consent text: plain string or a TipTap JSON document (type: "doc") |
required | boolean | No | Whether the consent must be accepted to complete checkout (default: false) |
type | "general" | "newsletter" | No | newsletter consents auto-subscribe the customer when accepted (default: general) |
Response (201)
Get Checkout Consent
Returns a single consent by ID. Returns 404 if the consent does not exist in this store.
Update Checkout Consent
Updates an existing consent. Send only the fields you want to change. Use position to reorder a consent relative to its neighbors.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
content | string | object | No | Plain string or TipTap JSON document (type: "doc") |
required | boolean | No | Whether the consent must be accepted to complete checkout |
type | "general" | "newsletter" | No | Consent type |
position | string | No | LexoRank ordering key – set between two neighbors' positions (from the list endpoint) to reorder |
Response (200)
Returns the updated consent with content and contentHtml.
Delete Checkout Consent
Removes a consent from checkout. Returns 404 if it does not exist.