Browse the API docs

Storefront API

Public endpoints for a headless storefront or a mobile app: the store's active products and collections, search, published pages and blog posts, navigation and carts. Buyers pay on the store's own checkout.

Authentication#

Send the app's storefront token in the X-Storeloom-Storefront-Access-Token header (or as Authorization: Bearer slst_…). Every app has one: find it on the app's page under Apps in the admin. It doesn't need Admin API scopes.

The token is public by design. It only reaches what the store already shows shoppers: active products, published content, and carts by their token. It never returns cost prices, customers or orders, and products show availability rather than stock counts (a cart that asks for more than is left gets the storefront's own "only 2 available"). So it's safe in browser code and mobile apps. If it's abused, rotate it on the app's page; the old one stops working at once.

Any website can call the API from the browser: responses send Access-Control-Allow-Origin: *, preflight (OPTIONS) requests are answered without a token, and no cookies are involved.

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/products.json?collection=home" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"

Versions, pages and limits#

  • The base URL is https://store.weftgrid.com/api/storefront/2026-10, versioned like the Admin API (current version 2026-10). Errors have the same shape: { "errors": … }, with field errors on 422.
  • Listings take page (from 1) and limit (1 to 100, default 24) and return "pagination": { "page", "limit", "total", "pages" }, so you can render page numbers.
  • Products say whether each variant can be bought (available) and how: in_stock, low_stock, backorder (sold out but still selling) or sold_out.
  • Each storefront token has a bucket of 200 calls that refills at 20 a second, shared by all your buyers; X-Storeloom-Storefront-Call-Limit shows how full it is. Over the limit, the answer is 429 with Retry-After in seconds. Cache catalog responses on your side if you have a lot of traffic.
  • Prices are in the store's currency unless you say where the buyer is: country=CA (or the X-Storeloom-Country header) on catalog and cart requests prices them in the market that sells to that country, with its currency_code, and a cart created with a country checks out in that market. GET /localization.json lists the countries the store sells to and their currencies.

Carts and checkout#

  1. 1
    Create a cart
    POST /carts.json, with lines or empty. The response has the cart's token: keep it for the buyer (in local storage, or your session). Anyone with the token can change the cart, so treat it like a session id.
  2. 2
    Fill it
    Add lines (up to 99 of a variant and 100 different items), change quantities and apply a discount code. Stock and discount rules are the store's own: a 422 explains what isn't possible, in words you can show the buyer. Totals are before shipping, which the buyer chooses at checkout.
  3. 3
    Send the buyer to checkout
    Redirect the buyer's browser to checkout_url. It opens the store's checkout with this cart's items in the buyer's browser, where they enter their address, pick a shipping rate and pay with the store's payment methods. The order is like any other: the store sees it in the admin and your app gets orders/create. Once it's placed, the cart is gone (its token answers 404), so start a new cart for the next purchase.
  4. 4
    Start over
    A cart that became an order is gone, and its token answers 404: start a new cart. Saving the buyer's email with PUT /carts/{token}.json before checkout lets the store follow up if they don't finish.
In the browser
const BASE = "https://store.weftgrid.com/api/storefront/2026-10";

async function api(path, method = "GET", body) {
  const res = await fetch(BASE + path, {
    method,
    headers: {
      "X-Storeloom-Storefront-Access-Token": STOREFRONT_TOKEN,
      "Content-Type": "application/json",
    },
    body: body && JSON.stringify(body),
  });
  return res.json();
}

// 1. A cart for this buyer. The token is the key to it: keep it.
let { cart } = await api("/carts.json", "POST", {
  cart: { lines: [{ variant_id: variantId, quantity: 1 }] },
});
localStorage.setItem("cartToken", cart.token);

// 2. Change it as they shop.
({ cart } = await api(`/carts/${cart.token}/lines.json`, "POST", {
  lines: [{ variant_id: otherVariantId, quantity: 2 }],
}));
const applied = await api(`/carts/${cart.token}/discount_code.json`, "PUT", {
  discount_code: code,
});
if (applied.errors) showError(applied.errors.discount_code[0]); // "That code has expired."

// 3. Checkout happens on the store: send the buyer there.
window.location.href = cart.checkout_url;

Shop#

Get the shop#

GET/shop.jsonStorefront token

Name, currency, domain, brand colors and logo, where the store ships, and its policies. password_enabled is true while the store is behind its launch password.

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/shop.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "shop": {
    "name": "Juniper & Co.",
    "description": "Linen, stoneware and canvas pieces for slow mornings and long days out.",
    "currency": "USD",
    "domain": "demo.storeloom.example",
    "url": "https://demo.storeloom.example",
    "logo": null,
    "brand": {
      "primary_color": "#1f4d3a",
      "accent_color": "#e9c46a"
    },
    "customer_accounts": true,
    "password_enabled": false,
    "ships_to_countries": [
      "US",
      "CA",
      "*"
    ],
    "policies": [
      {
        "type": "refund",
        "title": "Refund policy",
        "handle": "refund-policy",
        "url": "https://demo.storeloom.example/policies/refund-policy"
      }
    ]
  }
}

