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.
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 version2026-10). Errors have the same shape:{ "errors": … }, with field errors on 422. - Listings take
page(from 1) andlimit(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) orsold_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-Limitshows how full it is. Over the limit, the answer is 429 withRetry-Afterin 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 theX-Storeloom-Countryheader) on catalog and cart requests prices them in the market that sells to that country, with itscurrency_code, and a cart created with a country checks out in that market.GET /localization.jsonlists the countries the store sells to and their currencies.
Carts and checkout#
- 1Create a cartPOST /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. - 2Fill itAdd 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.
- 3Send the buyer to checkoutRedirect 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. - 4Start overA 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.
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#
/shop.jsonStorefront tokenName, 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.
curl "https://store.weftgrid.com/api/storefront/2026-10/shop.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/products.jsonStorefront tokenActive 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.
| Parameter | Description |
|---|---|
collection | A collection handle: only its products. |
q | Search words; every word must match the title, description, type, vendor, a tag or a SKU. |
sort | featured, relevance, title-asc, title-desc, price-asc, price-desc, created-desc, created-asc. |
available | true for products that can be bought now (in stock, or selling on backorder). |
min_price / max_price | Price 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, vendor | Exact match, any case. Repeat the parameter for several values. |
country | Two-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. |
page | Page number, from 1 (default 1). |
limit | Results per page, 1–100 (default 24). |
curl "https://store.weftgrid.com/api/storefront/2026-10/products.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/products/{handle}.jsonStorefront token404 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.
| Parameter | Description |
|---|---|
country | Two-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. |
curl "https://store.weftgrid.com/api/storefront/2026-10/products/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/collections.jsonStorefront tokenCollections with at least one active product, alphabetically, with their product counts.
curl "https://store.weftgrid.com/api/storefront/2026-10/collections.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/collections/{handle}.jsonStorefront tokenThe 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).
| Parameter | Description |
|---|---|
sort | Optional sort. |
available | true for products that can be bought now (in stock, or selling on backorder). |
min_price / max_price | Price 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, vendor | Exact match, any case. Repeat the parameter for several values. |
country | Two-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. |
page | Page number, from 1 (default 1). |
limit | Results per page, 1–100 (default 24). |
curl "https://store.weftgrid.com/api/storefront/2026-10/collections/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
- GET
/search.jsonSearch the store - GET
/products/{handle}/recommendations.jsonProduct recommendations - GET
/search/suggest.jsonPredictive search
Search the store#
/search.jsonStorefront tokenProducts ranked by relevance (paged), plus up to five matching collections, pages and blog posts by title. Only published content is searched.
| Parameter | Description |
|---|---|
q | Search words (required). |
sort | Products sort (default relevance). |
available | true for products that can be bought now (in stock, or selling on backorder). |
min_price / max_price | Price 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, vendor | Exact match, any case. Repeat the parameter for several values. |
country | Two-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. |
page | Page number, from 1 (default 1). |
limit | Results per page, 1–100 (default 24). |
curl "https://store.weftgrid.com/api/storefront/2026-10/search.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/products/{handle}/recommendations.jsonStorefront tokenProducts 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.
| Parameter | Description |
|---|---|
intent | related (default) or complementary. |
limit | Products, 1–10 (default 4). |
country | Two-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. |
curl "https://store.weftgrid.com/api/storefront/2026-10/products/$HANDLE/recommendations.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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"
}
]
}Predictive search#
/search/suggest.jsonStorefront tokenSuggestions 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.
| Parameter | Description |
|---|---|
q | What's typed (required). |
resources[type] | Comma-separated: query, product, collection, page (default all). |
resources[limit] | Products, 1–10 (default the store's setting). |
curl "https://store.weftgrid.com/api/storefront/2026-10/search/suggest.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/localization.jsonStorefront tokenThe 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.
| Parameter | Description |
|---|---|
country | Two-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. |
curl "https://store.weftgrid.com/api/storefront/2026-10/localization.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
- GET
/pages.jsonList pages - GET
/pages/{handle}.jsonGet a page by handle - GET
/blogs.jsonList blogs - GET
/blogs/{handle}.jsonGet a blog with its posts - GET
/blogs/{blog_handle}/articles/{handle}.jsonGet a blog post - GET
/menus/{handle}.jsonGet a menu - GET
/policies.jsonList policies
List pages#
/pages.jsonStorefront tokenPublished pages, alphabetically.
curl "https://store.weftgrid.com/api/storefront/2026-10/pages.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/pages/{handle}.jsonStorefront tokencurl "https://store.weftgrid.com/api/storefront/2026-10/pages/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/blogs.jsonStorefront tokenEvery blog with its number of published posts.
curl "https://store.weftgrid.com/api/storefront/2026-10/blogs.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"blogs": [
{
"id": "cm2blog0001",
"handle": "journal",
"title": "Journal",
"articles_count": 3,
"url": "https://demo.storeloom.example/blogs/journal"
}
]
}Get a blog with its posts#
/blogs/{handle}.jsonStorefront tokenPublished posts, newest first.
| Parameter | Description |
|---|---|
tag | Only posts with this tag. |
page | Page number, from 1 (default 1). |
limit | Results per page, 1–100 (default 24). |
curl "https://store.weftgrid.com/api/storefront/2026-10/blogs/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/blogs/{blog_handle}/articles/{handle}.jsonStorefront tokencurl "https://store.weftgrid.com/api/storefront/2026-10/blogs/$BLOG_HANDLE/articles/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/menus/{handle}.jsonStorefront tokenThe 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).
curl "https://store.weftgrid.com/api/storefront/2026-10/menus/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/policies.jsonStorefront tokenThe store's refund, privacy, terms of service, shipping and contact policies that have text.
curl "https://store.weftgrid.com/api/storefront/2026-10/policies.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
- POST
/carts.jsonCreate a cart - GET
/carts/{token}.jsonGet a cart - PUT
/carts/{token}.jsonUpdate the buyer's details - POST
/carts/{token}/lines.jsonAdd lines - PUT
/carts/{token}/lines/{id}.jsonChange a line's quantity - DELETE
/carts/{token}/lines/{id}.jsonRemove a line - PUT
/carts/{token}/discount_code.jsonApply a discount code - DELETE
/carts/{token}/discount_code.jsonRemove the discount code
Create a cart#
/carts.jsonStorefront tokenEverything 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.
| Parameter | Description |
|---|---|
country | Two-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. |
{
"cart": {
"lines": [
{
"variant_id": "cm2vari0001",
"quantity": 2
}
],
"discount_code": "WELCOME10"
}
}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 responseShowHide
{
"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#
/carts/{token}.jsonStorefront tokenLines 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.
| Parameter | Description |
|---|---|
country | Two-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. |
curl "https://store.weftgrid.com/api/storefront/2026-10/carts/$CART_TOKEN.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/carts/{token}.jsonStorefront tokenemail 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.
{
"cart": {
"email": "[email protected]",
"note": "Please gift wrap"
}
}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 responseShowHide
{
"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#
/carts/{token}/lines.jsonStorefront tokenlines 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.
{
"lines": [
{
"variant_id": "cm2vari0009",
"quantity": 1
}
]
}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 responseShowHide
{
"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#
/carts/{token}/lines/{id}.jsonStorefront tokenquantity: 0 removes the line. The same stock rules apply as when adding. id is the line's id from the cart.
{
"line": {
"quantity": 3
}
}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 responseShowHide
{
"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#
/carts/{token}/lines/{id}.jsonStorefront tokencurl -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 responseShowHide
{
"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#
/carts/{token}/discount_code.jsonStorefront tokenCustomers 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.
{
"discount_code": "welcome10"
}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 responseShowHide
{
"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#
/carts/{token}/discount_code.jsonStorefront tokenAutomatic discounts the cart qualifies for apply again.
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 responseShowHide
{
"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#
- GET
/metaobjects/{type}.jsonList metaobject entries - GET
/metaobjects/{type}/{handle}.jsonGet a metaobject entry - GET
/products/{handle}/metafields.jsonList a product's metafields
List metaobject entries#
/metaobjects/{type}.jsonStorefront tokenActive entries of a definition with storefront access, oldest first.
| Parameter | Description |
|---|---|
page | Page number, from 1 (default 1). |
limit | Results per page, 1–100 (default 24). |
locale | One of the store's languages (en, ur…): text fields of translatable definitions come back translated. |
curl "https://store.weftgrid.com/api/storefront/2026-10/metaobjects/$TYPE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/metaobjects/{type}/{handle}.jsonStorefront token| Parameter | Description |
|---|---|
locale | One of the store's languages (en, ur…): text fields of translatable definitions come back translated. |
curl "https://store.weftgrid.com/api/storefront/2026-10/metaobjects/$TYPE/$HANDLE.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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#
/products/{handle}/metafields.jsonStorefront tokenMetafields of an active product whose definitions are shown on the storefront (Settings → Custom data), with references summarized.
| Parameter | Description |
|---|---|
locale | One of the store's languages (en, ur…): text fields of translatable definitions come back translated. |
curl "https://store.weftgrid.com/api/storefront/2026-10/products/$HANDLE/metafields.json" \
-H "X-Storeloom-Storefront-Access-Token: $STOREFRONT_TOKEN"Example responseShowHide
{
"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.