Referência de temas
Todos os objetos e campos que um tema Liquid recebe em cada página da loja hospedada, gerados a partir do código da plataforma.
Este é o contrato entre a plataforma e um tema Liquid: quais tipos de página existem, em que endereço, e exatamente quais objetos e campos cada um recebe. A página é gerada a partir do código da plataforma, então não se desvia dele. Para os conceitos (seções, formulários, o portal, o SDK) leia Temas e o SDK da loja.
As descrições dos campos ficam em inglês, como o código de onde saem.
Como ler as tabelas
- Tipo.
string,number,boolean,json(dados livres, como as configurações do tema),array of X(percorra com{% for x in lista %}), ou um link para o objeto. Dinheiro é sempre um número inteiro de centavos; datas são texto RFC 3339. - or nil. A chave sempre existe e o valor pode ser nil. Teste com
{% if x.chave %}e dê um valor padrão comdefault. - may be absent. A chave só existe quando algo é verdade (há cliente conectado, o produto tem imagem...). Na visualização e no editor o Liquid estrito falha a página quando um template imprime ou filtra uma chave ausente, como em
{{ shop.email }}ou{{ shop.email | default: "" }}, para você ver o erro; a loja publicada mostra vazio e registra no log.{% if shop.email %}é seguro em todo lugar, então teste antes. - Um global que não está na página (
productfora da página de produto) é ausente do mesmo jeito. Os arquivos de seção são compartilhados por todas as páginas, então proteja o que é de um só tipo de página com{% if product %}. - O texto "empty string" indica uma chave de texto que vale
""quando não há valor. Ela nunca falha a página.
Tipos de página
O endereço é o padrão; todo link que a plataforma gera usa ele, e as grafias antigas em inglês (/products/x, /cart) redirecionam para ele de forma permanente. O tema fornece o template, ou a plataforma renderiza a página (o portal do cliente) dentro do layout do tema.
| Template | Endereço | Objetos da página | O que é |
|---|---|---|---|
index | / | products, new_products, collections | A página inicial da loja: banners, produtos em destaque e categorias. |
collections | /categorias | collections | A lista de todas as categorias. |
all_products | /produtos | products, listing, paginate | O catálogo inteiro. Quando a seção da página lê paginate (a do tema padrão lê), o servidor ordena, filtra e pagina; senão isso acontece no navegador. |
collection | /categorias/{handle}/{taxonomy}/{term} | collection, listing, paginate | Uma categoria e seus produtos. Um termo de taxonomia (marca, material...) em /{taxonomy}/{term} usa o mesmo template, com uma coleção montada na hora. |
product | /produtos/{handle} | product | Um produto: galeria, variantes, preço, avaliações e especificações. Só têm página os produtos ativos, com uma variante ativa, vendidos no canal web. |
cart | /carrinho | nenhum além dos globais | O carrinho e as etapas do checkout. |
search | /busca | search | Resultados da busca de ?q=, 24 por página, ordenados por relevância, preço ou data. |
wishlist | /favoritos | wishlist | Os produtos que o visitante (ou o cliente que entrou) salvou. Um tema sem template de favoritos responde 404 neste endereço. |
booking | /agendar | nenhum além dos globais | O agendamento de um serviço da loja: um horário com um profissional, os dados do cliente e, quando o serviço pede sinal, o Pix dele. O endereço só responde enquanto a loja recebe agendamentos online e o tema tem um template de agendamento; fora disso, 404. |
page | /{slug}/{page}/{entry} | page, entry, entries | Uma página pelo identificador: uma criada no painel, um arquivo pages/<slug>.html do tema, uma página feita no editor do site, as páginas de privacidade e de trocas geradas pela plataforma, ou a entrada de uma página de CMS. |
order_success | /pedidos/{order_id} | order | Onde o checkout termina quando o pedido existe: a página de agradecimento, com os dados para eventos de rastreamento. |
404 | qualquer endereço que nada mais atende | nenhum além dos globais | Qualquer endereço que nada mais atende, respondido com status 404. Um tema com template 404 o renderiza; um tema sem ele recebe o 404 simples. |
account | /conta | portal | O início do portal do cliente: pedidos recentes e o que o cliente comprou. Renderizada pela plataforma dentro do layout do tema. |
account_orders | /conta/pedidos | portal | Os pedidos do cliente, do mais novo ao mais antigo (até 50). |
account_order | /conta/pedidos/{number} | portal | Um pedido: etapas, pagamento, entrega, remessas com rastreio, o DANFE e as cartas de correção. |
account_products | /conta/produtos | portal | O que o cliente comprou, item a item, com a etapa de cada um. |
account_login | /conta/entrar | portal | Entrada por código de uso único. Qualquer endereço da conta mostra esta página a quem não entrou. |
account_profile | /conta/dados | portal | Nome, telefone, documento, endereço de entrega e consentimentos do cliente. |
account_wallet | /conta/carteira | portal | O crédito do cliente na loja e o que nele vence, o cashback que aguarda liberação, os pontos, o nível com o progresso até o próximo e o histórico de cada um. |
account_tracking | /rastreio | portal | Acompanhar um pedido sem entrar na conta: o comprador informa o número do pedido e o e-mail ou CPF da compra e vê a situação, os itens, o pagamento e os envios com os códigos de rastreio. Abre para qualquer pessoa, com ou sem conta. |
Objetos em toda página
Estes existem em todo tipo de página, no layout, nos templates e nas seções. Uma linha marcada may be absent só existe quando a condição da descrição é verdadeira.
| Nome | Tipo | Descrição |
|---|---|---|
shop | Shop | The store. |
request | Request | The page being rendered. |
routes | Routes | The store's addresses. |
cart | Cart or nil | The visitor's open cart. Nil when there is none, except on the cart page, which always gets a cart (empty when needed). |
customer | Customer, may be absent | The signed-in customer. The key is absent when nobody is signed in: test it with {% if customer %}. |
products | array of Product | A list of products: the first 12 on the home page; on the all-products page the current page's products (filtered and sorted as the address asks) when its section reads paginate, else the whole catalog (up to 500). An empty list elsewhere. |
new_products | array of Product | The 8 newest products on the home page. An empty list elsewhere. |
listing | Listing or nil | The product list of a category, taxonomy or all-products page whose section reads paginate: its filters with counts, its order and the addresses that change them. Nil elsewhere. |
paginate | Paginate or nil | The pages of that list (?pagina=N). Nil elsewhere. |
collections | array of Collection | Every collection on the home page and the categories list. An empty list elsewhere. |
template | Template | The page type in Shopify's naming, so layouts can branch with {% if template.name == 'product' %}. |
page_title | string | The page's title: the product, collection or page title, a fixed one for built-in pages ("Busca", "Carrinho"), or the store's name. Pages made in the site editor can set their own. |
page_description | string | A plain-text description of the page (at most 160 characters) from the product description or the page body; empty string when there is none. Pages made in the site editor can set their own. |
settings | json | The theme settings: config/settings_schema.json defaults merged with the values in config/settings_data.json, read as settings.<id>. The keys are the theme's own. |
locale | Locale | The language in use: code and the flattened translation strings that the t filter reads (locale.strings['cart.title']). |
deployment_version | string | A cache-buster that changes with each deployment, to append to asset URLs: /assets/style.css?v={{ deployment_version }}. Empty string for the built-in default theme. |
discounts | StorefrontDiscountsSummary | The best active PIX and card rules of the store, on every page so a listing can show "8% off with PIX" without another request. |
cms | map of array of CmsDocument | Every active CMS collection by slug, each an array of documents: {% for v in cms.hero_videos %}. Slugs with hyphens are also reachable with underscores. |
forms | map of Form | The store's active forms by slug: forms.contato, forms['fale-conosco']. Empty object when there are none. |
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
brand | Brand or nil | The store's brand profile as plain data (brand.identity.name, brand.colors.primary.value, brand.assets.logo_url...). Nil when the store has no profile yet. |
menus | map of Menu | The site's menus by handle: menus.main.items. |
canonical_url | string | The page's absolute canonical address, for <link rel="canonical">. |
og_image | string, may be absent | Absolute address of the share image: the page's own, else the product's first image. Absent when there is none. |
Só em alguns arquivos
Estes existem onde a plataforma renderiza esse tipo de arquivo.
| Nome | Tipo | Descrição |
|---|---|---|
content_for_layout | string | The page's rendered HTML. Only in layout/theme.liquid: print it with {{ content_for_layout }}. |
section_groups | map of string | The rendered HTML of each section group by name (header-group, footer-group...). Only in layout/theme.liquid; {% sections 'header-group' %} prints one. |
section | Section | The section being rendered. Only inside a section file (sections/<type>.liquid). |
Página por página
O que cada tipo de página recebe além dos objetos que existem em toda página.
Página inicial
A página inicial da loja: banners, produtos em destaque e categorias.
- Template:
index,templates/index.jsonoutemplates/index.liquidno tema.template.nameéindex. - Endereço:
/
products traz os 12 primeiros produtos e new_products os 8 mais novos. Os produtos vêm sem opções, avaliações e especificações.
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
products | array of Product | A list of products: the first 12 on the home page; on the all-products page the current page's products (filtered and sorted as the address asks) when its section reads paginate, else the whole catalog (up to 500). An empty list elsewhere. |
new_products | array of Product | The 8 newest products on the home page. An empty list elsewhere. |
collections | array of Collection | Every collection on the home page and the categories list. An empty list elsewhere. |
Categorias
A lista de todas as categorias.
- Template:
collections,templates/collections.jsonoutemplates/collections.liquidno tema.template.nameécollections. - Endereço:
/categorias
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
collections | array of Collection | Every collection on the home page and the categories list. An empty list elsewhere. |
Todos os produtos
O catálogo inteiro. Quando a seção da página lê paginate (a do tema padrão lê), o servidor ordena, filtra e pagina; senão isso acontece no navegador.
- Template:
all_products,templates/all_products.jsonoutemplates/all_products.liquidno tema.template.nameélist-collections. - Endereço:
/produtos
Com uma seção que lê paginate, products traz a página atual (?pagina=N, do tamanho que a seção pede), filtrada e ordenada como o endereço pede, e listing e paginate descrevem a lista; senão até 500 produtos, e os dois são nil. Os produtos vêm sem opções, avaliações e especificações. Aqui template.name é list-collections.
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
products | array of Product | A list of products: the first 12 on the home page; on the all-products page the current page's products (filtered and sorted as the address asks) when its section reads paginate, else the whole catalog (up to 500). An empty list elsewhere. |
listing | Listing or nil | The product list of a category, taxonomy or all-products page whose section reads paginate: its filters with counts, its order and the addresses that change them. Nil elsewhere. |
paginate | Paginate or nil | The pages of that list (?pagina=N). Nil elsewhere. |
Categoria
Uma categoria e seus produtos. Um termo de taxonomia (marca, material...) em /{taxonomy}/{term} usa o mesmo template, com uma coleção montada na hora.
- Template:
collection,templates/collection.jsonoutemplates/collection.liquidno tema.template.nameécollection. - Endereço:
/categorias/{handle},/{taxonomy}/{term}
Com uma seção que lê paginate, collection.products traz a página atual (?pagina=N), filtrada e ordenada como o endereço pede, e listing e paginate descrevem a lista; senão todos os produtos da categoria, e os dois são nil. Uma visão filtrada ou reordenada aponta a página sem filtros como canônica e não é indexada.
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
collection | Collection | The collection (or the synthesized collection of a taxonomy term). Only on collection pages. |
listing | Listing or nil | The product list of a category, taxonomy or all-products page whose section reads paginate: its filters with counts, its order and the addresses that change them. Nil elsewhere. |
paginate | Paginate or nil | The pages of that list (?pagina=N). Nil elsewhere. |
collection (Collection)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The collection's UUID. A taxonomy filter page gets a synthesized collection. |
title | string | The collection's name. |
handle | string | The collection's URL slug. |
products | array of Product | The active products on the web channel, by priority and then the collection's own order. Each product is loaded without options, reviews or specifications. On a category page whose section reads paginate, only the current page's products, filtered and sorted as the address asks; in a section setting, as many as the section shows. |
description | string or nil | The collection's description. Nil when none. |
image | ProductImage, may be absent | The first image of the first product that has one. The key is absent when no product has an image. |
products_count | number, may be absent | Products that match the address's filters, on every page (Shopify's collection.products_count). Only on a category page that pages on the server. |
all_products_count | number, may be absent | Products in the category without filters. Only on a category page that pages on the server. |
filters | array of Filter, may be absent | The filters of the page (see listing.filters). Only on a category page that pages on the server. |
sort_by | string, may be absent | The order in force (see listing.sort_by). Only on a category page that pages on the server. |
Produto
Um produto: galeria, variantes, preço, avaliações e especificações. Só têm página os produtos ativos, com uma variante ativa, vendidos no canal web.
- Template:
product,templates/product.jsonoutemplates/product.liquidno tema.template.nameéproduct. - Endereço:
/produtos/{handle}
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
product | Product | The product. Only on product pages. |
product (Product)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The product's UUID. |
title | string | The product's title. |
handle | string | The product's URL slug: its page is {{ routes.products_url }}/{{ product.handle }}. |
product_type | string | Always product for now, because there is no product type field yet. |
vendor | string | The brand name set on the product; empty string when none. |
available | boolean | True when any variant can be bought now: in stock or made on demand, by the cart's own rule (a product built from parts sells when its parts could make it or the missing parts can be bought). The product card shows its "Esgotado" badge when this is false. |
created_at | string | When the product was created, as an RFC 3339 timestamp. |
updated_at | string | When the product was last changed, as an RFC 3339 timestamp. |
tags | array of string | Always empty for now, because products have no tags yet. |
category_slugs | array of string | Slugs of every category the product belongs to. A theme can build visual rules on them (a star on products of the "destaque" category) without the platform deciding what a category means. |
highlights | array of string | The bullet-point highlights typed in the admin. |
variants | array of ProductVariant | The active variants, in the order set in the admin. |
options | array of ProductOption | Option groups (Cor / Tamanho / …) with their selectable values and swatches. Empty for products without structured options. Each group's position aligns with the variants' option1/option2/option3. |
featured_image | ProductImage, may be absent | The image with the lowest position (videos are passed over); a video, whose src_large is its poster, only when the product has no image. The key is absent when the product has no media. |
selected_variant | ProductVariant, may be absent | The variant the page's ?variant=<id> names, when it is one of this product's; otherwise the first variant that can be bought now (in stock or made to order), or the first variant when none can. The key is absent when the product has no variants. On a product page it is the variant to show selected: the server renders it, so its price and availability are in the HTML before any script runs. |
selected_or_first_available_variant | ProductVariant, may be absent | The same as selected_variant, under the name Shopify's Dawn themes use. |
images | array of ProductImage | The product's media (images and videos) in gallery order. See media_type. |
price_range | PriceRange | Lowest and highest price the customer pays across the variants, in cents (the card price, see variant.final_price). |
lowest_price_variant | ProductVariant or nil | The variant a product list prices the product by: the lowest final_price among the variants that can be bought now (in stock or made to order), or among all of them when none can. Nil when the product has no variants. Cards print its prices, and the category page sorts by its final_price. |
price_varies | boolean | True when the variants counted in lowest_price_variant do not all cost the same: a card then says "a partir de" before the price. |
description | string or nil | The description as rich HTML, sanitized (no scripts or inline handlers), so it is safe to print unescaped. Nil when the product has none. |
short_description | string | A one-line description to show above the highlights; empty string when not set (and in product lists). |
compare_at_price_range | PriceRange, may be absent | Not filled yet, so the key is always absent. Read variant.compare_at_price instead. |
fields | array of Field | The details the store shows for this product (material, warranty, dimensions): the fields it defined with "show on storefront" that have a value, in the admin's order. Each carries its own label, so a theme can loop without knowing the store's fields. Also available by key as product.field.<key>. |
field | map of Field | The same fields by key: product.field.tipo_de_madeira.value. Nil for a key the product has no value for. |
reference_tables | array of ReferenceTable | The store's reference tables this product shows, in order: palettes of swatches, size charts and dimension tables, its own first, then those of its categories and collections (a product's own table of a kind replaces the inherited ones of that kind). Empty in product lists. |
promotions | array of ProductPromotion | The store's automatic promotions this product takes part in (buy X get Y, progressive tiers), for a badge: each has name, kind (buy_x_get_y or tiered) and label, the offer in a few words ("Leve 3 pague 2"). Empty in product lists. |
specifications | array of SpecGroup | Specifications grouped as in the admin. Groups without a field that has a value for this product are left out, so a theme can loop without checking for empty groups. Empty in product lists. |
bought_together | BoughtTogether or nil | Compre junto: the products the page offers with this one (the merchant's, else what is bought with it) and the discount on the set. Nil in product lists and when there is nothing to offer. |
suggested_products | array of Product | Up to 12 related products chosen in the admin, loaded without their own options, reviews or specifications. Empty in product lists. |
reviews | array of Review | The product's approved reviews, newest first, at most 50. Empty in product lists. |
rating_summary | RatingSummary | Counts and average of the approved reviews. Zeros in product lists. |
highlight_video_url | string or nil | A short video that the storefront shows as a floating picture-in-picture widget on the product page. Nil when there is none, and in product lists. |
highlight_video_poster_url | string or nil | Cover image of the highlight video; nil when there is none. |
is_gift_card | boolean | True when the product is a gift card: each variant is a face value with no stock, and the product page asks who it is for and adds it through the cart API's gift card endpoint. |
gift_card_custom_amount | boolean | True on a gift card product whose buyer may type the amount (R$ 10,00 to R$ 50.000,00) instead of picking a variant: the product page then shows an amount field. |
subscription_options | array of SubscriptionOption | The intervals the product can be subscribed to at (each unit, count and a Portuguese label); empty when it is not sold by subscription. The product page shows a subscribe form from it. |
highlight_video_provider | string or nil | youtube, vimeo, upload or external; nil when the product has no highlight video. |
model_url | string | The URL of a 3D model (.glb or .gltf); a theme can render a <model-viewer> from it. Empty string when the product has none, and in product lists. |
model_placement | string | Where AR places the model: floor (the default) or wall. |
Carrinho
O carrinho e as etapas do checkout.
- Template:
cart,templates/cart.jsonoutemplates/cart.liquidno tema.template.nameécart. - Endereço:
/carrinho
Nesta página cart nunca é nil: quem não tem carrinho recebe um vazio, com os valores padrão.
cart (Cart)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The cart's UUID. |
subtotal_price | number | Sum of the lines, in cents, before shipping and discounts. |
shipping_price | number | Shipping in cents: the selected freight option or the pickup fee. 0 until one is chosen. |
discount_cents | number | Discount in cents already applied to total_price. |
discount_code | string or nil | The coupon code the shopper applied, which discount_cents comes from; nil when there is none. |
discount_code_issue | string or nil | Why the coupon in discount_code gives nothing now: already_used, first_purchase_only or not_eligible_customer (the shopper may sign in or remove it). Nil while it applies. |
promotions | array of CartPromotion | The automatic promotions the cart gets (buy X get Y, progressive tiers), each with its name and amount_cents; already taken off total_price. Empty when none applies. |
promotion_cents | number | What the promotions take off together, in cents; 0 when none applies. |
promotion_progress | array of PromotionProgress | What the cart still needs for a promotion's next step ("faltam R$ 120 para 10% off", "leve mais 1 e ganhe 1"). Empty when no promotion has a next step for this cart. |
total_price | number | What checkout will charge, in cents: the subtotal plus shipping minus the discount, after the store's price rounding. |
item_count | number | Number of items, counting quantities: two units of one variant count 2. |
currency | string | ISO 4217 currency code of the cart. |
requires_shipping | boolean | True when at least one line is a physical product. False for carts of only digital goods or gift cards. |
has_gift_card | boolean | The cart buys gift cards: no coupon, no credit and no discount apply. |
freight_options | array of FreightQuoteOption | Shipping options quoted for destination_postal_code; empty until a quote is made. |
items | array of CartItem | The lines in the cart, oldest first. |
destination_postal_code | string | The CEP the shipping was quoted for; empty string until one is quoted. |
selected_freight_option_id | string | The option_id of the chosen entry of freight_options; empty string when none is chosen. |
discount_previews | array of DiscountPreview | For each payment method with an automatic rule that applies to this cart, what the rule would take off. It drives copy like "8% off with PIX". Empty array when no rule matches. |
contact_draft | ContactDraft | The buyer's contact and address fields as last saved, to pre-fill checkout so its first render is already complete. |
fulfillment_method | string | shipping (the default) or pickup. With pickup there is no delivery address, pickup_location_id names the chosen location and shipping_price is that location's fee (usually 0). |
pickup_location_id | string | The chosen pickup location's id when fulfillment_method is pickup; empty string otherwise. |
pickup_locations | array of PickupLocation | The store's locations that accept pickup (active and pickup-enabled), by position. |
wholesale_issues | array of WholesaleIssue | What keeps a reseller's cart from checking out under their group's rules (a minimum order, a minimum quantity or pack of a product, a product their group does not buy). Empty when nothing does, and for every other shopper. Show each message; checkout refuses while any is left. |
is_quote | boolean | True for a quote (payment link) cart that the seller prepared, false for ordinary carts. On a quote the lock_* keys and max_installments carry the seller's terms. |
lock_price | boolean | Quote carts only: the seller fixed the prices. False on ordinary carts. |
lock_freight | boolean | Quote carts only: the seller fixed the shipping option. False on ordinary carts. |
lock_address | boolean | Quote carts only: the seller fixed the delivery address. False on ordinary carts. |
max_installments | number or nil | The most installments the customer can pick: the store's maximum, lowered by a quote's cap. Nil only on the empty cart given to a visitor who has none. |
min_installment_cents | number | The store's smallest installment, in cents. |
installment_plan | array of InstallmentOption | The installments the cart's card total can be paid in (a quote's cap included), the store's interest included: the same numbers checkout charges. Empty on the empty cart given to a visitor who has none. |
free_shipping | FreeShipping or nil | The store's free shipping for this cart, from its shipping rules, at the cart's CEP (the last quoted one, else the one typed at checkout; before either, only rules for every destination count). Nil when no free-shipping rule can apply to the cart. |
offers | array of CartOffer | Products the cart offers ("adicione e ganhe"): the store's cart offers, then what would reach free shipping (or a promotion's next step), without the products already in the cart. Each has product (as in lists), headline, discount_percent (0 for none) and reason (offer, free_shipping or promotion). Empty when there is nothing to offer, and on an empty cart. |
scheduled_on | string | The day the shopper asked the order to be sent (YYYY-MM-DD), saved through the cart API's scheduled-date; empty string for as soon as possible. |
scheduling_enabled | boolean | True when the store takes scheduled orders: checkout may offer a date field between scheduling_earliest_on and scheduling_latest_on. |
scheduling_earliest_on | string | The first day a scheduled order may be asked for (YYYY-MM-DD, today plus the store's lead time); empty string when the store does not take scheduled orders. |
scheduling_latest_on | string | The last day a scheduled order may be asked for (YYYY-MM-DD, a year from today); empty string when the store does not take scheduled orders. |
Busca
Resultados da busca de ?q=, 24 por página, ordenados por relevância, preço ou data.
- Template:
search,templates/search.jsonoutemplates/search.liquidno tema.template.nameésearch. - Endereço:
/busca
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
search | Search | The search results. Only on the search page. |
search (Search)
| Chave | Tipo | Descrição |
|---|---|---|
terms | string | The search text (?q=), trimmed. |
performed | boolean | True when there were terms to search for. |
results_count | number | How many products match, across all pages. |
page | number | The current page, starting at 1 (?page=). |
pages | number | How many pages of 24 results there are, at least 1. |
sort | string | The order in use (?sort=): relevance (the default), price-asc, price-desc or newest. |
results | array of Product | The current page's products, loaded without options, reviews or specifications. |
Favoritos
Os produtos que o visitante (ou o cliente que entrou) salvou. Um tema sem template de favoritos responde 404 neste endereço.
- Template:
wishlist,templates/wishlist.jsonoutemplates/wishlist.liquidno tema.template.nameéwishlist. - Endereço:
/favoritos
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
wishlist | Wishlist | The saved products. Only on the favorites page. |
wishlist (Wishlist)
| Chave | Tipo | Descrição |
|---|---|---|
products | array of Product | The saved products, newest first. Empty in previews. |
count | number | How many products are saved. |
signed_in | boolean | True when the list belongs to a signed-in customer. |
alerts | boolean | True when the customer can get price and stock alerts for the list. |
shared | boolean | True on a list somebody shared by link (/favoritos/compartilhada/{token}): then products and owner_name are theirs, signed_in and alerts are false, and a link that no longer works shows no products. |
owner_name | string | The first name of the customer who shared the list; empty when it is not a shared list or they have none. |
Agendamento
O agendamento de um serviço da loja: um horário com um profissional, os dados do cliente e, quando o serviço pede sinal, o Pix dele. O endereço só responde enquanto a loja recebe agendamentos online e o tema tem um template de agendamento; fora disso, 404.
- Template:
booking,templates/booking.jsonoutemplates/booking.liquidno tema.template.nameébooking. - Endereço:
/agendar
A página não carrega nada no servidor: o script dela lê os serviços e os horários livres da API da loja (/v1/storefront/bookings/..., o grupo bookings do SDK).
Página de conteúdo
Uma página pelo identificador: uma criada no painel, um arquivo pages/<slug>.html do tema, uma página feita no editor do site, as páginas de privacidade e de trocas geradas pela plataforma, ou a entrada de uma página de CMS.
- Template:
page,templates/page.jsonoutemplates/page.liquidno tema.template.nameépage. - Endereço:
/{slug},/{page}/{entry}
entries (a lista) existe em uma página de CMS e entry (um documento) no endereço /{page}/{entry}. Páginas feitas no editor do site têm page sem content.
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
page | Page | The page's content. Only on content pages (and on pages made in the site editor, without a body). |
entry | CmsDocument | The CMS document of an entry address. Only on the entry view of a CMS page. |
entries | array of CmsDocument | The documents of the page's CMS collection. Only on a CMS page's list view. |
page (Page)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The page's UUID. |
title | string | The page's title. |
handle | string | The page's URL slug. |
content | string | The page body as HTML, sanitized (no scripts or inline handlers). Empty for pages made in the site editor, whose content is their sections. |
author | string, may be absent | The author's name. The key is absent when the page has none. |
published_at | string, may be absent | When the page was published, as an RFC 3339 timestamp. The key is absent when unknown. |
entries (CmsDocument)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The document's UUID. |
slug | string or nil | The document's slug, used in entry addresses; nil when it has none. |
position | number | The order set in the admin; documents arrive sorted by it. |
url | string, may be absent | The document's entry address. Only on the documents of a CMS page's entries. |
Pedido confirmado
Onde o checkout termina quando o pedido existe: a página de agradecimento, com os dados para eventos de rastreamento.
- Template:
order_success,templates/order_success.jsonoutemplates/order_success.liquidno tema.template.nameéorder_success. - Endereço:
/pedidos/{order_id}
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
order | OrderSummary | The order just placed. Only on the order confirmation page. |
order (OrderSummary)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The order's UUID. |
item_variant_ids | array of string | Variant UUIDs of the order's items. They match the id of the Meta catalog feed, so a Purchase event can send catalog-matching content_ids. |
item_quantities | array of number | The quantity of each of those lines, in the same order as item_variant_ids. |
item_count | number | Total quantity of items in the order. |
meta_browser_purchase | boolean | Whether the page fires the browser Meta pixel's Purchase for this order. False for a sale credited to a click-to-WhatsApp ad conversation: the server reports it to Meta through the conversation (the business-messaging dataset), and a browser Purchase would count it twice. A theme that fires its own fbq('track', 'Purchase') checks it first. |
number | string or nil | The order number shown to the customer; nil when the order has none. |
total_cents | number | Order total in cents. |
subtotal_cents | number | Sum of the items in cents, before shipping and discounts. |
shipping_cents | number | Shipping in cents. |
discount_cents | number | Discounts in cents. |
currency | string | ISO 4217 currency code of the order. |
payment_status | string or nil | The payment status, such as captured once paid; nil when unknown. |
fulfillment_status | string or nil | The fulfillment status; nil when unknown. |
customer_name | string or nil | The customer's name; nil when unknown. |
customer_email | string or nil | The customer's e-mail; nil when unknown. |
created_at | string | When the order was placed, as an RFC 3339 timestamp. |
status | string | The order's status: pending (waiting for payment), paid, fulfilled, cancelled or refunded. |
payment_state | string | Where the payment stands, for the page to branch on: paid, waiting (a PIX to pay, see pix_code, a boleto to pay, see boleto_url and boleto_line, or a card to finish on the gateway's page, see payment_redirect_url), processing (a card the gateway is still deciding), failed (the last attempt was refused or its PIX lapsed, see refusal_message), unpaid (no attempt yet), cancelled, refunded or partially_refunded. |
payable | boolean | True when a new payment can be made for the order (pay_url): it still waits for one. |
payment_method | string or nil | The last payment attempt's method (pix, card, boleto); nil before any. |
pix_code | string or nil | The PIX "copia e cola" code while payment_state is waiting by PIX; nil otherwise. |
pix_qr | string or nil | The PIX QR code as an image URL (data:image/png;base64,...) while it waits; nil otherwise. |
pix_expires_at | string or nil | When the PIX code stops working, as an RFC 3339 timestamp; nil when there is none. |
payment_redirect_url | string or nil | The gateway's page where a card payment is finished (Asaas), while it waits; nil otherwise. |
boleto_url | string or nil | The boleto to print or save (a PDF or the gateway's page) while payment_state is waiting by boleto; nil otherwise. |
boleto_line | string or nil | The boleto's linha digitável (47 digits, no separators), to paste in a bank app, while it waits; nil otherwise. |
boleto_line_formatted | string or nil | The linha digitável grouped as printed on a boleto (23793.38128 60000.000003 ...), while it waits; nil otherwise. |
boleto_barcode | string or nil | The boleto's barcode (44 digits) while it waits; nil otherwise. |
boleto_due_date | string or nil | When the boleto is due (YYYY-MM-DD) while it waits; nil otherwise. |
boleto_pix_code | string or nil | A PIX "copia e cola" code that pays the same boleto, when the gateway issues one; nil otherwise. |
boleto_pix_qr | string or nil | That PIX as a QR code image URL (data:image/png;base64,...); nil otherwise. |
boleto_expires_at | string or nil | Until when the order waits for its boleto (the due date plus the days a bank takes to report a payment), as an RFC 3339 timestamp; nil when no boleto waits. |
refusal_message | string or nil | Why the last attempt failed, in the shopper's words, when payment_state is failed; nil otherwise. |
refunded_cents | number | What was refunded, in cents (0 when nothing was). |
pay_url | string | The endpoint that starts a new payment for the order (POST, same body as the cart's payment). It carries the order's token when the page was opened from the store's link; without it only the browser that holds the order's cart can start a new charge (others get order_access_required). |
payment_status_url | string | The endpoint to poll for the payment's state (GET, state as payment_state above). |
loyalty | OrderLoyalty or nil | What the order earns in the store's loyalty program (points, cashback) and when; nil when it earns nothing. |
Não encontrada
Qualquer endereço que nada mais atende, respondido com status 404. Um tema com template 404 o renderiza; um tema sem ele recebe o 404 simples.
- Template:
404,templates/404.jsonoutemplates/404.liquidno tema.template.nameé404. - Endereço: qualquer endereço que nada mais atende
Conta
O início do portal do cliente: pedidos recentes e o que o cliente comprou. Renderizada pela plataforma dentro do layout do tema.
- Template:
account, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/account. - Endereço:
/conta
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
portal (Portal)
| Chave | Tipo | Descrição |
|---|---|---|
store | string | The store's slug. |
store_name | string | The store's name. |
signed_in | boolean | True when a customer is signed in. |
whatsapp | boolean | True when sign-in codes can be sent by WhatsApp. |
return_to | string | The address to come back to after signing in. |
logout_url | string | Endpoint that signs out: submit a POST form to it. |
api_url | string | Base of the Storefront API for the portal's scripts. |
storefront_key | string or nil | The publishable storefront key; nil when the lookup failed. |
profile_url | string | Storefront API address of the customer's profile. |
urls | PortalUrls | The portal's own pages. |
sign_in_providers | array of json | The sign-in buttons the store switched on (Google, Apple), each key, label and url (slug based: a plain link starts the sign-in); empty when the customer is signed in or none is on. |
sign_in_error | string or nil | Why a sign-in with Google or Apple did not finish, in the shopper's words (from ?entrar=); nil otherwise. Set on account_login. |
help | PortalHelp or nil, may be absent | How to reach the store, from its WhatsApp channel and company data. Only for a signed-in customer; nil when the store has neither. |
customer | PortalCustomer, may be absent | The signed-in customer's profile. Absent when nobody is signed in. |
data_url | string, may be absent | Where the customer downloads a copy of their data (LGPD). Only for a signed-in customer. |
privacy_requests_url | string, may be absent | Storefront API address of the customer's privacy requests. Only for a signed-in customer. |
privacy_open | array of json, may be absent | The customer's open privacy requests (kind, created_at). Only for a signed-in customer. |
deletion_open | boolean, may be absent | True when a data deletion request is open. Only for a signed-in customer. |
saved_cards | array of json, may be absent | The cards the customer kept at checkout (id, brand, last4, expiry as MM/AA or nil, usable when the store's card gateway can charge it). Filled only on account_profile; empty elsewhere. Only for a signed-in customer. |
cards_url | string, may be absent | Storefront API address of the customer's saved cards (DELETE <cards_url>/<id> removes one). Only for a signed-in customer. |
order | PortalOrder or nil, may be absent | The order on the order page (nil when it was not found). Only on account_order. |
tracking | PortalTracking, may be absent | The guest tracking form and the order it found. Only on account_tracking. |
orders | array of PortalOrderItem, may be absent | The customer's orders, newest first, at most 50. Only on account, account_orders and account_products. |
products | array of json or nil, may be absent | What the customer bought, item by item, with its stage. Only on account and account_products. |
loyalty | PortalLoyalty or nil, may be absent | Points, cashback, store credit, tier and the referral link of the signed-in customer. On account (totals) and account_wallet (with every history); nil when it could not be read. |
subscriptions | array of PortalSubscriptionItem, may be absent | The customer's running subscriptions (active or paused; cancelled ones are left out), with the words and dates ready. Only on account. |
bookings | PortalBookings, may be absent | The customer's bookings: what is coming up and the last few past ones. Only on account. |
Pedidos da conta
Os pedidos do cliente, do mais novo ao mais antigo (até 50).
- Template:
account_orders, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/orders. - Endereço:
/conta/pedidos
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
portal.orders (PortalOrderItem)
| Chave | Tipo | Descrição |
|---|---|---|
number | string or nil | The order number. |
status | string | The order status. |
fulfillment_status | string or nil | The fulfillment status. |
status_label | string | Where it stands, in the customer's words, such as "Em preparação". |
tone | string | How to color it: attention (waiting on the customer), progress, done or cancelled. |
open | boolean | True while the order is attention or progress. |
total_cents | number | The total in cents. |
created_at | string | When it was placed, as an RFC 3339 timestamp. |
created_on | string | created_at as a local date, dd/mm/yyyy. |
item_count | number | Total quantity of items. |
first_title | string or nil | The title of the first item. |
images | array of string | Up to 3 item image addresses. |
url | string | The order's page in the portal. |
Pedido da conta
Um pedido: etapas, pagamento, entrega, remessas com rastreio, o DANFE e as cartas de correção.
- Template:
account_order, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/order. - Endereço:
/conta/pedidos/{number}
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
portal.order (PortalOrder)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The order's UUID. |
number | string | The order number. |
status | string | The order status. |
payment_status | string or nil | The payment status. |
fulfillment_status | string or nil | The fulfillment status. |
status_label | string | Where it stands, in the customer's words. |
tone | string | How to color it: attention, progress, done or cancelled. |
steps | array of json | The progress steps. Empty for cancelled and refunded orders. |
payment | json or nil | How it was paid and what is still due. |
delivery | json or nil | Where and how it is delivered. |
created_at | string | When it was placed, as an RFC 3339 timestamp. |
created_on | string | created_at as a local date, dd/mm/yyyy. |
currency | string | ISO 4217 currency code. |
subtotal_cents | number | Sum of the items in cents. |
discount_cents | number | Discounts in cents. |
shipping_cents | number | Shipping in cents. |
total_cents | number | The total in cents. |
items | array of json | The order's items, each with its stage. |
shipments | array of json | The shipments, with tracking. |
nfe | json or nil | The invoice (NF-e) with the DANFE link; nil until issued. |
corrections | array of json | The cartas de correção issued for the invoice. |
Produtos da conta
O que o cliente comprou, item a item, com a etapa de cada um.
- Template:
account_products, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/products. - Endereço:
/conta/produtos
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
Entrar
Entrada por código de uso único. Qualquer endereço da conta mostra esta página a quem não entrou.
- Template:
account_login, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/login. - Endereço:
/conta/entrar
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
Meus dados
Nome, telefone, documento, endereço de entrega e consentimentos do cliente.
- Template:
account_profile, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/profile. - Endereço:
/conta/dados
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
portal.customer (PortalCustomer)
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The customer's UUID. |
email | string or nil | The e-mail; nil when none. |
full_name | string or nil | The full name; nil when none. |
phone | string or nil | The phone in E.164; nil when none. |
phone_display | string or nil | The phone as people write it, (11) 98765-4321; nil when none. |
document | string or nil | CPF or CNPJ, digits only; nil when none. |
document_display | string or nil | The document with its punctuation; nil when none. |
date_of_birth | string or nil | YYYY-MM-DD; nil when none. |
address | json or nil | The default delivery address in its parts (postal_code, postal_code_display, street, number, complement, neighborhood, city, state); nil when none. |
addresses | array of json | Every saved address, the default first. |
email_opt_in | boolean | True when the customer accepts offers by e-mail. |
whatsapp_opt_in | boolean | True when the customer accepts offers by WhatsApp. |
created_at | string | When the customer registered, as an RFC 3339 timestamp. |
created_on | string | created_at as a local date, dd/mm/yyyy. |
Minha carteira
O crédito do cliente na loja e o que nele vence, o cashback que aguarda liberação, os pontos, o nível com o progresso até o próximo e o histórico de cada um.
- Template:
account_wallet, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/wallet. - Endereço:
/conta/carteira
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
Acompanhar pedido
Acompanhar um pedido sem entrar na conta: o comprador informa o número do pedido e o e-mail ou CPF da compra e vê a situação, os itens, o pagamento e os envios com os códigos de rastreio. Abre para qualquer pessoa, com ou sem conta.
- Template:
account_tracking, renderizado pela plataforma dentro do layout do tema (um tema não o substitui).template.nameécustomers/tracking. - Endereço:
/rastreio
Objetos que esta página acrescenta
| Nome | Tipo | Descrição |
|---|---|---|
portal | Portal or nil | The customer portal's data. Nil outside the account pages. |
Objetos
Todos os objetos, com as chaves que têm. O mesmo objeto aparece onde estiver aninhado: um produto é igual em product, em collection.products e em search.results, mas um produto de lista vem sem opções, avaliações e especificações.
ShopLoyalty
shop.loyalty: what a purchase earns the shopper.
Acessado como: shop.loyalty
| Chave | Tipo | Descrição |
|---|---|---|
points_enabled | boolean | True when purchases earn points. |
cashback_enabled | boolean | True when purchases earn cashback. |
cashback_bps | number | Cashback at the shopper's tier, in basis points of what is paid with money for goods (500 is 5%); 0 with cashback off. A price earns price | times: shop.loyalty.cashback_bps | divided_by: 10000 cents. |
points_rate | number | Points per R$ 1,00 times the tier's multiplier (10000 is 1 point per real at 1x); 0 with points off. A price earns price | times: shop.loyalty.points_rate | divided_by: 1000000 points. |
tier | string or nil | The shopper's tier; nil for a visitor below the lowest tier, or without tiers. |
pending_days | number | Days after payment before what a purchase earns counts. |
Shop
Acessado como: shop
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The store's name, as set in the admin. |
slug | string | The store's identifier. It is also the {slug} in the platform's own storefront paths (/storefront-api/{slug}/...). |
domain | string | The store's domain (loja.com.br): its primary domain, else the platform address it is served at, else the host of the request. Build links from routes (relative paths) or canonical_url. |
currency | string | ISO 4217 code of the store's currency; BRL when none is set. |
money_format | string | Always an empty string: the money filters pick the currency's own format (R$ 19,90). The key exists so ported Shopify themes can read it. |
price_rounding_cents | number | The store's price rounding step (stores.price_rounding_cents, 0 is off): with it, money drops ",00" from whole amounts and interest-free installments are shown in whole reais. |
loyalty_points_per_real | number | Loyalty points a customer earns per R$ 1,00 paid with money for goods (freight and credit do not count); 0 when the store's points are off. |
loyalty | ShopLoyalty | What a purchase earns the shopper, at their tier when signed in (a visitor: the lowest tier that needs no spend, if any). Freight, credit and gift cards earn nothing. |
enabled_payment_types | array of string | Codes of the payment providers the store has active, sorted alphabetically. |
payment_methods | array of string | The methods checkout can take with those providers: pix, card and/or boleto, empty when the store takes no online payment. Offer only these. |
card_on_gateway_page | boolean | True when the card is typed on the gateway's own page (Asaas) instead of a card form in the store. |
installments | ShopInstallments | The store's card installments: what the installment and installment_plan filters and checkout price with. |
description | string or nil | The store's description: the one in the editor's Theme settings (SEO), else the brand profile's tagline. Nil when there is neither. |
email | string, may be absent | The store's public e-mail. The platform does not fill it yet, so today the key is absent; test it with {% if shop.email %} before printing it. |
phone | string, may be absent | The store's public phone. The platform does not fill it yet, so today the key is absent; test it with {% if shop.phone %} before printing it. |
legal | ShopLegal or nil | The store's legal identity (name, document, address, email, phone, privacy_url, returns_url, terms_url). Nil until the identity is complete in the admin. |
policies | ShopPolicies | The addresses of the store's policy pages (privacy_url, returns_url, terms_url), each nil when no page answers there. Link a policy only when its address is set. |
company | ShopCompany | What the store saved in "Dados da empresa" (name, document, address), complete or not; each part nil until it is filled in. |
storefront_key | string or nil | The store's publishable Storefront API key, for theme scripts that call /v1/storefront like a headless app (calls to the same origin do not need it). Nil when the lookup failed; rendering never depends on it. |
wholesale | Wholesale | The reseller channel as this visitor sees it: whether prices are shown, and a signed-in reseller's price list and rules. |
Wholesale
The reseller channel for the visitor of this page (shop.wholesale).
Acessado como: shop.wholesale
| Chave | Tipo | Descrição |
|---|---|---|
prices_hidden | boolean | True when the store shows prices to signed-in customers only and nobody is signed in: the prices are 0, print "Entre para ver os preços" instead (the cart takes nothing until they sign in). |
sign_in_hint | boolean | True when the store asks to tell visitors who are not signed in that resellers have their own prices ("Entre para ver o preço de revenda"). |
price_list | string or nil | The price list the signed-in customer pays (their prices are already in variant.final_price); nil for everybody else. |
min_order_cents | number | The signed-in reseller's smallest order, in cents; 0 when there is none. |
min_item_quantity | number | The fewest units of a product per order (every size and colour together); 0 when there is none. |
pack_size | number | Products are sold in multiples of this many units; 0 when any quantity is fine. |
applications_open | boolean | The store takes "Seja um revendedor" requests (the reseller-signup section shows its form only then). |
turnstile_site_key | string or nil | The Cloudflare Turnstile site key the sign-up form shows its bot check with; nil when the platform has none (the request is then taken without one). |
WholesaleIssue
One thing that keeps a reseller's cart from checking out.
Acessado como: cart.wholesale_issues[]
| Chave | Tipo | Descrição |
|---|---|---|
code | string | min_order, min_quantity, pack_size or not_available; more may come. |
message | string | Ready to show, in Portuguese. |
product_id | string | The product it is about; empty string for min_order. |
Request
Acessado como: request
| Chave | Tipo | Descrição |
|---|---|---|
path | string | The URL path, as the visitor sees it. |
page_type | string | The platform's name for the page type, such as index, product, page or account_orders (see the page types above). template.name has the same in Shopify's naming. |
locale | string | The store's default locale code, such as pt-BR. It is also the locale.code the t filter translates with. |
host | string | The host the visitor is on (loja.com.br, a preview host), without the port. |
scheme | string | Always https. |
query | map of string | The URL's query string, decoded: request.query.q is sofa for ?q=sofa. A parameter that is not in the URL is absent, not empty. |
port | number, may be absent | Always absent today. |
ContactDraft
Acessado como: cart.contact_draft
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The buyer's full name as last saved in checkout; empty until typed. |
email | string | The buyer's e-mail as last saved in checkout; empty until typed. |
phone | string | The buyer's phone as last saved in checkout; empty until typed. |
zip_code | string | The delivery CEP as last saved in checkout; empty until typed. |
street | string | The delivery street as last saved in checkout; empty until typed. |
number | string | The street number as last saved in checkout; empty until typed. |
neighborhood | string | The neighborhood as last saved in checkout; empty until typed. |
city | string | The city as last saved in checkout; empty until typed. |
state | string | The state (UF) as last saved in checkout; empty until typed. |
additional_info | string | The address complement as last saved in checkout; empty until typed. |
document | string | The buyer's CPF or CNPJ as last saved; empty until typed. A quote link can arrive with it already filled in. |
email_opt_in | boolean | Whether the box that accepts offers by e-mail is ticked, as last saved. |
whatsapp_opt_in | boolean | Whether the box that accepts offers by WhatsApp is ticked (see email_opt_in). |
billing_same_as_shipping | boolean | Whether the box "use the same address for billing" is ticked, as last saved: true until the shopper unticks it. |
billing_zip_code | string | The billing CEP typed with that box unticked; empty until typed. |
billing_street | string | The billing street; empty until typed. |
billing_number | string | The billing street number; empty until typed. |
billing_neighborhood | string | The billing neighborhood; empty until typed. |
billing_city | string | The billing city; empty until typed. |
billing_state | string | The billing state (UF); empty until typed. |
billing_additional_info | string | The billing address complement; empty until typed. |
Cart
The visitor's open cart, priced the way checkout will charge it.
Acessado como: cart
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The cart's UUID. |
subtotal_price | number | Sum of the lines, in cents, before shipping and discounts. |
shipping_price | number | Shipping in cents: the selected freight option or the pickup fee. 0 until one is chosen. |
discount_cents | number | Discount in cents already applied to total_price. |
discount_code | string or nil | The coupon code the shopper applied, which discount_cents comes from; nil when there is none. |
discount_code_issue | string or nil | Why the coupon in discount_code gives nothing now: already_used, first_purchase_only or not_eligible_customer (the shopper may sign in or remove it). Nil while it applies. |
promotions | array of CartPromotion | The automatic promotions the cart gets (buy X get Y, progressive tiers), each with its name and amount_cents; already taken off total_price. Empty when none applies. |
promotion_cents | number | What the promotions take off together, in cents; 0 when none applies. |
promotion_progress | array of PromotionProgress | What the cart still needs for a promotion's next step ("faltam R$ 120 para 10% off", "leve mais 1 e ganhe 1"). Empty when no promotion has a next step for this cart. |
total_price | number | What checkout will charge, in cents: the subtotal plus shipping minus the discount, after the store's price rounding. |
item_count | number | Number of items, counting quantities: two units of one variant count 2. |
currency | string | ISO 4217 currency code of the cart. |
requires_shipping | boolean | True when at least one line is a physical product. False for carts of only digital goods or gift cards. |
has_gift_card | boolean | The cart buys gift cards: no coupon, no credit and no discount apply. |
freight_options | array of FreightQuoteOption | Shipping options quoted for destination_postal_code; empty until a quote is made. |
items | array of CartItem | The lines in the cart, oldest first. |
destination_postal_code | string | The CEP the shipping was quoted for; empty string until one is quoted. |
selected_freight_option_id | string | The option_id of the chosen entry of freight_options; empty string when none is chosen. |
discount_previews | array of DiscountPreview | For each payment method with an automatic rule that applies to this cart, what the rule would take off. It drives copy like "8% off with PIX". Empty array when no rule matches. |
contact_draft | ContactDraft | The buyer's contact and address fields as last saved, to pre-fill checkout so its first render is already complete. |
fulfillment_method | string | shipping (the default) or pickup. With pickup there is no delivery address, pickup_location_id names the chosen location and shipping_price is that location's fee (usually 0). |
pickup_location_id | string | The chosen pickup location's id when fulfillment_method is pickup; empty string otherwise. |
pickup_locations | array of PickupLocation | The store's locations that accept pickup (active and pickup-enabled), by position. |
wholesale_issues | array of WholesaleIssue | What keeps a reseller's cart from checking out under their group's rules (a minimum order, a minimum quantity or pack of a product, a product their group does not buy). Empty when nothing does, and for every other shopper. Show each message; checkout refuses while any is left. |
is_quote | boolean | True for a quote (payment link) cart that the seller prepared, false for ordinary carts. On a quote the lock_* keys and max_installments carry the seller's terms. |
lock_price | boolean | Quote carts only: the seller fixed the prices. False on ordinary carts. |
lock_freight | boolean | Quote carts only: the seller fixed the shipping option. False on ordinary carts. |
lock_address | boolean | Quote carts only: the seller fixed the delivery address. False on ordinary carts. |
max_installments | number or nil | The most installments the customer can pick: the store's maximum, lowered by a quote's cap. Nil only on the empty cart given to a visitor who has none. |
min_installment_cents | number | The store's smallest installment, in cents. |
installment_plan | array of InstallmentOption | The installments the cart's card total can be paid in (a quote's cap included), the store's interest included: the same numbers checkout charges. Empty on the empty cart given to a visitor who has none. |
free_shipping | FreeShipping or nil | The store's free shipping for this cart, from its shipping rules, at the cart's CEP (the last quoted one, else the one typed at checkout; before either, only rules for every destination count). Nil when no free-shipping rule can apply to the cart. |
offers | array of CartOffer | Products the cart offers ("adicione e ganhe"): the store's cart offers, then what would reach free shipping (or a promotion's next step), without the products already in the cart. Each has product (as in lists), headline, discount_percent (0 for none) and reason (offer, free_shipping or promotion). Empty when there is nothing to offer, and on an empty cart. |
scheduled_on | string | The day the shopper asked the order to be sent (YYYY-MM-DD), saved through the cart API's scheduled-date; empty string for as soon as possible. |
scheduling_enabled | boolean | True when the store takes scheduled orders: checkout may offer a date field between scheduling_earliest_on and scheduling_latest_on. |
scheduling_earliest_on | string | The first day a scheduled order may be asked for (YYYY-MM-DD, today plus the store's lead time); empty string when the store does not take scheduled orders. |
scheduling_latest_on | string | The last day a scheduled order may be asked for (YYYY-MM-DD, a year from today); empty string when the store does not take scheduled orders. |
CartPromotion
An automatic promotion a cart gets.
Acessado como: cart.promotions[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The promotion's name as written in the admin. |
kind | string | buy_x_get_y or tiered. |
amount_cents | number | What it takes off this cart, in cents. |
PromotionProgress
What a cart still needs for a promotion's next step.
Acessado como: cart.promotion_progress[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The promotion's name as written in the admin. |
kind | string | buy_x_get_y or tiered. |
remaining_cents | number | Cents of eligible products still missing (a tier by amount); 0 otherwise. |
remaining_quantity | number | Eligible units still missing (a tier by quantity, buy X get Y); 0 otherwise. |
reward_type | string | percent (a whole percent off) or fixed (cents off). |
reward_value | number | The percent or the cents the next step gives. |
reward_quantity | number | Units given at reward_value percent off (buy X get Y); 0 for a tier. |
FreeShipping
What a cart still needs for the store's free shipping.
Acessado como: cart.free_shipping
| Chave | Tipo | Descrição |
|---|---|---|
threshold_cents | number | The lowest subtotal, in cents and after discounts, at which a free-shipping rule applies. |
remaining_cents | number | How much more the cart needs, in cents; 0 once it qualifies. |
progress_percent | number | How far along the cart is, 0 to 100, for a progress bar. |
qualifies | boolean | True once the cart qualifies. |
PickupLocation
Acessado como: cart.pickup_locations[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The location's UUID. |
slug | string | The location's identifier. |
name | string | The location's name. |
description | string | A short description; empty string when none. |
phone | string | Contact phone; empty string when none. |
whatsapp | string | Contact WhatsApp number; empty string when none. |
email | string | Contact e-mail; empty string when none. |
street | string | Street; empty string when none. |
number | string | Street number; empty string when none. |
complement | string | Address complement; empty string when none. |
neighborhood | string | Neighborhood; empty string when none. |
city | string | City; empty string when none. |
state | string | State (UF); empty string when none. |
postal_code | string | CEP; empty string when none. |
pickup_instructions | string | What the buyer should do on arrival; empty string when none. |
pickup_lead_minutes | number | Minutes until an order is ready to be picked up. |
pickup_fee_cents | number | What picking up costs, in cents; usually 0. |
StorefrontDiscountsSummary
Acessado como: discounts
| Chave | Tipo | Descrição |
|---|---|---|
pix_percent_off | number | Percentage the best PIX rule takes off; 0 when that rule is a fixed amount or there is none (see pix_fixed_off_cents). |
pix_fixed_off_cents | number | Fixed amount, in cents, the best PIX rule takes off; 0 when that rule is a percentage or there is none. |
pix_label | string | The PIX rule's name as written in the admin; empty string when there is none. |
card_percent_off | number | Percentage the best card rule takes off; 0 when that rule is a fixed amount or there is none. |
card_fixed_off_cents | number | Fixed amount, in cents, the best card rule takes off; 0 when that rule is a percentage or there is none. |
card_label | string | The card rule's name as written in the admin; empty string when there is none. |
boleto_percent_off | number | Percentage the best boleto rule takes off; 0 when that rule is a fixed amount or there is none. |
boleto_fixed_off_cents | number | Fixed amount, in cents, the best boleto rule takes off; 0 when that rule is a percentage or there is none. |
boleto_label | string | The boleto rule's name as written in the admin; empty string when there is none. |
ShopInstallments
The store's card installments (shop.installments).
Acessado como: shop.installments
| Chave | Tipo | Descrição |
|---|---|---|
max | number | The most installments, 1 to 12. |
interest_free | number | The most interest-free installments (all of them when interest is none). |
interest | string | How installments past the interest-free ones are priced: none (all interest-free), monthly_rate (the store's rate, Price table) or provider (the card gateway's own rates, known only at checkout). |
monthly_rate_bp | number | The store's monthly rate in basis points (199 is 1,99% a month); 0 unless monthly_rate. |
min | number | The smallest installment, in cents. |
InstallmentOption
One way to pay an amount by card (variant.installment_plan, cart.installment_plan, the installment_plan filter): the same numbers checkout charges.
Acessado como: cart.installment_plan[], product.variants[].installment_plan[], product.selected_variant.installment_plan[]
| Chave | Tipo | Descrição |
|---|---|---|
count | number | How many installments. |
installment | number | Each installment after the first, in cents. |
first_installment | number | The first installment, in cents (it takes the division's remainder). |
total | number | What the card is charged, in cents. |
interest | number | The interest over the price, in cents; 0 when interest-free. |
interest_free | boolean | True when the total is the price itself: no interest. |
monthly_rate_bp | number | The store's monthly rate for this count, in basis points; 0 when interest-free. |
DiscountPreview
Acessado como: cart.discount_previews[]
| Chave | Tipo | Descrição |
|---|---|---|
payment_method | string | The payment method the rule applies to: pix, card or boleto. |
amount_cents | number | What the rule takes off this cart, in cents. |
kind | string | The rule's kind: percent_off or fixed_off. |
name | string | The rule's name as written in the admin. |
FreightQuoteOption
Acessado como: cart.freight_options[]
| Chave | Tipo | Descrição |
|---|---|---|
option_id | string | The identifier to send when selecting this option. |
service_name | string | The carrier's service name, such as PAC. |
shipping_cents | number | The price in cents. |
carrier_name | string | The carrier's name; empty string when unknown. |
delivery_days | number | Estimated delivery time in days; 0 when unknown. |
provider_code | string | Which module produced the option, so a theme can group or label by carrier now that a quote can merge several. |
base_shipping_cents | number | What the carrier quoted before the store's shipping rules, in cents. Equal to shipping_cents when no rule changed the price; higher when a rule gave a discount (show it struck through). |
CartItem
Acessado como: cart.items[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The line's UUID: send it to the cart endpoints to change or remove the line. |
product_id | string | UUID of the product. |
variant_id | string | UUID of the variant. |
title | string | The product title, followed by - and the variant title when the variant has its own name. |
quantity | number | Units of this variant in the cart. |
price | number | Unit price in cents, as checkout will charge it. |
line_price | number | price times quantity, in cents. |
sku | string | The variant's SKU; empty string when it has none. |
image | ProductImage, may be absent | The line's image, in the same shape as product.images[], so the cart can share the product_image snippet with the rest of the store. The key is absent when the product has no image. |
fulfillment_note | string, may be absent | A note to show under the line's title when part of the line is made on demand, so the buyer sees the lead time before checkout. The key is absent for lines fully in stock. |
gift_card | CartGiftCard, may be absent | Who the gift card is for. The key is only present on gift card lines. |
available | boolean | False when the variant or its product is no longer for sale (deactivated, or the product moved back to draft or archived): checkout refuses the cart until the line is removed. |
CartGiftCard
Who a gift card in the cart is for, as item.gift_card.
Acessado como: cart.items[].gift_card
| Chave | Tipo | Descrição |
|---|---|---|
recipient_name | string | Who receives the gift card. |
recipient_email | string | The e-mail the gift card is sent to. |
message | string | The personal message; empty string when none. |
sender_name | string | The name shown as sender. |
deliver_on | string | YYYY-MM-DD, or empty for "as soon as it is paid". |
deliver_on_label | string | deliver_on the way the shopper reads it, dd/mm/yyyy; empty string when the card is sent as soon as it is paid. |
Customer
Acessado como: customer
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The customer's UUID. |
email | string | The customer's e-mail. |
accepts_marketing | boolean | Whether the customer opted in to marketing messages. |
orders_count | number | Number of the customer's real orders (test, draft, cancelled and refunded orders are not counted). |
total_spent | number | Sum of those orders, in cents. |
tags | array of string | The tags set on the customer in the admin. |
first_name | string, may be absent | First name. The key is absent when the customer has none. |
last_name | string, may be absent | Last name. The key is absent when the customer has none. |
phone | string or nil | Phone. The key is absent when the customer has none. |
orders | array of CustomerOrder | The customer's latest 20 orders, newest first (no test or draft orders). The account pages have more in portal.orders. |
addresses | array of CustomerAddress | The customer's saved addresses, for checkout to offer. |
addresses_count | number | Number of saved addresses. |
default_address | CustomerAddress, may be absent | The default one of addresses. The key is absent when the customer has none. |
billing_addresses | array of CustomerAddress | The customer's saved billing addresses, the default first, for checkout to offer when the order is billed apart from where it goes. Not among addresses. |
has_account | boolean | Always true: only signed-in customers reach the theme as customer. |
CustomerOrder
Acessado como: customer.orders[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The order's UUID. |
name | string | The order number, or the order's UUID when it has none. |
number | string | The order number; empty string when it has none. |
status | string | The order's status. |
financial_status | string | The payment status; empty string when unknown. |
fulfillment_status | string | The fulfillment status; empty string when unknown. |
total_price | number | The order total in cents. |
currency | string | ISO 4217 currency code of the order. |
created_at | string | When the order was placed, as an RFC 3339 timestamp. |
order_status_url | string | Address of the order's page in the customer portal. |
CustomerAddress
Acessado como: customer.addresses[], customer.default_address, customer.billing_addresses[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The address's UUID. |
first_name | string | Recipient's first name; empty string when unknown. |
last_name | string | Recipient's last name; empty string when unknown. |
company | string | Company; empty string when unknown. |
address1 | string | Street and number on one line. |
address2 | string | The address complement. |
city | string | City. |
province | string | State (UF). |
country | string | Country code; BR for saved addresses. |
zip | string | CEP. |
phone | string | Phone; empty string when unknown. |
default | boolean | True for the customer's default address. |
label | string | The customer's name for the address, such as "Casa"; empty string when unnamed. |
street | string | Street, on its own (Brazilian parts of the address, for filling checkout). |
number | string | Street number, on its own. |
complement | string | Address complement, on its own. |
neighborhood | string | Neighborhood. |
Product
A product. On a product page it is loaded in full; in lists (products, collection.products, search.results, suggested_products) it is loaded without options, reviews, specifications, highlight video, 3D model or short description, to keep pages fast.
Acessado como: product, products[], new_products[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The product's UUID. |
title | string | The product's title. |
handle | string | The product's URL slug: its page is {{ routes.products_url }}/{{ product.handle }}. |
product_type | string | Always product for now, because there is no product type field yet. |
vendor | string | The brand name set on the product; empty string when none. |
available | boolean | True when any variant can be bought now: in stock or made on demand, by the cart's own rule (a product built from parts sells when its parts could make it or the missing parts can be bought). The product card shows its "Esgotado" badge when this is false. |
created_at | string | When the product was created, as an RFC 3339 timestamp. |
updated_at | string | When the product was last changed, as an RFC 3339 timestamp. |
tags | array of string | Always empty for now, because products have no tags yet. |
category_slugs | array of string | Slugs of every category the product belongs to. A theme can build visual rules on them (a star on products of the "destaque" category) without the platform deciding what a category means. |
highlights | array of string | The bullet-point highlights typed in the admin. |
variants | array of ProductVariant | The active variants, in the order set in the admin. |
options | array of ProductOption | Option groups (Cor / Tamanho / …) with their selectable values and swatches. Empty for products without structured options. Each group's position aligns with the variants' option1/option2/option3. |
featured_image | ProductImage, may be absent | The image with the lowest position (videos are passed over); a video, whose src_large is its poster, only when the product has no image. The key is absent when the product has no media. |
selected_variant | ProductVariant, may be absent | The variant the page's ?variant=<id> names, when it is one of this product's; otherwise the first variant that can be bought now (in stock or made to order), or the first variant when none can. The key is absent when the product has no variants. On a product page it is the variant to show selected: the server renders it, so its price and availability are in the HTML before any script runs. |
selected_or_first_available_variant | ProductVariant, may be absent | The same as selected_variant, under the name Shopify's Dawn themes use. |
images | array of ProductImage | The product's media (images and videos) in gallery order. See media_type. |
price_range | PriceRange | Lowest and highest price the customer pays across the variants, in cents (the card price, see variant.final_price). |
lowest_price_variant | ProductVariant or nil | The variant a product list prices the product by: the lowest final_price among the variants that can be bought now (in stock or made to order), or among all of them when none can. Nil when the product has no variants. Cards print its prices, and the category page sorts by its final_price. |
price_varies | boolean | True when the variants counted in lowest_price_variant do not all cost the same: a card then says "a partir de" before the price. |
description | string or nil | The description as rich HTML, sanitized (no scripts or inline handlers), so it is safe to print unescaped. Nil when the product has none. |
short_description | string | A one-line description to show above the highlights; empty string when not set (and in product lists). |
compare_at_price_range | PriceRange, may be absent | Not filled yet, so the key is always absent. Read variant.compare_at_price instead. |
fields | array of Field | The details the store shows for this product (material, warranty, dimensions): the fields it defined with "show on storefront" that have a value, in the admin's order. Each carries its own label, so a theme can loop without knowing the store's fields. Also available by key as product.field.<key>. |
field | map of Field | The same fields by key: product.field.tipo_de_madeira.value. Nil for a key the product has no value for. |
reference_tables | array of ReferenceTable | The store's reference tables this product shows, in order: palettes of swatches, size charts and dimension tables, its own first, then those of its categories and collections (a product's own table of a kind replaces the inherited ones of that kind). Empty in product lists. |
promotions | array of ProductPromotion | The store's automatic promotions this product takes part in (buy X get Y, progressive tiers), for a badge: each has name, kind (buy_x_get_y or tiered) and label, the offer in a few words ("Leve 3 pague 2"). Empty in product lists. |
specifications | array of SpecGroup | Specifications grouped as in the admin. Groups without a field that has a value for this product are left out, so a theme can loop without checking for empty groups. Empty in product lists. |
bought_together | BoughtTogether or nil | Compre junto: the products the page offers with this one (the merchant's, else what is bought with it) and the discount on the set. Nil in product lists and when there is nothing to offer. |
suggested_products | array of Product | Up to 12 related products chosen in the admin, loaded without their own options, reviews or specifications. Empty in product lists. |
reviews | array of Review | The product's approved reviews, newest first, at most 50. Empty in product lists. |
rating_summary | RatingSummary | Counts and average of the approved reviews. Zeros in product lists. |
highlight_video_url | string or nil | A short video that the storefront shows as a floating picture-in-picture widget on the product page. Nil when there is none, and in product lists. |
highlight_video_poster_url | string or nil | Cover image of the highlight video; nil when there is none. |
is_gift_card | boolean | True when the product is a gift card: each variant is a face value with no stock, and the product page asks who it is for and adds it through the cart API's gift card endpoint. |
gift_card_custom_amount | boolean | True on a gift card product whose buyer may type the amount (R$ 10,00 to R$ 50.000,00) instead of picking a variant: the product page then shows an amount field. |
subscription_options | array of SubscriptionOption | The intervals the product can be subscribed to at (each unit, count and a Portuguese label); empty when it is not sold by subscription. The product page shows a subscribe form from it. |
highlight_video_provider | string or nil | youtube, vimeo, upload or external; nil when the product has no highlight video. |
model_url | string | The URL of a 3D model (.glb or .gltf); a theme can render a <model-viewer> from it. Empty string when the product has none, and in product lists. |
model_placement | string | Where AR places the model: floor (the default) or wall. |
BoughtTogether
A product's compre junto (product.bought_together).
Acessado como: product.bought_together, products[].bought_together, new_products[].bought_together
| Chave | Tipo | Descrição |
|---|---|---|
products | array of Product | The products offered with it, 1 to 3, as in product lists: only those a shopper can see and buy. |
source | string | curated (chosen by the store) or bought_together (often in the same orders). |
discount_type | string | percent, fixed (cents off per set) or empty string when the set has no discount. |
discount_value | number | Whole percent or cents, per discount_type; 0 without a discount. |
min_products | number | How many products (this one included) the cart must hold for the discount. |
CartOffer
A product the cart offers (cart.offers).
Acessado como: cart.offers[]
| Chave | Tipo | Descrição |
|---|---|---|
product | Product | The product, as in product lists (variants, images, prices). |
headline | string | The store's line over it; empty string for the theme's own. |
discount_percent | number | Whole percent off one unit while the cart holds another product; 0 for none. |
reason | string | offer (one of the store's cart offers), free_shipping (it would reach free shipping) or promotion (it would reach a promotion's next step). |
ProductPromotion
An automatic promotion a product takes part in.
Acessado como: product.promotions[], products[].promotions[], new_products[].promotions[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The promotion's name as written in the admin. |
kind | string | buy_x_get_y or tiered. |
label | string | The offer in a few words: "Leve 3 pague 2", "2ª unidade com 50% de desconto", "A partir de 3 itens: 10% de desconto". |
Field
A custom field value, with what is needed to show it.
Acessado como: product.fields[], product.field.<key>, products[].fields[]
| Chave | Tipo | Descrição |
|---|---|---|
key | string | The field's key, as in the admin's field settings (tipo_de_madeira). |
label | string | The field's name for the shopper's language. |
kind | string | text, longtext, number, integer, boolean, date, select, multiselect, email, url, phone or document. |
group | string | The group the field belongs to (Materiais); empty string when it has none. Group a table by it. |
unit | string | The unit shown after the value (cm); empty string when it has none. |
value | json | The value: text, a number, true or false, or, for multiselect, a list of texts. |
display | string | The value ready for the page: a list joined with commas, Sim or Não for a boolean, a date as dd/mm/aaaa, a number with its unit. |
SpecTerm
Acessado como: product.specifications[].fields[].terms[], products[].specifications[].fields[].terms[], new_products[].specifications[].fields[].terms[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The term's display name. |
slug | string | The term's URL slug. |
taxonomy_slug | string | The taxonomy the term belongs to (brand, material...), to build the filter address and styling hooks. |
url | string | The term's filter page, /<taxonomy_slug>/<term_slug>. A theme can build its own from the other keys. |
SpecField
Acessado como: product.specifications[].fields[], products[].specifications[].fields[], new_products[].specifications[].fields[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The field's display name. |
slug | string | The field's identifier. |
kind | string | The field's type: text, longtext, number, dimension, weight or taxonomy. |
unit | string | Unit of a number, dimension or weight field, such as cm; empty string otherwise. |
is_taxonomy | boolean | True when the value is one or more taxonomy terms: read terms. |
display_as_link | boolean | When false, show the term names as plain text instead of linking to the filter page. It is for descriptive values (a warranty paragraph, maintenance instructions) that are still a controlled vocabulary but not worth browsing by. |
text | string | The stored value of a non-taxonomy field. Numbers and dimensions come already suffixed with their unit, so a theme prints field.text as it is. |
terms | array of SpecTerm | The taxonomy terms of the value. Empty for non-taxonomy fields. |
SpecGroup
Acessado como: product.specifications[], products[].specifications[], new_products[].specifications[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The group's display name. |
slug | string | The group's identifier. |
fields | array of SpecField | The group's fields that have a value for this product. |
ReferenceTable
A reference table the store attached to the product (or to one of its categories or collections): a palette of swatches, a size chart or a dimensions table.
Acessado como: product.reference_tables[], products[].reference_tables[], new_products[].reference_tables[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The table's UUID. |
name | string | The table's name, used as its heading ("Tabela de cores Lonita", "Guia de tamanhos"). |
kind | string | swatches (a palette: show a grid of squares), measurements (a size chart: a table with a row per size, opened from beside the size picker) or dimensions (the shapes of the piece, each with its sizes). |
unit | string | The unit of every value (cm); empty string when the values carry none. |
description | string | A note to show with the table (how to measure, care of the fabric), plain text; empty string when none. |
image_url | string | A picture to show with the table (how to measure, the piece's shape); empty string when none. |
image_large_url | string | The same picture at up to 1600 px wide (WebP); empty string when none. |
columns | array of string | The headings of the value columns ("Busto", "Cintura"; "Largura", "Altura", "Profundidade"), in the order of each entry's values. Often empty for a palette. |
entries | array of ReferenceTableEntry | The rows, in order: the swatches, the sizes or the shapes. |
source | string | Where the product got it: product (attached to it), category or collection (inherited). |
ReferenceTableEntry
One row of a reference table: a swatch, a size or a shape.
Acessado como: product.reference_tables[].entries[], products[].reference_tables[].entries[], new_products[].reference_tables[].entries[]
| Chave | Tipo | Descrição |
|---|---|---|
label | string | The swatch's name ("GREGE"), the size ("M", "10", "18M") or the shape ("Retangular"). |
code | string | The swatch's code ("LA45C075"); empty string when it has none. |
image_url | string | The entry's picture (the swatch's texture, the shape's drawing) as uploaded; empty string when none. |
image_thumb_url | string | The picture at up to 400 px wide (WebP), for the grid; empty string when none. |
image_large_url | string | The picture at up to 1600 px wide (WebP), for the enlarged view; empty string when none. |
color_hex | string | The swatch's color as RRGGBB (several joined by / for a two-tone swatch), for a swatch without a picture; empty string when none. |
values | array of string | One text per column of the table, in the order of the table's columns ("86-90"); empty strings where the entry has no value. |
values_text | string | The filled values joined by ×, followed by the table's unit ("180 × 90 cm"): a shape's size in one line. Empty string when the entry has no value. |
option_position | number | The position (1, 2 or 3) of the product option this swatch selects, matching product.options and a variant's option1/option2/option3; 0 when the product has no variant of the swatch's value. |
option_value | string | The product's own option value this swatch selects (as the variant picker writes it); empty string when the product has none. |
Review
Acessado como: product.reviews[], products[].reviews[], new_products[].reviews[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The review's UUID. |
author_name | string | The name the author gave. |
rating | number | Stars, from 1 to 5. |
title | string | The review's headline; empty string when none. |
body | string | The review's text. |
is_verified_purchase | boolean | True when the author bought this product. |
created_at | string | When the review was written, as an RFC 3339 timestamp. |
RatingSummary
Acessado como: product.rating_summary, products[].rating_summary, new_products[].rating_summary
| Chave | Tipo | Descrição |
|---|---|---|
total | number | Number of approved reviews. |
average | number | Mean rating from 0 to 5; 0 when there are no reviews. |
average_rounded | number | average rounded to the nearest whole star. |
count_5 | number | Reviews with 5 stars. |
count_4 | number | Reviews with 4 stars. |
count_3 | number | Reviews with 3 stars. |
count_2 | number | Reviews with 2 stars. |
count_1 | number | Reviews with 1 star. |
ProductVariant
Acessado como: product.variants[], product.selected_variant, product.selected_or_first_available_variant
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The variant's UUID. |
title | string | The variant's name; Default for a product with a single variant. |
price | number | The regular price in cents. |
available | boolean | True when the variant is in stock (units on hand minus reserved, or buildable from its parts). A made-to-order variant has this false but can still be bought: also check fulfillment_mode. |
sku | string | The SKU; empty string when none. |
fulfillment_mode | string | stocked, on_demand or stocked_or_on_demand. |
lead_time_days | number | Days to make the variant when it is made on demand; 0 otherwise. |
expected_availability_at | string | Date the variant is expected to be available, as an RFC 3339 timestamp; empty string when unknown. |
compare_at_price | number | The promotional price in cents, when the variant is on promotion (lower than price, which is then the price to strike through); 0 otherwise. This is the reverse of Shopify's meaning. |
final_price | number | What one unit costs paid by card, in cents: the promotional price while there is one, less any store rule that applies to every payment method. Print this instead of computing it. |
pix_price | number | One unit paid by PIX, in cents, with the store's PIX rule (its minimum and rounding included). |
installments | number | How many interest-free installments one unit allows, by the store's rule. |
max_installments | number | The most installments one unit allows, interest included (the gateway's, with shop.installments.interest provider, are priced only at checkout). |
installment_plan | array of InstallmentOption | Every way to pay one unit by card that the store prices: from 1 (à vista), interest-free, then at the store's rate. The same numbers checkout charges. |
price_tiers | array of PriceTier | The signed-in reseller's quantity prices: from min_quantity units of the product (sizes and colours together), each unit costs price cents. Empty for everybody else, and when their price list has no tiers for the variant. |
fields | array of Field | The details the store shows for this variant (a size, a finish): fields it defined for variants with "show on storefront" that have a value. Same shape as product.fields; also by key as variant.field.<key>. |
field | map of Field | The same fields by key: product.field.tipo_de_madeira.value. Nil for a key the product has no value for. |
weight | number | The weight of one unit in grams: the variant's, else the product's; 0 when neither has one. |
weight_unit | string | g when weight is known; empty string otherwise. |
option1 | string | This variant's value for the product's first option (product.options[0]); empty string when the product has no such option. |
option2 | string | This variant's value for the product's second option; empty string when the product has no such option. |
option3 | string | This variant's value for the product's third option; empty string when the product has no such option. |
PriceTier
A quantity price of a reseller's price list.
Acessado como: product.variants[].price_tiers[], product.selected_variant.price_tiers[], product.selected_or_first_available_variant.price_tiers[]
| Chave | Tipo | Descrição |
|---|---|---|
min_quantity | number | From how many units of the product (every size and colour together) the price applies. |
price | number | The unit price in cents from that quantity up. |
ProductOptionValue
One selectable value of an option, such as the "branca" swatch of "Cor". color_hex can hold several /-separated colors (a two-tone swatch, drawn as a diagonal gradient) and swatch_url points at the PNG the platform generated for the value.
Acessado como: product.options[].values[], products[].options[].values[], new_products[].options[].values[]
| Chave | Tipo | Descrição |
|---|---|---|
value | string | The value as the shopper sees it, such as "Azul". |
color_hex | string | Hex color of the swatch, or several joined by / for a two-tone swatch; empty string when the value has no color. |
swatch_url | string | URL of the PNG swatch the platform generated for the value; empty string when there is none. |
ProductOption
A product option group such as "Cor" or "Tamanho". is_color tells a theme to show swatches instead of text buttons, and position (1-based) lines up with each variant's option1, option2 and option3.
Acessado como: product.options[], products[].options[], new_products[].options[]
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The option's name, such as "Cor" or "Tamanho". |
position | number | 1-based position of the option: 1, 2 or 3, matching a variant's option1, option2 and option3. |
is_color | boolean | True for a color option: show swatches instead of text buttons. |
values | array of ProductOptionValue | The option's selectable values. |
ProductImage
Acessado como: product.featured_image, product.images[], collection.image
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The media's UUID. |
media_type | string | image (the default) or video. Branch on it to print a <picture> or a <video> / iframe. |
poster_url | string, may be absent | For a video: its cover image. The key is only present on videos that have one. |
provider | string, may be absent | For a video: upload, youtube, vimeo or external. The key is only present on videos. |
variant_id | string | The UUID of the variant this image belongs to; empty string for a product-level image, shown on every variant. |
variant_ids | array of string | Every variant the image appears on: its own and those it is shared with. Empty means a product-level image, visible on every variant. Switch on this rather than on variant_id to support images shared between variants. |
image_kind | string | gallery (the default) or measurement. A theme can keep the main gallery to the gallery images and send the measurement ones (size charts) to a section of their own. |
src | string | Best available URL: the large JPEG, else the medium one, else the original. For a video, the video's URL. |
srcset | string | JPEG srcset for the small, medium and large widths. Empty for a video. |
srcset_webp | string | WebP srcset in the same shape. Empty for a video. |
src_thumb | string | The 200 px JPEG; falls back to the original when the size does not exist. For a video, its poster. |
src_small | string | The 400 px JPEG; falls back to the original. For a video, its poster. |
src_medium | string | The 800 px JPEG; falls back to the original. For a video, its poster. |
src_large | string | The 1600 px JPEG; falls back to the original. For a video, its poster. |
src_thumb_webp | string | The 200 px WebP. Empty for a video. |
src_small_webp | string | The 400 px WebP. Empty for a video. |
src_medium_webp | string | The 800 px WebP. Empty for a video. |
src_large_webp | string | The 1600 px WebP. Empty for a video. |
position | number | Position in the gallery; lower comes first. |
alt | string | Alternative text; empty string when none. |
width | number | Width in pixels of the original; 0 when unknown. |
height | number | Height in pixels of the original; 0 when unknown. |
SubscriptionOption
One interval a product is sold by subscription at.
Acessado como: product.subscription_options[], products[].subscription_options[], new_products[].subscription_options[]
| Chave | Tipo | Descrição |
|---|---|---|
unit | string | week or month. |
count | number | Every how many weeks or months. |
label | string | "Toda semana", "A cada 2 semanas", "Todo mês", "A cada 3 meses". |
PriceRange
Acessado como: product.price_range, product.compare_at_price_range, products[].price_range
| Chave | Tipo | Descrição |
|---|---|---|
min | number | The lowest price, in cents. |
max | number | The highest price, in cents. |
min_price | number | The same as min, under the name Shopify themes use. |
max_price | number | The same as max, under the name Shopify themes use. |
Collection
A category and its products.
Acessado como: collection, collections[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The collection's UUID. A taxonomy filter page gets a synthesized collection. |
title | string | The collection's name. |
handle | string | The collection's URL slug. |
products | array of Product | The active products on the web channel, by priority and then the collection's own order. Each product is loaded without options, reviews or specifications. On a category page whose section reads paginate, only the current page's products, filtered and sorted as the address asks; in a section setting, as many as the section shows. |
description | string or nil | The collection's description. Nil when none. |
image | ProductImage, may be absent | The first image of the first product that has one. The key is absent when no product has an image. |
products_count | number, may be absent | Products that match the address's filters, on every page (Shopify's collection.products_count). Only on a category page that pages on the server. |
all_products_count | number, may be absent | Products in the category without filters. Only on a category page that pages on the server. |
filters | array of Filter, may be absent | The filters of the page (see listing.filters). Only on a category page that pages on the server. |
sort_by | string, may be absent | The order in force (see listing.sort_by). Only on a category page that pages on the server. |
Listing
A product list page (a category, a taxonomy term, all products) whose section pages on the server: the filters with their counts, the order and the addresses that change them. Every address is shareable and works without JavaScript: ?sort=price-asc&cor=Azul&tamanho=M&marca=Bododo&disponivel=1&preco_min=50&preco_max=200&pagina=2. The global listing is nil on other pages and with a theme that pages in the browser.
Acessado como: listing
| Chave | Tipo | Descrição |
|---|---|---|
products_count | number | Products that match the filters, on every page. |
all_products_count | number | Products in the list without filters. |
sort_by | string | The order in force, as the sort parameter writes it: empty string for the store's order ("Destaques"), newest, price-asc, price-desc, title-asc or best-selling. |
default_sort_by | string | The order the section starts with (its "Ordem inicial" setting). |
sort_options | array of SortOption | The orders a shopper can pick, each with its address. |
filters | array of Filter | The filters the section shows, in order: availability, price, brand, then each variant option (Cor, Tamanho...). Empty when the section's filters are off. |
active_filters | array of ActiveFilter | Every filter value in force, each with the address without it, for "remove" chips. |
filtered | boolean | True when a filter is in force: the page then names the unfiltered page as canonical and asks search engines not to index it. |
url | string | The page's address without parameters: the action of the filter form. |
clear_url | string | The page's address without filters, in the current order. |
SortOption
One order a shopper can pick on a product list.
Acessado como: listing.sort_options[]
| Chave | Tipo | Descrição |
|---|---|---|
value | string | The sort parameter's value: for the store's order an empty string when it is the default, featured otherwise. |
name | string | The order's name: "Destaques", "Mais recentes", "Menor preço", "Maior preço", "Nome, A a Z", "Mais vendidos". |
url | string | The list's address in this order, back on its first page, filters kept. |
selected | boolean | True for the order in force. |
Filter
A filter of a product list: a list of values to tick (brand, an option), a price range or a yes/no (availability). Counts are what the list would hold with that value ticked, the other filters kept.
Acessado como: collection.filters[], listing.filters[], collections[].filters[]
| Chave | Tipo | Descrição |
|---|---|---|
label | string | The filter's name: "Disponibilidade", "Preço", "Marca", or the option's name ("Cor"). |
type | string | list, price_range or boolean. |
param_name | string | The query parameter of a list or a yes/no (cor, marca, disponivel); a price range has min_param and max_param. |
is_color | boolean | True for a colour option: show values[].swatch_hex. |
values | array of FilterValue | The values of a list, or the single value of a yes/no. |
active_count | number | How many of its values are in force (1 for a price range with a bound). |
min_param | string | A price range's lower-bound parameter (preco_min, in reais); empty string otherwise. |
max_param | string | A price range's upper-bound parameter (preco_max, in reais); empty string otherwise. |
min_value | string | The lower bound in force as typed, in reais; empty string when none. |
max_value | string | The upper bound in force as typed, in reais; empty string when none. |
range_min | number | The lowest product price in the list with the other filters, in cents; 0 for a list. |
range_max | number | The highest product price in the list with the other filters, in cents; 0 for a list. |
url_to_remove | string | The list's address without this filter. |
FilterValue
One value of a filter.
Acessado como: collection.filters[].values[], listing.filters[].values[], collections[].filters[].values[]
| Chave | Tipo | Descrição |
|---|---|---|
label | string | The value as shown ("Azul", "M", "Bododo", "Somente disponíveis"). |
value | string | The value the parameter carries (Azul, 1). |
param_name | string | The query parameter (cor): a checkbox's name. |
count | number | Products the list would hold with this value ticked, the other filters kept. |
active | boolean | True when the value is in force. |
url | string | The list's address with this value ticked, or without it when it is in force. |
swatch_hex | string | #rrggbb of a colour value (its own colour, else the store's swatch palette); empty string when none. |
ActiveFilter
A filter value in force, for a "remove" chip.
Acessado como: listing.active_filters[]
| Chave | Tipo | Descrição |
|---|---|---|
label | string | "Cor: Azul", "Até R$ 200", "Somente disponíveis". |
url_to_remove | string | The list's address without this value. |
Paginate
The pages of a product list paged on the server (Shopify's paginate): ?pagina=N, numbered from 1. The global paginate is nil on other pages and with a theme that pages in the browser.
Acessado como: paginate
| Chave | Tipo | Descrição |
|---|---|---|
current_page | number | The page shown, from 1. |
current_offset | number | Products before this page. |
page_size | number | Products per page (the section's "Produtos por página"). |
pages | number | How many pages the list has (at least 1). |
items | number | Products on every page together. |
previous | PaginateLink or nil | The page before; nil on the first. |
next | PaginateLink or nil | The page after; nil on the last. |
parts | array of PaginatePart | Page links to show: the first, the last and those around the current one, with a gap (…, is_link false) between. |
PaginateLink
The address of another page of a list.
Acessado como: paginate.previous, paginate.next
| Chave | Tipo | Descrição |
|---|---|---|
url | string | The page's address, filters and order kept. |
title | string | "Anterior" or "Próxima". |
PaginatePart
One entry of the page links: a page number or a gap.
Acessado como: paginate.parts[]
| Chave | Tipo | Descrição |
|---|---|---|
title | string | The page number, or … for a gap. |
url | string | The page's address; empty string for a gap and for the current page. |
is_link | boolean | False for a gap and for the current page. |
is_current | boolean | True for the page shown. |
Page
Acessado como: page
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The page's UUID. |
title | string | The page's title. |
handle | string | The page's URL slug. |
content | string | The page body as HTML, sanitized (no scripts or inline handlers). Empty for pages made in the site editor, whose content is their sections. |
author | string, may be absent | The author's name. The key is absent when the page has none. |
published_at | string, may be absent | When the page was published, as an RFC 3339 timestamp. The key is absent when unknown. |
Routes
Acessado como: routes
| Chave | Tipo | Descrição |
|---|---|---|
home_url | string | The store's home: /, or the storefront's path prefix when it is served under one. |
cart_url | string | The cart page (/carrinho). |
cart_add_url | string | Endpoint that adds a variant to the cart (POST). |
cart_change_url | string | Endpoint that changes a line's quantity (POST). |
cart_clear_url | string | Endpoint that empties the cart (POST). |
cart_freight_quote_url | string | Endpoint that quotes shipping for a CEP (POST). |
cart_freight_select_url | string | Endpoint that chooses one of the quoted shipping options (POST). |
freight_simulate_url | string | POST /v1/storefront/shipping-estimates: quotes shipping for variants without a cart (the product page's CEP box). Send X-Storefront-Key (shop.storefront_key) when the page is not on the store's own domain. |
checkout_url | string | POST /v1/storefront/carts/current/checkout: confirms the visitor's order once its payment is approved (pay through payment_intent_url). |
payment_intent_url | string | POST /v1/storefront/carts/current/payments: turns the visitor's cart into an order and starts its payment. |
account_url | string | The customer portal's home (/conta). |
account_login_url | string | The sign-in page (/conta/entrar). |
account_logout_url | string | Endpoint that signs the customer out: submit a POST form to it. |
account_register_url | string | The same address as account_login_url: a customer signs up by signing in with a code. |
search_url | string | The search page (/busca); send the query as ?q=. |
wishlist_url | string | The favorites page (/favoritos). |
booking_url | string | The booking page (/agendar), where a shopper books one of the store's services. It answers only while the store takes bookings online and the theme has a booking template. |
collections_url | string | The list of categories (/categorias); a category is {{ routes.collections_url }}/{{ collection.handle }}. |
products_url | string | Prefix of product pages: {{ routes.products_url }}/{{ product.handle }}. |
all_products_url | string | The list of every product (/produtos). |
product_url_pattern | string | The address of a product's page, with {handle} where the product's handle goes (/produtos/{handle}, or the address the store chose, such as /loja/{handle}). Use it when a script builds product links: replace {handle} with product.handle. |
collection_url_pattern | string | The address of a category's page, with {handle} where the category's handle goes (/categorias/{handle}, or the address the store chose). |
api_url | string | Base of the storefront API (/v1/storefront), for theme scripts. |
Template
The page type in Shopify's naming, so a layout can branch with {% if template.name == 'product' %}. The platform's own names are mapped to Shopify's: account_orders becomes customers/orders, all_products becomes list-collections.
Acessado como: template
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The page type in Shopify's naming: the template name (index, product, cart...), except customers/... for account pages and list-collections for the all-products page. request.page_type has the platform's own name. |
directory | string | customers on account pages; empty string elsewhere. |
suffix | string | Always an empty string. |
OrderSummary
A light snapshot of an order for the confirmation page: only what a thank-you template needs, without items or fulfillments, so the page renders fast.
Acessado como: order
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The order's UUID. |
item_variant_ids | array of string | Variant UUIDs of the order's items. They match the id of the Meta catalog feed, so a Purchase event can send catalog-matching content_ids. |
item_quantities | array of number | The quantity of each of those lines, in the same order as item_variant_ids. |
item_count | number | Total quantity of items in the order. |
meta_browser_purchase | boolean | Whether the page fires the browser Meta pixel's Purchase for this order. False for a sale credited to a click-to-WhatsApp ad conversation: the server reports it to Meta through the conversation (the business-messaging dataset), and a browser Purchase would count it twice. A theme that fires its own fbq('track', 'Purchase') checks it first. |
number | string or nil | The order number shown to the customer; nil when the order has none. |
total_cents | number | Order total in cents. |
subtotal_cents | number | Sum of the items in cents, before shipping and discounts. |
shipping_cents | number | Shipping in cents. |
discount_cents | number | Discounts in cents. |
currency | string | ISO 4217 currency code of the order. |
payment_status | string or nil | The payment status, such as captured once paid; nil when unknown. |
fulfillment_status | string or nil | The fulfillment status; nil when unknown. |
customer_name | string or nil | The customer's name; nil when unknown. |
customer_email | string or nil | The customer's e-mail; nil when unknown. |
created_at | string | When the order was placed, as an RFC 3339 timestamp. |
status | string | The order's status: pending (waiting for payment), paid, fulfilled, cancelled or refunded. |
payment_state | string | Where the payment stands, for the page to branch on: paid, waiting (a PIX to pay, see pix_code, a boleto to pay, see boleto_url and boleto_line, or a card to finish on the gateway's page, see payment_redirect_url), processing (a card the gateway is still deciding), failed (the last attempt was refused or its PIX lapsed, see refusal_message), unpaid (no attempt yet), cancelled, refunded or partially_refunded. |
payable | boolean | True when a new payment can be made for the order (pay_url): it still waits for one. |
payment_method | string or nil | The last payment attempt's method (pix, card, boleto); nil before any. |
pix_code | string or nil | The PIX "copia e cola" code while payment_state is waiting by PIX; nil otherwise. |
pix_qr | string or nil | The PIX QR code as an image URL (data:image/png;base64,...) while it waits; nil otherwise. |
pix_expires_at | string or nil | When the PIX code stops working, as an RFC 3339 timestamp; nil when there is none. |
payment_redirect_url | string or nil | The gateway's page where a card payment is finished (Asaas), while it waits; nil otherwise. |
boleto_url | string or nil | The boleto to print or save (a PDF or the gateway's page) while payment_state is waiting by boleto; nil otherwise. |
boleto_line | string or nil | The boleto's linha digitável (47 digits, no separators), to paste in a bank app, while it waits; nil otherwise. |
boleto_line_formatted | string or nil | The linha digitável grouped as printed on a boleto (23793.38128 60000.000003 ...), while it waits; nil otherwise. |
boleto_barcode | string or nil | The boleto's barcode (44 digits) while it waits; nil otherwise. |
boleto_due_date | string or nil | When the boleto is due (YYYY-MM-DD) while it waits; nil otherwise. |
boleto_pix_code | string or nil | A PIX "copia e cola" code that pays the same boleto, when the gateway issues one; nil otherwise. |
boleto_pix_qr | string or nil | That PIX as a QR code image URL (data:image/png;base64,...); nil otherwise. |
boleto_expires_at | string or nil | Until when the order waits for its boleto (the due date plus the days a bank takes to report a payment), as an RFC 3339 timestamp; nil when no boleto waits. |
refusal_message | string or nil | Why the last attempt failed, in the shopper's words, when payment_state is failed; nil otherwise. |
refunded_cents | number | What was refunded, in cents (0 when nothing was). |
pay_url | string | The endpoint that starts a new payment for the order (POST, same body as the cart's payment). It carries the order's token when the page was opened from the store's link; without it only the browser that holds the order's cart can start a new charge (others get order_access_required). |
payment_status_url | string | The endpoint to poll for the payment's state (GET, state as payment_state above). |
loyalty | OrderLoyalty or nil | What the order earns in the store's loyalty program (points, cashback) and when; nil when it earns nothing. |
OrderLoyalty
order.loyalty: what an order earns in the loyalty program, and when.
Acessado como: order.loyalty
| Chave | Tipo | Descrição |
|---|---|---|
points | number | Points the order earns (0 when none). |
cashback_cents | number | Cashback the order earns, in cents (0 when none). It reaches the customer's store credit on available_on. |
available_on | string or nil | The day the points and cashback count, dd/mm/aaaa (São Paulo); nil while the order waits for its payment. |
pending_days | number | Days after the payment before they count. |
estimated | boolean | True before the order is settled: the amounts are worked out from the program's rates and can still change. |
tier | string or nil | The tier the order earns at; nil without one. |
ShopLegal
The store's legal identity, from the admin's "Dados da empresa". shop.legal is nil until it is complete.
Acessado como: shop.legal
| Chave | Tipo | Descrição |
|---|---|---|
name | string | The legal name (razão social). |
document | string | The CNPJ or CPF, formatted. |
address | string | The address on one line. |
email | string | The contact e-mail; empty string when none. |
phone | string | The contact phone, formatted; empty string when none. |
privacy_url | string | Address of the generated privacy policy page (/politica-de-privacidade). |
returns_url | string | Address of the generated returns policy page (/trocas-e-devolucoes). |
terms_url | string | Address of the generated terms of use page (/termos-de-uso). |
ShopPolicies
The store's policy pages that answer on the storefront: the generated ones once "Dados da empresa" is complete, or a published page of the store at the same address. A key is nil when no page answers there, so a theme never links a page that does not exist.
Acessado como: shop.policies
| Chave | Tipo | Descrição |
|---|---|---|
privacy_url | string or nil | Address of the privacy policy (/politica-de-privacidade), or nil. |
returns_url | string or nil | Address of the returns policy (/trocas-e-devolucoes), or nil. |
terms_url | string or nil | Address of the terms of use (/termos-de-uso), or nil. |
ShopCompany
What the store saved in "Dados da empresa", complete or not, for a footer that shows what there is.
Acessado como: shop.company
| Chave | Tipo | Descrição |
|---|---|---|
name | string or nil | The legal name (razão social), or nil. |
document | string or nil | The CNPJ or CPF, formatted, or nil. |
address | string or nil | The address on one line, or nil until street, city and state are filled in. |
Locale
The translation in use, for the t filter.
Acessado como: locale
| Chave | Tipo | Descrição |
|---|---|---|
code | string | The locale code, the store's default (for example pt-BR). |
strings | map of string | The theme's locales/<code>.json, flattened to dotted keys: locale.strings['cart.title']. Use {{ 'cart.title' | t }} instead of reading it directly. |
Menu
A navigation menu made in the site editor.
Acessado como: menus.<key>
| Chave | Tipo | Descrição |
|---|---|---|
handle | string | The menu's identifier. |
title | string | The menu's name. |
items | array of MenuItem | The top-level links. |
MenuItem
One link of a menu.
Acessado como: menus.<key>.items[], menus.<key>.items[].children[], menus.<key>.items[].children[].children[]
| Chave | Tipo | Descrição |
|---|---|---|
title | string | The link text. |
url | string | The address; # when the item has none. |
active | boolean | True when the link points at the page being shown. |
children | array of MenuItem | The links nested under this one (up to three levels). |
Search
The search page's results.
Acessado como: search
| Chave | Tipo | Descrição |
|---|---|---|
terms | string | The search text (?q=), trimmed. |
performed | boolean | True when there were terms to search for. |
results_count | number | How many products match, across all pages. |
page | number | The current page, starting at 1 (?page=). |
pages | number | How many pages of 24 results there are, at least 1. |
sort | string | The order in use (?sort=): relevance (the default), price-asc, price-desc or newest. |
results | array of Product | The current page's products, loaded without options, reviews or specifications. |
Wishlist
The favorites page's data.
Acessado como: wishlist
| Chave | Tipo | Descrição |
|---|---|---|
products | array of Product | The saved products, newest first. Empty in previews. |
count | number | How many products are saved. |
signed_in | boolean | True when the list belongs to a signed-in customer. |
alerts | boolean | True when the customer can get price and stock alerts for the list. |
shared | boolean | True on a list somebody shared by link (/favoritos/compartilhada/{token}): then products and owner_name are theirs, signed_in and alerts are false, and a link that no longer works shows no products. |
owner_name | string | The first name of the customer who shared the list; empty when it is not a shared list or they have none. |
CmsDocument
One document of a CMS collection. Besides the keys below it carries the fields of the collection's schema, by their names; image, video and file fields are expanded into a CmsMedia.
Ele também traz os campos da coleção, pelo nome.
Acessado como: cms.<key>[], entry, entries[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The document's UUID. |
slug | string or nil | The document's slug, used in entry addresses; nil when it has none. |
position | number | The order set in the admin; documents arrive sorted by it. |
url | string, may be absent | The document's entry address. Only on the documents of a CMS page's entries. |
CmsMedia
A media file referenced by a CMS document field: what an image, video or file field becomes.
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The file's UUID. |
url | string | Where to load it from. For a video, its web rendition (an H.264 MP4 of at most 1280 px) once it is ready, else the original. |
original_url | string | The file as uploaded. |
poster | string or nil | A video's poster: its first frame, made with the web rendition. Nil until the rendition is ready, and for anything that is not a video. |
filename | string | The stored file name. |
original_name | string or nil | The name it had when uploaded. |
mime_type | string | The media type, such as image/webp. |
width | number or nil | Width in pixels, for images and videos. |
height | number or nil | Height in pixels, for images and videos. |
alt | string or nil | Alternative text. |
Section
The section being rendered, with the settings and blocks the editor saved for it.
Acessado como: section
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The section's identifier on the page. |
type | string | The section type (the file name under sections/). |
settings | json | The values of the settings declared in the section's {% schema %}: section.settings.heading. |
blocks | array of Block | The section's enabled blocks, in order. |
index | number | Position on the page, starting at 1. |
Block
One block of a section.
Acessado como: section.blocks[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The block's identifier. |
type | string | The block type declared in the section's schema. |
settings | json | The values of the block's settings. |
attrs | string | HTML attributes (data-block-id, data-block-type) to print on the block's element so the editor can find it. |
Form
A form made in the admin, with what a theme needs to render and post it.
Acessado como: forms.<key>
| Chave | Tipo | Descrição |
|---|---|---|
slug | string | The form's identifier, its key in forms. |
name | string | The form's name. |
fields | array of json | The typed fields in order (key, label, type, required...). {% render 'mobiari-form', form: forms.contato %} renders them. |
submit_label | string or nil | The submit button's text; nil to use the default. |
success_message | string or nil | The message shown after a successful submission; nil to use the default. |
action | string | Where to post the form (/storefront-api/{slug}/forms/{form_slug}). |
turnstile_site_key | string or nil | Cloudflare Turnstile site key when the platform checks it; nil otherwise. |
Brand
The store's brand profile, the same tokens that drive e-mails and forms. Nil on the page when the store has no profile yet.
Acessado como: brand
| Chave | Tipo | Descrição |
|---|---|---|
schema_version | number | Version of the profile's format. |
identity | json | Name, wordmark, tagline, story, audience: brand.identity.name. |
voice | json | How the brand speaks, such as brand.voice.tagline. |
colors | json | The color tokens: brand.colors.primary.value. |
typography | json | The type tokens. |
spacing | json | The spacing tokens. |
radii | array of json | The corner-radius tokens. |
effects | json | Shadows and other effects. |
imagery | json | Guidance for photography and illustration. |
iconography | json | Guidance for icons. |
components | array of json | Component specs, such as buttons. |
assets | BrandAssets | Logos and images. |
footer | json | The brand footer used in e-mails. |
email | json | E-mail preferences. |
guide_md | string | The narrative brand guide, in Markdown. |
open_questions | array of string | Questions still open in the profile. |
sources | array of string | Where the profile was derived from. |
changelog | array of json | The profile's change history. |
updated_at | string | When the profile last changed. |
kit | json | The profile boiled down to the tokens a page needs. |
css_url | string | Address of the stylesheet generated from the profile (/assets/brand.css). |
BrandAssets
The brand's logos and images.
Acessado como: brand.assets
| Chave | Tipo | Descrição |
|---|---|---|
logo_url | string or nil | The logo; nil when none. |
logo_dark_url | string or nil | The logo for dark backgrounds; nil when none. |
logo_width | number | The logo's display width in pixels; 0 when unset. |
favicon_url | string or nil | The favicon; nil when none. |
images | array of json | Other brand images. |
Portal
The customer portal's data, set on the account pages only (nil elsewhere). The portal templates belong to the platform; a theme styles them through the mobiari-portal classes, so it rarely reads this object.
Acessado como: portal
| Chave | Tipo | Descrição |
|---|---|---|
store | string | The store's slug. |
store_name | string | The store's name. |
signed_in | boolean | True when a customer is signed in. |
whatsapp | boolean | True when sign-in codes can be sent by WhatsApp. |
return_to | string | The address to come back to after signing in. |
logout_url | string | Endpoint that signs out: submit a POST form to it. |
api_url | string | Base of the Storefront API for the portal's scripts. |
storefront_key | string or nil | The publishable storefront key; nil when the lookup failed. |
profile_url | string | Storefront API address of the customer's profile. |
urls | PortalUrls | The portal's own pages. |
sign_in_providers | array of json | The sign-in buttons the store switched on (Google, Apple), each key, label and url (slug based: a plain link starts the sign-in); empty when the customer is signed in or none is on. |
sign_in_error | string or nil | Why a sign-in with Google or Apple did not finish, in the shopper's words (from ?entrar=); nil otherwise. Set on account_login. |
help | PortalHelp or nil, may be absent | How to reach the store, from its WhatsApp channel and company data. Only for a signed-in customer; nil when the store has neither. |
customer | PortalCustomer, may be absent | The signed-in customer's profile. Absent when nobody is signed in. |
data_url | string, may be absent | Where the customer downloads a copy of their data (LGPD). Only for a signed-in customer. |
privacy_requests_url | string, may be absent | Storefront API address of the customer's privacy requests. Only for a signed-in customer. |
privacy_open | array of json, may be absent | The customer's open privacy requests (kind, created_at). Only for a signed-in customer. |
deletion_open | boolean, may be absent | True when a data deletion request is open. Only for a signed-in customer. |
saved_cards | array of json, may be absent | The cards the customer kept at checkout (id, brand, last4, expiry as MM/AA or nil, usable when the store's card gateway can charge it). Filled only on account_profile; empty elsewhere. Only for a signed-in customer. |
cards_url | string, may be absent | Storefront API address of the customer's saved cards (DELETE <cards_url>/<id> removes one). Only for a signed-in customer. |
order | PortalOrder or nil, may be absent | The order on the order page (nil when it was not found). Only on account_order. |
tracking | PortalTracking, may be absent | The guest tracking form and the order it found. Only on account_tracking. |
orders | array of PortalOrderItem, may be absent | The customer's orders, newest first, at most 50. Only on account, account_orders and account_products. |
products | array of json or nil, may be absent | What the customer bought, item by item, with its stage. Only on account and account_products. |
loyalty | PortalLoyalty or nil, may be absent | Points, cashback, store credit, tier and the referral link of the signed-in customer. On account (totals) and account_wallet (with every history); nil when it could not be read. |
subscriptions | array of PortalSubscriptionItem, may be absent | The customer's running subscriptions (active or paused; cancelled ones are left out), with the words and dates ready. Only on account. |
bookings | PortalBookings, may be absent | The customer's bookings: what is coming up and the last few past ones. Only on account. |
PortalLoyalty
The customer's loyalty on the account overview (commerce::loyalty).
Acessado como: portal.loyalty
| Chave | Tipo | Descrição |
|---|---|---|
show | boolean | True when the store runs points or referrals, or the customer holds credit or points: whether to show the card. |
program | PortalLoyaltyProgram | The store's rules. |
points_available | number | Points the customer can turn into credit now (negative after a refund took back points already spent). |
points_pending | number | Points still waiting for their orders to stand. |
redeemable_cents | number | The credit the usable points buy now, in whole blocks, in cents. |
redeem_points | number | The points a redemption of every whole block takes. |
redeem_url | string | Storefront API address that turns points into credit (POST with points). |
points_expire_on | string or nil | dd/mm/aaaa when the points expire if the customer earns nothing more; nil when they do not. |
credit_balance_cents | number | The customer's store credit, in cents. |
referral | PortalReferral or nil | The customer's referral code; nil while the store has referrals off. |
cashback | json | Cashback: pending_cents (waiting for its orders to stand), next_release_at (and next_release_on, dd/mm/aaaa, on account_wallet), released_cents and owed_cents (what a refund took back after it was spent). |
tier | json | Where the customer stands: current and next (each with name, min_spend_cents, multiplier_bps, cashback_bps, free_shipping, birthday_bonus_cents, birthday_bonus_points; nil when there is none), spend_cents, to_next_cents, window_months and, on account_wallet, progress_percent. |
rates | json | What a purchase earns the customer now: points_enabled, cashback_enabled, points_per_currency_unit, multiplier_bps, cashback_bps, tier, pending_days and, on account_wallet, cashback_label ("5%") and points_label ("1,5"). |
wallet_expiring | array of json | Store credit that expires, soonest first: kind, note, amount_cents, left_cents, expires_at (and valid_until, dd/mm/aaaa, on account_wallet). |
wallet_entries | array of json or nil | The 50 latest wallet movements (kind, amount_cents, order_number, note, expires_at, created_at, with created_on and valid_until). Only on account_wallet. |
cashback_entries | array of json or nil | The 50 latest cashback entries (kind: earn, reverse, release, clawback; amount_cents, order_number, available_at, created_at, and the *_on dates). Only on account_wallet. |
entries | array of json or nil | The 50 latest points entries (kind, points, order_number, credit_cents, available_at, created_at, and the *_on dates). Only on account_wallet. |
tier_changes | array of json | The customer's tier changes and birthday bonuses, newest first (from_tier, to_tier, reason, created_at, and created_on on account_wallet). |
PortalLoyaltyProgram
A store's loyalty rules as a shopper sees them.
Acessado como: portal.loyalty.program
| Chave | Tipo | Descrição |
|---|---|---|
points_enabled | boolean | Customers earn points. |
points_per_currency_unit | number | Points per R$ 1,00 paid. |
redeem_step_points | number | Points turn into credit in blocks of this many. |
redeem_step_cents | number | The credit each block is worth, in cents. |
pending_days | number | Days after payment before an order's points and referral reward count. |
expire_after_months | number or nil | Months without earning before points expire; nil for never. |
referrals_enabled | boolean | Customers can refer friends. |
referrer_reward_cents | number | Credit for the customer who refers, in cents. |
referee_reward_cents | number | Credit for the friend after their first order, in cents. |
referral_min_order_cents | number | The friend's first order must reach this, before freight, in cents. |
cashback_enabled | boolean | Customers earn cashback (store credit) on what they pay for goods. |
cashback_bps | number | The program's cashback percent in basis points (500 is 5%); a tier can give more. |
cashback_expire_months | number or nil | Months cashback stays in the wallet; nil for never. |
tier_window_months | number | Months of spend a tier counts. |
tiers | array of json | The store's tiers, lowest first (name, min_spend_cents, multiplier_bps, cashback_bps, free_shipping, birthday_bonus_cents, birthday_bonus_points; on account_wallet also cashback_label and multiplier_label). |
PortalReferral
The customer's referral code and how it went.
Acessado como: portal.loyalty.referral
| Chave | Tipo | Descrição |
|---|---|---|
code | string | The code, made of the first name and five characters. |
share_path | string | /?ref={code}: put the store's address in front to share it. |
pending | number | Friends whose first order is still waiting to stand. |
rewarded | number | Referrals that rewarded the customer. |
earned_cents | number | Credit referrals earned the customer, in cents. |
PortalUrls
The portal's own pages.
Acessado como: portal.urls
| Chave | Tipo | Descrição |
|---|---|---|
account | string | The portal's home (/conta). |
orders | string | The orders list (/conta/pedidos). |
products | string | What the customer bought (/conta/produtos). |
profile | string | The customer's details (/conta/dados). |
wallet | string | The customer's wallet: credit, cashback, points and tier (/conta/carteira). |
tracking | string | Guest order tracking, open to anyone (/rastreio). |
PortalHelp
How a customer can reach the store.
Acessado como: portal.help
| Chave | Tipo | Descrição |
|---|---|---|
whatsapp_url | string or nil | A wa.me link to the store's WhatsApp; nil when there is none. |
whatsapp | string or nil | That number as people write it; nil when there is none. |
email | string or nil | The store's e-mail; nil when there is none. |
PortalCustomer
The signed-in customer's profile, with display versions of phone, document and dates.
Acessado como: portal.customer
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The customer's UUID. |
email | string or nil | The e-mail; nil when none. |
full_name | string or nil | The full name; nil when none. |
phone | string or nil | The phone in E.164; nil when none. |
phone_display | string or nil | The phone as people write it, (11) 98765-4321; nil when none. |
document | string or nil | CPF or CNPJ, digits only; nil when none. |
document_display | string or nil | The document with its punctuation; nil when none. |
date_of_birth | string or nil | YYYY-MM-DD; nil when none. |
address | json or nil | The default delivery address in its parts (postal_code, postal_code_display, street, number, complement, neighborhood, city, state); nil when none. |
addresses | array of json | Every saved address, the default first. |
email_opt_in | boolean | True when the customer accepts offers by e-mail. |
whatsapp_opt_in | boolean | True when the customer accepts offers by WhatsApp. |
created_at | string | When the customer registered, as an RFC 3339 timestamp. |
created_on | string | created_at as a local date, dd/mm/yyyy. |
PortalBookings
The customer's bookings on the account overview.
Acessado como: portal.bookings
| Chave | Tipo | Descrição |
|---|---|---|
upcoming | array of PortalBookingItem | Pending-payment and confirmed bookings that have not ended, soonest first. |
past | array of PortalBookingItem | The last 5 bookings that are done, missed or cancelled, newest first. |
PortalBookingItem
A booking on the account overview.
Acessado como: portal.bookings.upcoming[], portal.bookings.past[]
| Chave | Tipo | Descrição |
|---|---|---|
number | number | The booking number. |
service | string | The service, as it was when booked. |
provider | string | Who serves the customer. |
day | string | The day, dd/mm/yyyy, in the provider's time zone. |
time | string | The start time, hh:mm, in the provider's time zone. |
status | string | pending_payment, confirmed, completed, no_show or cancelled. |
status_label | string | The status in the customer's words, such as "Confirmado". |
tone | string | How to color it: ok, attention (waiting on payment) or muted. |
manage_url | string or nil | The private page to see, move or cancel it; nil unless it is upcoming. |
PortalSubscriptionItem
A subscription in the portal's overview, with what the customer can do to it.
Acessado como: portal.subscriptions[]
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The subscription id. |
status | string | active or paused. |
status_label | string | Where it stands, in the customer's words: "Ativa", "Pausada por você" or "Pausada pela loja". |
tone | string | How to color it: ok, muted or attention (paused by the store). |
interval_label | string | How often it repeats, such as "a cada 2 semanas" or "todo mês". |
next_order_on | string or nil | When the next order is placed, dd/mm/yyyy; nil unless active. |
can_pause | boolean | True while it is active. |
can_skip | boolean | True while it is active: the next order is not placed. |
can_resume | boolean | True when the customer paused it themselves; a pause the store made is the store's to lift. |
can_cancel | boolean | True: the customer can cancel any running subscription. |
items | array of PortalSubscriptionLine | What each order brings. |
api_url | string | Storefront API address of the subscription; POST /pause, /resume, /skip or /cancel to it. |
PortalSubscriptionLine
One line of a subscription.
Acessado como: portal.subscriptions[].items[]
| Chave | Tipo | Descrição |
|---|---|---|
title | string | The product, with the variant's title when it has one. |
quantity | number | How many of it each order brings. |
unit_price_cents | number or nil | What one unit costs today, in cents. |
PortalOrderItem
An order in the portal's lists.
Acessado como: portal.orders[]
| Chave | Tipo | Descrição |
|---|---|---|
number | string or nil | The order number. |
status | string | The order status. |
fulfillment_status | string or nil | The fulfillment status. |
status_label | string | Where it stands, in the customer's words, such as "Em preparação". |
tone | string | How to color it: attention (waiting on the customer), progress, done or cancelled. |
open | boolean | True while the order is attention or progress. |
total_cents | number | The total in cents. |
created_at | string | When it was placed, as an RFC 3339 timestamp. |
created_on | string | created_at as a local date, dd/mm/yyyy. |
item_count | number | Total quantity of items. |
first_title | string or nil | The title of the first item. |
images | array of string | Up to 3 item image addresses. |
url | string | The order's page in the portal. |
PortalOrder
One order on its page in the portal.
Acessado como: portal.order, portal.tracking.order
| Chave | Tipo | Descrição |
|---|---|---|
id | string | The order's UUID. |
number | string | The order number. |
status | string | The order status. |
payment_status | string or nil | The payment status. |
fulfillment_status | string or nil | The fulfillment status. |
status_label | string | Where it stands, in the customer's words. |
tone | string | How to color it: attention, progress, done or cancelled. |
steps | array of json | The progress steps. Empty for cancelled and refunded orders. |
payment | json or nil | How it was paid and what is still due. |
delivery | json or nil | Where and how it is delivered. |
created_at | string | When it was placed, as an RFC 3339 timestamp. |
created_on | string | created_at as a local date, dd/mm/yyyy. |
currency | string | ISO 4217 currency code. |
subtotal_cents | number | Sum of the items in cents. |
discount_cents | number | Discounts in cents. |
shipping_cents | number | Shipping in cents. |
total_cents | number | The total in cents. |
items | array of json | The order's items, each with its stage. |
shipments | array of json | The shipments, with tracking. |
nfe | json or nil | The invoice (NF-e) with the DANFE link; nil until issued. |
corrections | array of json | The cartas de correção issued for the invoice. |
PortalTracking
Guest order tracking (portal.tracking). The form posts number, contact (e-mail or CPF/CNPJ) and return_to to lookup_url; the platform comes back to the page with the order's link (?pedido=<id>&t=<token>) or the reason it found nothing (?erro=). A wrong pair and an order that does not exist get the same answer.
Acessado como: portal.tracking
| Chave | Tipo | Descrição |
|---|---|---|
lookup_url | string | Where the form posts (slug based: a plain HTML form). |
error | string or nil | Why nothing is shown, in the shopper's words; nil when there is nothing to say. |
order | PortalOrder or nil | The order the page's link names, without the delivery address and the fiscal documents (delivery.lines empty for a delivery, nfe nil, no returns or downloads); nil before a lookup or when the link is not valid. |
pay_path | string or nil | The order's own page (/pedidos/<id>?t=<token>), where an unpaid order is paid; nil without an order. Prefix routes.home_url when it is not /. |
Depuração
Para ver o que um objeto contém enquanto você monta um tema, imprima com o filtro json. Ele funciona com qualquer objeto, lista ou valor, e escapa <, > e &, então o resultado é seguro dentro de um elemento <script>:
<script type="application/json" id="debug">{{ product | json }}</script>Depois, no console do navegador:
JSON.parse(document.getElementById("debug").textContent)Ou veja um valor na própria página: {{ product.price_range | json }}, {{ request | json }}, {{ cart | json }}. Imprima template e request.page_type para saber em que tipo de página você está (template.name usa os nomes da Shopify, request.page_type os da plataforma). Tire a depuração antes de publicar.
O que costuma explicar uma página que falha:
- Chave ausente. Imprimir uma chave marcada "may be absent", um global que a página não tem ou uma propriedade de nil falha a página na visualização (a loja publicada mostra vazio). Proteja com
{% if ... %}. - Centavos. Preços são inteiros em centavos. Imprima com o filtro
moneye nunca divida à mão. compare_at_price. Em uma variante é o preço promocional (menor queprice), o contrário da Shopify.- Listas trazem menos. Um produto de
products,collection.productsousearch.resultsnão tem opções, avaliações, especificações nem vídeo de destaque. Leia o produto completo na página dele.
Para ver o tema sem publicar, abra uma implantação no endereço de visualização. O endereço é <ref>--<loja>.<domínio de visualização>, em que <ref> é o id da implantação, o SHA de um commit (7 a 40 caracteres), pr-<número> ou o nome de uma branch, e <loja> é o identificador da loja. Os endereços de visualização exigem uma sessão conectada, servem a página sem minificar para os erros ficarem legíveis e mostram uma barra para anotações. Uma página que falha ao renderizar mostra o template e a mensagem.
Temas e o SDK da loja
O que a plataforma entrega a todo tema Liquid, e o SDK para temas e lojas headless.
Guia da Storefront API
Monte uma loja sobre a Mobiari com a API do comprador. Chaves publicáveis, um passo a passo com curl do catálogo ao pedido pago, o modelo do carrinho e todos os códigos de erro.