Products#

List products#

GET/products.jsonStorefront token

Active products with their variants. sort is one of featured, relevance, title-asc, title-desc, price-asc, price-desc, created-desc, created-asc; featured (the default) is newest first, or the collection's own order with collection. Prices are in each product's currency_code: the store's, or with country that country's market's.

Query parameters
ParameterDescription
collectionA collection handle: only its products.
qSearch words; every word must match the title, description, type, vendor, a tag or a SKU.
sortfeatured, relevance, title-asc, title-desc, price-asc, price-desc, created-desc, created-asc.
availabletrue for products that can be bought now (in stock, or selling on backorder).
min_price / max_pricePrice bounds, like 20.00, in the currency prices are shown in (the country's); a product matches when one variant is in range.
product_type, vendorExact match, any case. Repeat the parameter for several values.
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
pagePage number, from 1 (default 1).
limitResults per page, 1–100 (default 24).
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/products.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "products": [
    {
      "id": "cm2prod0001",
      "handle": "linen-shirt",
      "title": "Linen shirt",
      "description_html": "<p>A relaxed washed-linen shirt that gets softer with every wear.</p>",
      "vendor": "Juniper & Co.",
      "product_type": "Shirts",
      "tags": [
        "linen",
        "wardrobe",
        "summer"
      ],
      "options": [
        {
          "name": "Color",
          "values": [
            "Sand",
            "Olive"
          ]
        },
        {
          "name": "Size",
          "values": [
            "S",
            "M",
            "L",
            "XL"
          ]
        }
      ],
      "images": [
        {
          "src": "https://storeloom.example/seed/shirt-sand.svg",
          "alt": "Linen shirt"
        }
      ],
      "featured_image": {
        "src": "https://storeloom.example/seed/shirt-sand.svg",
        "alt": "Linen shirt"
      },
      "currency_code": "USD",
      "price_range": {
        "min": "58.00",
        "max": "58.00"
      },
      "compare_at_price_range": null,
      "available": true,
      "gift_card": false,
      "variants": [
        {
          "id": "cm2vari0001",
          "title": "Sand / M",
          "options": [
            "Sand",
            "M"
          ],
          "option1": "Sand",
          "option2": "M",
          "option3": null,
          "price": "58.00",
          "compare_at_price": null,
          "available": true,
          "availability": "in_stock",
          "sku": "LINEN-SHIR-02",
          "image": "https://storeloom.example/seed/shirt-sand.svg",
          "requires_shipping": true,
          "weight_grams": 240
        }
      ],
      "url": "https://demo.storeloom.example/products/linen-shirt",
      "seo": {
        "title": "Linen shirt in sand and olive",
        "description": "A relaxed washed-linen shirt that gets softer with every wear."
      },
      "published_at": "2026-08-09T10:00:00.000Z",
      "updated_at": "2026-10-22T16:20:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 24,
    "total": 9,
    "pages": 1
  }
}

Get a product by handle#

GET/products/{handle}.jsonStorefront token

404 for products that aren't active (drafts, archived) or don't exist. With country, prices are in that country's market: converted, or the fixed prices the store set there.

Query parameters
ParameterDescription
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/products/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "product": {
    "id": "cm2prod0001",
    "handle": "linen-shirt",
    "title": "Linen shirt",
    "description_html": "<p>A relaxed washed-linen shirt that gets softer with every wear.</p>",
    "vendor": "Juniper & Co.",
    "product_type": "Shirts",
    "tags": [
      "linen",
      "wardrobe",
      "summer"
    ],
    "options": [
      {
        "name": "Color",
        "values": [
          "Sand",
          "Olive"
        ]
      },
      {
        "name": "Size",
        "values": [
          "S",
          "M",
          "L",
          "XL"
        ]
      }
    ],
    "images": [
      {
        "src": "https://storeloom.example/seed/shirt-sand.svg",
        "alt": "Linen shirt"
      }
    ],
    "featured_image": {
      "src": "https://storeloom.example/seed/shirt-sand.svg",
      "alt": "Linen shirt"
    },
    "currency_code": "USD",
    "price_range": {
      "min": "58.00",
      "max": "58.00"
    },
    "compare_at_price_range": null,
    "available": true,
    "gift_card": false,
    "variants": [
      {
        "id": "cm2vari0001",
        "title": "Sand / M",
        "options": [
          "Sand",
          "M"
        ],
        "option1": "Sand",
        "option2": "M",
        "option3": null,
        "price": "58.00",
        "compare_at_price": null,
        "available": true,
        "availability": "in_stock",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "requires_shipping": true,
        "weight_grams": 240
      }
    ],
    "url": "https://demo.storeloom.example/products/linen-shirt",
    "seo": {
      "title": "Linen shirt in sand and olive",
      "description": "A relaxed washed-linen shirt that gets softer with every wear."
    },
    "published_at": "2026-08-09T10:00:00.000Z",
    "updated_at": "2026-10-22T16:20:00.000Z"
  }
}

Collections#

List collections#

GET/collections.jsonStorefront token

Collections with at least one active product, alphabetically, with their product counts.

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/collections.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "collections": [
    {
      "id": "cm2coll0001",
      "handle": "home",
      "title": "Home",
      "description_html": "<p>Stoneware, linen and light for the kitchen table.</p>",
      "image": {
        "src": "https://storeloom.example/seed/mug-sage.svg",
        "alt": "Home"
      },
      "products_count": 5,
      "url": "https://demo.storeloom.example/collections/home",
      "seo": {
        "title": "Home",
        "description": "Stoneware, linen and light for the kitchen table."
      }
    }
  ]
}

Get a collection with its products#

GET/collections/{handle}.jsonStorefront token

The collection and a page of its active products, in the collection's own order unless sort is given (featured, relevance, title-asc, title-desc, price-asc, price-desc, created-desc, created-asc).

Query parameters
ParameterDescription
sortOptional sort.
availabletrue for products that can be bought now (in stock, or selling on backorder).
min_price / max_pricePrice bounds, like 20.00, in the currency prices are shown in (the country's); a product matches when one variant is in range.
product_type, vendorExact match, any case. Repeat the parameter for several values.
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
pagePage number, from 1 (default 1).
limitResults per page, 1–100 (default 24).
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/collections/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "collection": {
    "id": "cm2coll0001",
    "handle": "home",
    "title": "Home",
    "description_html": "<p>Stoneware, linen and light for the kitchen table.</p>",
    "image": {
      "src": "https://storeloom.example/seed/mug-sage.svg",
      "alt": "Home"
    },
    "products_count": 5,
    "url": "https://demo.storeloom.example/collections/home",
    "seo": {
      "title": "Home",
      "description": "Stoneware, linen and light for the kitchen table."
    }
  },
  "products": [
    {
      "id": "cm2prod0001",
      "handle": "linen-shirt",
      "title": "Linen shirt",
      "description_html": "<p>A relaxed washed-linen shirt that gets softer with every wear.</p>",
      "vendor": "Juniper & Co.",
      "product_type": "Shirts",
      "tags": [
        "linen",
        "wardrobe",
        "summer"
      ],
      "options": [
        {
          "name": "Color",
          "values": [
            "Sand",
            "Olive"
          ]
        },
        {
          "name": "Size",
          "values": [
            "S",
            "M",
            "L",
            "XL"
          ]
        }
      ],
      "images": [
        {
          "src": "https://storeloom.example/seed/shirt-sand.svg",
          "alt": "Linen shirt"
        }
      ],
      "featured_image": {
        "src": "https://storeloom.example/seed/shirt-sand.svg",
        "alt": "Linen shirt"
      },
      "currency_code": "USD",
      "price_range": {
        "min": "58.00",
        "max": "58.00"
      },
      "compare_at_price_range": null,
      "available": true,
      "gift_card": false,
      "variants": [
        {
          "id": "cm2vari0001",
          "title": "Sand / M",
          "options": [
            "Sand",
            "M"
          ],
          "option1": "Sand",
          "option2": "M",
          "option3": null,
          "price": "58.00",
          "compare_at_price": null,
          "available": true,
          "availability": "in_stock",
          "sku": "LINEN-SHIR-02",
          "image": "https://storeloom.example/seed/shirt-sand.svg",
          "requires_shipping": true,
          "weight_grams": 240
        }
      ],
      "url": "https://demo.storeloom.example/products/linen-shirt",
      "seo": {
        "title": "Linen shirt in sand and olive",
        "description": "A relaxed washed-linen shirt that gets softer with every wear."
      },
      "published_at": "2026-08-09T10:00:00.000Z",
      "updated_at": "2026-10-22T16:20:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 24,
    "total": 9,
    "pages": 1
  }
}

Search the store#

GET/search.jsonStorefront token

Products ranked by relevance (paged), plus up to five matching collections, pages and blog posts by title. Only published content is searched.

Query parameters
ParameterDescription
qSearch words (required).
sortProducts sort (default relevance).
availabletrue for products that can be bought now (in stock, or selling on backorder).
min_price / max_pricePrice bounds, like 20.00, in the currency prices are shown in (the country's); a product matches when one variant is in range.
product_type, vendorExact match, any case. Repeat the parameter for several values.
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
pagePage number, from 1 (default 1).
limitResults per page, 1–100 (default 24).
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/search.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "query": "linen",
  "products": [
    {
      "id": "cm2prod0001",
      "handle": "linen-shirt",
      "title": "Linen shirt",
      "description_html": "<p>A relaxed washed-linen shirt that gets softer with every wear.</p>",
      "vendor": "Juniper & Co.",
      "product_type": "Shirts",
      "tags": [
        "linen",
        "wardrobe",
        "summer"
      ],
      "options": [
        {
          "name": "Color",
          "values": [
            "Sand",
            "Olive"
          ]
        },
        {
          "name": "Size",
          "values": [
            "S",
            "M",
            "L",
            "XL"
          ]
        }
      ],
      "images": [
        {
          "src": "https://storeloom.example/seed/shirt-sand.svg",
          "alt": "Linen shirt"
        }
      ],
      "featured_image": {
        "src": "https://storeloom.example/seed/shirt-sand.svg",
        "alt": "Linen shirt"
      },
      "currency_code": "USD",
      "price_range": {
        "min": "58.00",
        "max": "58.00"
      },
      "compare_at_price_range": null,
      "available": true,
      "gift_card": false,
      "variants": [
        {
          "id": "cm2vari0001",
          "title": "Sand / M",
          "options": [
            "Sand",
            "M"
          ],
          "option1": "Sand",
          "option2": "M",
          "option3": null,
          "price": "58.00",
          "compare_at_price": null,
          "available": true,
          "availability": "in_stock",
          "sku": "LINEN-SHIR-02",
          "image": "https://storeloom.example/seed/shirt-sand.svg",
          "requires_shipping": true,
          "weight_grams": 240
        }
      ],
      "url": "https://demo.storeloom.example/products/linen-shirt",
      "seo": {
        "title": "Linen shirt in sand and olive",
        "description": "A relaxed washed-linen shirt that gets softer with every wear."
      },
      "published_at": "2026-08-09T10:00:00.000Z",
      "updated_at": "2026-10-22T16:20:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 24,
    "total": 9,
    "pages": 1
  },
  "collections": [
    {
      "handle": "linen",
      "title": "All things linen",
      "url": "https://demo.storeloom.example/collections/linen"
    }
  ],
  "pages": [],
  "articles": [
    {
      "handle": "how-to-care-for-linen",
      "blog_handle": "journal",
      "title": "How to care for linen",
      "url": "https://demo.storeloom.example/blogs/journal/how-to-care-for-linen"
    }
  ]
}

Product recommendations#

GET/products/{handle}/recommendations.jsonStorefront token

Products to show with a product: related ones ("You may also like": hand-picked first, then bought together, same collection, type, vendor or tags) or complementary ones ("Goes well with", hand-picked). Needs Loom Search & Discovery; 404 without it.

Query parameters
ParameterDescription
intentrelated (default) or complementary.
limitProducts, 1–10 (default 4).
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/products/$HANDLE/recommendations.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "intent": "related",
  "products": [
    {
      "id": "cm2prod0001",
      "handle": "linen-shirt",
      "title": "Linen shirt",
      "description_html": "<p>A relaxed washed-linen shirt that gets softer with every wear.</p>",
      "vendor": "Juniper & Co.",
      "product_type": "Shirts",
      "tags": [
        "linen",
        "wardrobe",
        "summer"
      ],
      "options": [
        {
          "name": "Color",
          "values": [
            "Sand",
            "Olive"
          ]
        },
        {
          "name": "Size",
          "values": [
            "S",
            "M",
            "L",
            "XL"
          ]
        }
      ],
      "images": [
        {
          "src": "https://storeloom.example/seed/shirt-sand.svg",
          "alt": "Linen shirt"
        }
      ],
      "featured_image": {
        "src": "https://storeloom.example/seed/shirt-sand.svg",
        "alt": "Linen shirt"
      },
      "currency_code": "USD",
      "price_range": {
        "min": "58.00",
        "max": "58.00"
      },
      "compare_at_price_range": null,
      "available": true,
      "gift_card": false,
      "variants": [
        {
          "id": "cm2vari0001",
          "title": "Sand / M",
          "options": [
            "Sand",
            "M"
          ],
          "option1": "Sand",
          "option2": "M",
          "option3": null,
          "price": "58.00",
          "compare_at_price": null,
          "available": true,
          "availability": "in_stock",
          "sku": "LINEN-SHIR-02",
          "image": "https://storeloom.example/seed/shirt-sand.svg",
          "requires_shipping": true,
          "weight_grams": 240
        }
      ],
      "url": "https://demo.storeloom.example/products/linen-shirt",
      "seo": {
        "title": "Linen shirt in sand and olive",
        "description": "A relaxed washed-linen shirt that gets softer with every wear."
      },
      "published_at": "2026-08-09T10:00:00.000Z",
      "updated_at": "2026-10-22T16:20:00.000Z"
    }
  ]
}
GET/search/suggest.jsonStorefront token

Suggestions for what a shopper is typing: popular searches that start with it, products (ranked like search), collections and pages by title. Needs Loom Search & Discovery with predictive search on; 404 without it.

Query parameters
ParameterDescription
qWhat's typed (required).
resources[type]Comma-separated: query, product, collection, page (default all).
resources[limit]Products, 1–10 (default the store's setting).
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/search/suggest.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "resources": {
    "results": {
      "query": "lin",
      "queries": [
        {
          "text": "linen shirt",
          "url": "https://demo.storeloom.example/products?q=linen%20shirt"
        }
      ],
      "products": [
        {
          "id": "cm2prod0001",
          "title": "Linen shirt",
          "handle": "linen-shirt",
          "url": "https://demo.storeloom.example/products/linen-shirt",
          "image": "https://storeloom.example/seed/shirt-sand.svg",
          "price": 5800,
          "max_price": 5800,
          "compare_at_price": null,
          "available": true,
          "vendor": "Juniper & Co."
        }
      ],
      "collections": [
        {
          "title": "All things linen",
          "handle": "linen",
          "url": "https://demo.storeloom.example/collections/linen"
        }
      ],
      "pages": []
    },
    "currency": "USD"
  }
}

Localization#

Countries and currencies#

GET/localization.jsonStorefront token

The countries the store sells to, each with the currency its prices are in, for a country selector; and the request's country (country or the X-Storeloom-Country header) with its currency. Send that country with catalog and cart requests to price them there.

Query parameters
ParameterDescription
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/localization.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "localization": {
    "country": {
      "code": "CA",
      "name": "Canada"
    },
    "currency_code": "CAD",
    "available_countries": [
      {
        "code": "CA",
        "name": "Canada",
        "currency_code": "CAD"
      },
      {
        "code": "DE",
        "name": "Germany",
        "currency_code": "EUR"
      },
      {
        "code": "US",
        "name": "United States",
        "currency_code": "USD"
      }
    ]
  }
}

Content#

List pages#

GET/pages.jsonStorefront token

Published pages, alphabetically.

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/pages.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "pages": [
    {
      "id": "cm2page0001",
      "handle": "about",
      "title": "About us",
      "body_html": "<p>Juniper started at a kitchen table in Portland…</p>",
      "summary": "Juniper started at a kitchen table in Portland…",
      "template": "default",
      "url": "https://demo.storeloom.example/pages/about",
      "seo": {
        "title": "About us",
        "description": "Juniper started at a kitchen table in Portland…"
      },
      "published_at": "2026-09-01T09:00:00.000Z",
      "updated_at": "2026-10-02T12:00:00.000Z"
    }
  ]
}

Get a page by handle#

GET/pages/{handle}.jsonStorefront token
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/pages/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "page": {
    "id": "cm2page0001",
    "handle": "about",
    "title": "About us",
    "body_html": "<p>Juniper started at a kitchen table in Portland…</p>",
    "summary": "Juniper started at a kitchen table in Portland…",
    "template": "default",
    "url": "https://demo.storeloom.example/pages/about",
    "seo": {
      "title": "About us",
      "description": "Juniper started at a kitchen table in Portland…"
    },
    "published_at": "2026-09-01T09:00:00.000Z",
    "updated_at": "2026-10-02T12:00:00.000Z"
  }
}

List blogs#

GET/blogs.jsonStorefront token

Every blog with its number of published posts.

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/blogs.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "blogs": [
    {
      "id": "cm2blog0001",
      "handle": "journal",
      "title": "Journal",
      "articles_count": 3,
      "url": "https://demo.storeloom.example/blogs/journal"
    }
  ]
}

Get a blog with its posts#

GET/blogs/{handle}.jsonStorefront token

Published posts, newest first.

Query parameters
ParameterDescription
tagOnly posts with this tag.
pagePage number, from 1 (default 1).
limitResults per page, 1–100 (default 24).
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/blogs/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "blog": {
    "id": "cm2blog0001",
    "handle": "journal",
    "title": "Journal",
    "articles_count": 3,
    "url": "https://demo.storeloom.example/blogs/journal"
  },
  "articles": [
    {
      "id": "cm2arti0001",
      "blog_id": "cm2blog0001",
      "blog_handle": "journal",
      "handle": "how-to-care-for-linen",
      "title": "How to care for linen",
      "author": "Sam Rivera",
      "summary_html": "Wash cool, skip the dryer, and let it soften with time.",
      "body_html": "<p>Wash cool, skip the dryer…</p>",
      "image": null,
      "tags": [
        "care",
        "linen"
      ],
      "url": "https://demo.storeloom.example/blogs/journal/how-to-care-for-linen",
      "seo": {
        "title": "How to care for linen",
        "description": "Wash cool, skip the dryer, and let it soften with time."
      },
      "published_at": "2026-10-10T08:00:00.000Z",
      "updated_at": "2026-10-10T08:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 12,
    "total": 3,
    "pages": 1
  }
}

Get a blog post#

GET/blogs/{blog_handle}/articles/{handle}.jsonStorefront token
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/blogs/$BLOG_HANDLE/articles/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "article": {
    "id": "cm2arti0001",
    "blog_id": "cm2blog0001",
    "blog_handle": "journal",
    "handle": "how-to-care-for-linen",
    "title": "How to care for linen",
    "author": "Sam Rivera",
    "summary_html": "Wash cool, skip the dryer, and let it soften with time.",
    "body_html": "<p>Wash cool, skip the dryer…</p>",
    "image": null,
    "tags": [
      "care",
      "linen"
    ],
    "url": "https://demo.storeloom.example/blogs/journal/how-to-care-for-linen",
    "seo": {
      "title": "How to care for linen",
      "description": "Wash cool, skip the dryer, and let it soften with time."
    },
    "published_at": "2026-10-10T08:00:00.000Z",
    "updated_at": "2026-10-10T08:00:00.000Z"
  }
}

Get a menu#

GET/menus/{handle}.jsonStorefront token

The storefront's navigation: main-menu (header) and footer, or any other menu by handle. Items link to collections, products, pages, blogs, policies or web addresses; links whose target was deleted or isn't published are left out. url is absolute; path is the store-relative path for routing inside your app (null for external links).

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/menus/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "menu": {
    "handle": "main-menu",
    "title": "Main menu",
    "items": [
      {
        "id": "cm2menu0001",
        "title": "Shop",
        "url": "https://demo.storeloom.example/products",
        "path": "/products",
        "external": false,
        "items": [
          {
            "id": "cm2menu0002",
            "title": "Home",
            "url": "https://demo.storeloom.example/collections/home",
            "path": "/collections/home",
            "external": false,
            "items": []
          }
        ]
      },
      {
        "id": "cm2menu0003",
        "title": "Journal",
        "url": "https://demo.storeloom.example/blogs/journal",
        "path": "/blogs/journal",
        "external": false,
        "items": []
      }
    ]
  }
}

List policies#

GET/policies.jsonStorefront token

The store's refund, privacy, terms of service, shipping and contact policies that have text.

Request
curl "https://store.weftgrid.com/api/storefront/2026-10/policies.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "policies": [
    {
      "type": "refund",
      "title": "Refund policy",
      "handle": "refund-policy",
      "body_html": "<p>Returns within 30 days…</p>",
      "url": "https://demo.storeloom.example/policies/refund-policy"
    }
  ]
}

Carts#

Create a cart#

POST/carts.jsonStorefront token

Everything is optional. lines lists { variant_id, quantity } (quantity 1–99; adding a variant that's already in the cart adds to its quantity). Variants must be on sale, and items that stop selling at zero need the stock: otherwise a 422 names the line and says how many are available.

discount_code is checked against the cart; email and note are saved for checkout. Keep the returned token: it's the only way back to the cart.

With country (or the X-Storeloom-Country header) the cart is priced in that country's market: its currency (currency_code), prices and taxes, and checkout ships within that market. Any later cart request with a country moves the cart to that country's market.

Query parameters
ParameterDescription
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
Request body
{
  "cart": {
    "lines": [
      {
        "variant_id": "cm2vari0001",
        "quantity": 2
      }
    ],
    "discount_code": "WELCOME10"
  }
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/storefront/2026-10/carts.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cart": {
    "lines": [
      {
        "variant_id": "cm2vari0001",
        "quantity": 2
      }
    ],
    "discount_code": "WELCOME10"
  }
}'
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Get a cart#

GET/carts/{token}.jsonStorefront token

Lines with prices and availability, the discount, and totals before shipping (shipping is chosen at checkout), in the cart's currency_code. A line whose product sold out or was unpublished has available: false and a problem message, and can_checkout is false until it's removed or reduced. 404 once the cart has been checked out.

Query parameters
ParameterDescription
countryTwo-letter country code (or the X-Storeloom-Country header): prices and currency_code in the market that sells to that country. Without it, the store's own currency.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Update the buyer's details#

PUT/carts/{token}.jsonStorefront token

email and note (send null to clear). Saving an email the first time marks the checkout as started, so the store can follow up an abandoned checkout, and fires checkouts/create.

Request body
{
  "cart": {
    "email": "[email protected]",
    "note": "Please gift wrap"
  }
}
Request with curl
curl -X PUT "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cart": {
    "email": "[email protected]",
    "note": "Please gift wrap"
  }
}'
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": "[email protected]",
    "note": "Please gift wrap",
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Add lines#

POST/carts/{token}/lines.jsonStorefront token

lines lists { variant_id, quantity } (quantity 1–99; adding a variant that's already in the cart adds to its quantity). Variants must be on sale, and items that stop selling at zero need the stock: otherwise a 422 names the line and says how many are available.

Request body
{
  "lines": [
    {
      "variant_id": "cm2vari0009",
      "quantity": 1
    }
  ]
}
Request with curl
curl -X POST "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN/lines.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "lines": [
    {
      "variant_id": "cm2vari0009",
      "quantity": 1
    }
  ]
}'
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Change a line's quantity#

PUT/carts/{token}/lines/{id}.jsonStorefront token

quantity: 0 removes the line. The same stock rules apply as when adding. id is the line's id from the cart.

Request body
{
  "line": {
    "quantity": 3
  }
}
Request with curl
curl -X PUT "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN/lines/$LINE_ID.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "line": {
    "quantity": 3
  }
}'
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Remove a line#

DELETE/carts/{token}/lines/{id}.jsonStorefront token
Request
curl -X DELETE "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN/lines/$LINE_ID.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 2,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Apply a discount code#

PUT/carts/{token}/discount_code.jsonStorefront token

Customers can type the code in any case. The code has to apply to this cart now (dates, minimum spend, eligible items); otherwise a 422 gives the reason to show the buyer, like "Spend at least $30.00 to use this code." A code replaces any automatic discount. Attempts are limited to 10 per cart every 10 minutes, and to 600 every 10 minutes per storefront token.

Request body
{
  "discount_code": "welcome10"
}
Request with curl
curl -X PUT "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN/discount_code.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "discount_code": "welcome10"
}'
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": "WELCOME10",
    "discount": {
      "code": "WELCOME10",
      "title": "WELCOME10",
      "automatic": false,
      "value_type": "percentage",
      "value": "10",
      "amount": "13.80"
    },
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Remove the discount code#

DELETE/carts/{token}/discount_code.jsonStorefront token

Automatic discounts the cart qualifies for apply again.

Request
curl -X DELETE "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN/discount_code.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "cart": {
    "token": "pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "currency": "USD",
    "currency_code": "USD",
    "item_count": 3,
    "lines": [
      {
        "id": "cm2item0001",
        "variant_id": "cm2vari0001",
        "product_id": "cm2prod0001",
        "handle": "linen-shirt",
        "title": "Linen shirt",
        "variant_title": "Sand / M",
        "sku": "LINEN-SHIR-02",
        "image": "https://storeloom.example/seed/shirt-sand.svg",
        "url": "https://demo.storeloom.example/products/linen-shirt",
        "quantity": 2,
        "price": "58.00",
        "compare_at_price": null,
        "line_price": "116.00",
        "discount": "11.60",
        "final_line_price": "104.40",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      },
      {
        "id": "cm2item0002",
        "variant_id": "cm2vari0009",
        "product_id": "cm2prod0002",
        "handle": "stoneware-mug",
        "title": "Stoneware mug",
        "variant_title": "Oat",
        "sku": "STONEWARE--01",
        "image": "https://storeloom.example/seed/mug-oat.svg",
        "url": "https://demo.storeloom.example/products/stoneware-mug",
        "quantity": 1,
        "price": "22.00",
        "compare_at_price": null,
        "line_price": "22.00",
        "discount": "2.20",
        "final_line_price": "19.80",
        "requires_shipping": true,
        "gift_card": false,
        "available": true,
        "problem": null
      }
    ],
    "discount_code": null,
    "discount": null,
    "discount_error": null,
    "subtotal_price": "138.00",
    "total_discounts": "13.80",
    "total_tax": "0.00",
    "taxes_included": false,
    "total_price": "124.20",
    "requires_shipping": true,
    "total_weight_grams": 900,
    "can_checkout": true,
    "checkout_url": "https://demo.storeloom.example/cart/recover/pB1u0n2Qk1lY3m9sXy7Z0aVvQ3cS4dE5",
    "email": null,
    "note": null,
    "created_at": "2026-10-23T09:30:00.000Z",
    "updated_at": "2026-10-23T09:31:10.000Z"
  }
}

Custom data#

List metaobject entries#

GET/metaobjects/{type}.jsonStorefront token

Active entries of a definition with storefront access, oldest first.

Query parameters
ParameterDescription
pagePage number, from 1 (default 1).
limitResults per page, 1–100 (default 24).
localeOne of the store's languages (en, ur…): text fields of translatable definitions come back translated.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/metaobjects/$TYPE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "metaobjects": [
    {
      "id": "gid://storeloom/Metaobject/cm2mobj001",
      "type": "designer",
      "handle": "mira-okafor",
      "display_name": "Mira Okafor",
      "url": "https://demo.storeloom.example/pages/designers/mira-okafor",
      "fields": [
        {
          "key": "name",
          "type": "single_line_text_field",
          "value": "Mira Okafor",
          "text": "Mira Okafor"
        },
        {
          "key": "portrait",
          "type": "file_reference",
          "value": "gid://storeloom/File/cm2file001",
          "text": "mira.jpg",
          "reference": {
            "kind": "file",
            "id": "gid://storeloom/File/cm2file001",
            "url": "https://demo.storeloom.example/uploads/mira.jpg",
            "alt": "Mira at her loom",
            "mime_type": "image/jpeg",
            "media_type": "image",
            "width": 1200,
            "height": 1500
          }
        }
      ],
      "updated_at": "2026-10-31T09:05:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 24,
    "total": 3,
    "pages": 1
  }
}

Get a metaobject entry#

GET/metaobjects/{type}/{handle}.jsonStorefront token
Query parameters
ParameterDescription
localeOne of the store's languages (en, ur…): text fields of translatable definitions come back translated.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/metaobjects/$TYPE/$HANDLE.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "metaobject": {
    "id": "gid://storeloom/Metaobject/cm2mobj001",
    "type": "designer",
    "handle": "mira-okafor",
    "display_name": "Mira Okafor",
    "url": "https://demo.storeloom.example/pages/designers/mira-okafor",
    "fields": [
      {
        "key": "name",
        "type": "single_line_text_field",
        "value": "Mira Okafor",
        "text": "Mira Okafor"
      },
      {
        "key": "portrait",
        "type": "file_reference",
        "value": "gid://storeloom/File/cm2file001",
        "text": "mira.jpg",
        "reference": {
          "kind": "file",
          "id": "gid://storeloom/File/cm2file001",
          "url": "https://demo.storeloom.example/uploads/mira.jpg",
          "alt": "Mira at her loom",
          "mime_type": "image/jpeg",
          "media_type": "image",
          "width": 1200,
          "height": 1500
        }
      }
    ],
    "updated_at": "2026-10-31T09:05:00.000Z"
  }
}

List a product's metafields#

GET/products/{handle}/metafields.jsonStorefront token

Metafields of an active product whose definitions are shown on the storefront (Settings → Custom data), with references summarized.

Query parameters
ParameterDescription
localeOne of the store's languages (en, ur…): text fields of translatable definitions come back translated.
Request
curl "https://store.weftgrid.com/api/storefront/2026-10/products/$HANDLE/metafields.json" \
  -H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"
Example responseShow
{
  "metafields": [
    {
      "namespace": "custom",
      "key": "designer",
      "type": "metaobject_reference",
      "value": "gid://storeloom/Metaobject/cm2mobj001",
      "text": "Mira Okafor",
      "reference": {
        "kind": "metaobject",
        "id": "gid://storeloom/Metaobject/cm2mobj001",
        "type": "designer",
        "handle": "mira-okafor",
        "display_name": "Mira Okafor",
        "url": null
      }
    }
  ]
}

Need orders, customers or stock counts? Those are private: use the Admin API from your server.