MobiariDocs

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 com default.
  • 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 (product fora 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.

TemplateEndereçoObjetos da páginaO que é
index/products, new_products, collectionsA página inicial da loja: banners, produtos em destaque e categorias.
collections/categoriascollectionsA lista de todas as categorias.
all_products/produtosproducts, listing, paginateO 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, paginateUma 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}productUm 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/carrinhonenhum além dos globaisO carrinho e as etapas do checkout.
search/buscasearchResultados da busca de ?q=, 24 por página, ordenados por relevância, preço ou data.
wishlist/favoritoswishlistOs produtos que o visitante (ou o cliente que entrou) salvou. Um tema sem template de favoritos responde 404 neste endereço.
booking/agendarnenhum além dos globaisO 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, entriesUma 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}orderOnde o checkout termina quando o pedido existe: a página de agradecimento, com os dados para eventos de rastreamento.
404qualquer endereço que nada mais atendenenhum além dos globaisQualquer 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/contaportalO 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/pedidosportalOs pedidos do cliente, do mais novo ao mais antigo (até 50).
account_order/conta/pedidos/{number}portalUm pedido: etapas, pagamento, entrega, remessas com rastreio, o DANFE e as cartas de correção.
account_products/conta/produtosportalO que o cliente comprou, item a item, com a etapa de cada um.
account_login/conta/entrarportalEntrada por código de uso único. Qualquer endereço da conta mostra esta página a quem não entrou.
account_profile/conta/dadosportalNome, telefone, documento, endereço de entrega e consentimentos do cliente.
account_wallet/conta/carteiraportalO 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/rastreioportalAcompanhar 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.

NomeTipoDescrição
shopShopThe store.
requestRequestThe page being rendered.
routesRoutesThe store's addresses.
cartCart or nilThe visitor's open cart. Nil when there is none, except on the cart page, which always gets a cart (empty when needed).
customerCustomer, may be absentThe signed-in customer. The key is absent when nobody is signed in: test it with {% if customer %}.
productsarray of ProductA 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_productsarray of ProductThe 8 newest products on the home page. An empty list elsewhere.
listingListing or nilThe 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.
paginatePaginate or nilThe pages of that list (?pagina=N). Nil elsewhere.
collectionsarray of CollectionEvery collection on the home page and the categories list. An empty list elsewhere.
templateTemplateThe page type in Shopify's naming, so layouts can branch with {% if template.name == 'product' %}.
page_titlestringThe 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_descriptionstringA 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.
settingsjsonThe 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.
localeLocaleThe language in use: code and the flattened translation strings that the t filter reads (locale.strings['cart.title']).
deployment_versionstringA 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.
discountsStorefrontDiscountsSummaryThe best active PIX and card rules of the store, on every page so a listing can show "8% off with PIX" without another request.
cmsmap of array of CmsDocumentEvery active CMS collection by slug, each an array of documents: {% for v in cms.hero_videos %}. Slugs with hyphens are also reachable with underscores.
formsmap of FormThe store's active forms by slug: forms.contato, forms['fale-conosco']. Empty object when there are none.
portalPortal or nilThe customer portal's data. Nil outside the account pages.
brandBrand or nilThe 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.
menusmap of MenuThe site's menus by handle: menus.main.items.
canonical_urlstringThe page's absolute canonical address, for <link rel="canonical">.
og_imagestring, may be absentAbsolute 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.

NomeTipoDescrição
content_for_layoutstringThe page's rendered HTML. Only in layout/theme.liquid: print it with {{ content_for_layout }}.
section_groupsmap of stringThe rendered HTML of each section group by name (header-group, footer-group...). Only in layout/theme.liquid; {% sections 'header-group' %} prints one.
sectionSectionThe 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.json ou templates/index.liquid no 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

NomeTipoDescrição
productsarray of ProductA 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_productsarray of ProductThe 8 newest products on the home page. An empty list elsewhere.
collectionsarray of CollectionEvery collection on the home page and the categories list. An empty list elsewhere.

Categorias

A lista de todas as categorias.

  • Template: collections, templates/collections.json ou templates/collections.liquid no tema. template.name é collections.
  • Endereço: /categorias

Objetos que esta página acrescenta

NomeTipoDescrição
collectionsarray of CollectionEvery 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.json ou templates/all_products.liquid no 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

NomeTipoDescrição
productsarray of ProductA 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.
listingListing or nilThe 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.
paginatePaginate or nilThe 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.json ou templates/collection.liquid no 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

NomeTipoDescrição
collectionCollectionThe collection (or the synthesized collection of a taxonomy term). Only on collection pages.
listingListing or nilThe 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.
paginatePaginate or nilThe pages of that list (?pagina=N). Nil elsewhere.

collection (Collection)

ChaveTipoDescrição
idstringThe collection's UUID. A taxonomy filter page gets a synthesized collection.
titlestringThe collection's name.
handlestringThe collection's URL slug.
productsarray of ProductThe 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.
descriptionstring or nilThe collection's description. Nil when none.
imageProductImage, may be absentThe first image of the first product that has one. The key is absent when no product has an image.
products_countnumber, may be absentProducts 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_countnumber, may be absentProducts in the category without filters. Only on a category page that pages on the server.
filtersarray of Filter, may be absentThe filters of the page (see listing.filters). Only on a category page that pages on the server.
sort_bystring, may be absentThe 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.json ou templates/product.liquid no tema. template.name é product.
  • Endereço: /produtos/{handle}

Objetos que esta página acrescenta

NomeTipoDescrição
productProductThe product. Only on product pages.

product (Product)

ChaveTipoDescrição
idstringThe product's UUID.
titlestringThe product's title.
handlestringThe product's URL slug: its page is {{ routes.products_url }}/{{ product.handle }}.
product_typestringAlways product for now, because there is no product type field yet.
vendorstringThe brand name set on the product; empty string when none.
availablebooleanTrue 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_atstringWhen the product was created, as an RFC 3339 timestamp.
updated_atstringWhen the product was last changed, as an RFC 3339 timestamp.
tagsarray of stringAlways empty for now, because products have no tags yet.
category_slugsarray of stringSlugs 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.
highlightsarray of stringThe bullet-point highlights typed in the admin.
variantsarray of ProductVariantThe active variants, in the order set in the admin.
optionsarray of ProductOptionOption 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_imageProductImage, may be absentThe 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_variantProductVariant, may be absentThe 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_variantProductVariant, may be absentThe same as selected_variant, under the name Shopify's Dawn themes use.
imagesarray of ProductImageThe product's media (images and videos) in gallery order. See media_type.
price_rangePriceRangeLowest and highest price the customer pays across the variants, in cents (the card price, see variant.final_price).
lowest_price_variantProductVariant or nilThe 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_variesbooleanTrue when the variants counted in lowest_price_variant do not all cost the same: a card then says "a partir de" before the price.
descriptionstring or nilThe description as rich HTML, sanitized (no scripts or inline handlers), so it is safe to print unescaped. Nil when the product has none.
short_descriptionstringA one-line description to show above the highlights; empty string when not set (and in product lists).
compare_at_price_rangePriceRange, may be absentNot filled yet, so the key is always absent. Read variant.compare_at_price instead.
fieldsarray of FieldThe 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>.
fieldmap of FieldThe same fields by key: product.field.tipo_de_madeira.value. Nil for a key the product has no value for.
reference_tablesarray of ReferenceTableThe 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.
promotionsarray of ProductPromotionThe 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.
specificationsarray of SpecGroupSpecifications 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_togetherBoughtTogether or nilCompre 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_productsarray of ProductUp to 12 related products chosen in the admin, loaded without their own options, reviews or specifications. Empty in product lists.
reviewsarray of ReviewThe product's approved reviews, newest first, at most 50. Empty in product lists.
rating_summaryRatingSummaryCounts and average of the approved reviews. Zeros in product lists.
highlight_video_urlstring or nilA 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_urlstring or nilCover image of the highlight video; nil when there is none.
is_gift_cardbooleanTrue 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_amountbooleanTrue 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_optionsarray of SubscriptionOptionThe 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_providerstring or nilyoutube, vimeo, upload or external; nil when the product has no highlight video.
model_urlstringThe 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_placementstringWhere AR places the model: floor (the default) or wall.

Carrinho

O carrinho e as etapas do checkout.

  • Template: cart, templates/cart.json ou templates/cart.liquid no 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)

ChaveTipoDescrição
idstringThe cart's UUID.
subtotal_pricenumberSum of the lines, in cents, before shipping and discounts.
shipping_pricenumberShipping in cents: the selected freight option or the pickup fee. 0 until one is chosen.
discount_centsnumberDiscount in cents already applied to total_price.
discount_codestring or nilThe coupon code the shopper applied, which discount_cents comes from; nil when there is none.
discount_code_issuestring or nilWhy 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.
promotionsarray of CartPromotionThe 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_centsnumberWhat the promotions take off together, in cents; 0 when none applies.
promotion_progressarray of PromotionProgressWhat 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_pricenumberWhat checkout will charge, in cents: the subtotal plus shipping minus the discount, after the store's price rounding.
item_countnumberNumber of items, counting quantities: two units of one variant count 2.
currencystringISO 4217 currency code of the cart.
requires_shippingbooleanTrue when at least one line is a physical product. False for carts of only digital goods or gift cards.
has_gift_cardbooleanThe cart buys gift cards: no coupon, no credit and no discount apply.
freight_optionsarray of FreightQuoteOptionShipping options quoted for destination_postal_code; empty until a quote is made.
itemsarray of CartItemThe lines in the cart, oldest first.
destination_postal_codestringThe CEP the shipping was quoted for; empty string until one is quoted.
selected_freight_option_idstringThe option_id of the chosen entry of freight_options; empty string when none is chosen.
discount_previewsarray of DiscountPreviewFor 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_draftContactDraftThe buyer's contact and address fields as last saved, to pre-fill checkout so its first render is already complete.
fulfillment_methodstringshipping (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_idstringThe chosen pickup location's id when fulfillment_method is pickup; empty string otherwise.
pickup_locationsarray of PickupLocationThe store's locations that accept pickup (active and pickup-enabled), by position.
wholesale_issuesarray of WholesaleIssueWhat 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_quotebooleanTrue 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_pricebooleanQuote carts only: the seller fixed the prices. False on ordinary carts.
lock_freightbooleanQuote carts only: the seller fixed the shipping option. False on ordinary carts.
lock_addressbooleanQuote carts only: the seller fixed the delivery address. False on ordinary carts.
max_installmentsnumber or nilThe 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_centsnumberThe store's smallest installment, in cents.
installment_planarray of InstallmentOptionThe 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_shippingFreeShipping or nilThe 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.
offersarray of CartOfferProducts 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_onstringThe 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_enabledbooleanTrue when the store takes scheduled orders: checkout may offer a date field between scheduling_earliest_on and scheduling_latest_on.
scheduling_earliest_onstringThe 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_onstringThe 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.

Resultados da busca de ?q=, 24 por página, ordenados por relevância, preço ou data.

  • Template: search, templates/search.json ou templates/search.liquid no tema. template.name é search.
  • Endereço: /busca

Objetos que esta página acrescenta

NomeTipoDescrição
searchSearchThe search results. Only on the search page.

search (Search)

ChaveTipoDescrição
termsstringThe search text (?q=), trimmed.
performedbooleanTrue when there were terms to search for.
results_countnumberHow many products match, across all pages.
pagenumberThe current page, starting at 1 (?page=).
pagesnumberHow many pages of 24 results there are, at least 1.
sortstringThe order in use (?sort=): relevance (the default), price-asc, price-desc or newest.
resultsarray of ProductThe 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.json ou templates/wishlist.liquid no tema. template.name é wishlist.
  • Endereço: /favoritos

Objetos que esta página acrescenta

NomeTipoDescrição
wishlistWishlistThe saved products. Only on the favorites page.

wishlist (Wishlist)

ChaveTipoDescrição
productsarray of ProductThe saved products, newest first. Empty in previews.
countnumberHow many products are saved.
signed_inbooleanTrue when the list belongs to a signed-in customer.
alertsbooleanTrue when the customer can get price and stock alerts for the list.
sharedbooleanTrue 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_namestringThe 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.json ou templates/booking.liquid no 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.json ou templates/page.liquid no 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

NomeTipoDescrição
pagePageThe page's content. Only on content pages (and on pages made in the site editor, without a body).
entryCmsDocumentThe CMS document of an entry address. Only on the entry view of a CMS page.
entriesarray of CmsDocumentThe documents of the page's CMS collection. Only on a CMS page's list view.

page (Page)

ChaveTipoDescrição
idstringThe page's UUID.
titlestringThe page's title.
handlestringThe page's URL slug.
contentstringThe page body as HTML, sanitized (no scripts or inline handlers). Empty for pages made in the site editor, whose content is their sections.
authorstring, may be absentThe author's name. The key is absent when the page has none.
published_atstring, may be absentWhen the page was published, as an RFC 3339 timestamp. The key is absent when unknown.

entries (CmsDocument)

ChaveTipoDescrição
idstringThe document's UUID.
slugstring or nilThe document's slug, used in entry addresses; nil when it has none.
positionnumberThe order set in the admin; documents arrive sorted by it.
urlstring, may be absentThe 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.json ou templates/order_success.liquid no tema. template.name é order_success.
  • Endereço: /pedidos/{order_id}

Objetos que esta página acrescenta

NomeTipoDescrição
orderOrderSummaryThe order just placed. Only on the order confirmation page.

order (OrderSummary)

ChaveTipoDescrição
idstringThe order's UUID.
item_variant_idsarray of stringVariant 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_quantitiesarray of numberThe quantity of each of those lines, in the same order as item_variant_ids.
item_countnumberTotal quantity of items in the order.
meta_browser_purchasebooleanWhether 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.
numberstring or nilThe order number shown to the customer; nil when the order has none.
total_centsnumberOrder total in cents.
subtotal_centsnumberSum of the items in cents, before shipping and discounts.
shipping_centsnumberShipping in cents.
discount_centsnumberDiscounts in cents.
currencystringISO 4217 currency code of the order.
payment_statusstring or nilThe payment status, such as captured once paid; nil when unknown.
fulfillment_statusstring or nilThe fulfillment status; nil when unknown.
customer_namestring or nilThe customer's name; nil when unknown.
customer_emailstring or nilThe customer's e-mail; nil when unknown.
created_atstringWhen the order was placed, as an RFC 3339 timestamp.
statusstringThe order's status: pending (waiting for payment), paid, fulfilled, cancelled or refunded.
payment_statestringWhere 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.
payablebooleanTrue when a new payment can be made for the order (pay_url): it still waits for one.
payment_methodstring or nilThe last payment attempt's method (pix, card, boleto); nil before any.
pix_codestring or nilThe PIX "copia e cola" code while payment_state is waiting by PIX; nil otherwise.
pix_qrstring or nilThe PIX QR code as an image URL (data:image/png;base64,...) while it waits; nil otherwise.
pix_expires_atstring or nilWhen the PIX code stops working, as an RFC 3339 timestamp; nil when there is none.
payment_redirect_urlstring or nilThe gateway's page where a card payment is finished (Asaas), while it waits; nil otherwise.
boleto_urlstring or nilThe boleto to print or save (a PDF or the gateway's page) while payment_state is waiting by boleto; nil otherwise.
boleto_linestring or nilThe boleto's linha digitável (47 digits, no separators), to paste in a bank app, while it waits; nil otherwise.
boleto_line_formattedstring or nilThe linha digitável grouped as printed on a boleto (23793.38128 60000.000003 ...), while it waits; nil otherwise.
boleto_barcodestring or nilThe boleto's barcode (44 digits) while it waits; nil otherwise.
boleto_due_datestring or nilWhen the boleto is due (YYYY-MM-DD) while it waits; nil otherwise.
boleto_pix_codestring or nilA PIX "copia e cola" code that pays the same boleto, when the gateway issues one; nil otherwise.
boleto_pix_qrstring or nilThat PIX as a QR code image URL (data:image/png;base64,...); nil otherwise.
boleto_expires_atstring or nilUntil 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_messagestring or nilWhy the last attempt failed, in the shopper's words, when payment_state is failed; nil otherwise.
refunded_centsnumberWhat was refunded, in cents (0 when nothing was).
pay_urlstringThe 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_urlstringThe endpoint to poll for the payment's state (GET, state as payment_state above).
loyaltyOrderLoyalty or nilWhat 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.json ou templates/404.liquid no 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

NomeTipoDescrição
portalPortal or nilThe customer portal's data. Nil outside the account pages.

portal (Portal)

ChaveTipoDescrição
storestringThe store's slug.
store_namestringThe store's name.
signed_inbooleanTrue when a customer is signed in.
whatsappbooleanTrue when sign-in codes can be sent by WhatsApp.
return_tostringThe address to come back to after signing in.
logout_urlstringEndpoint that signs out: submit a POST form to it.
api_urlstringBase of the Storefront API for the portal's scripts.
storefront_keystring or nilThe publishable storefront key; nil when the lookup failed.
profile_urlstringStorefront API address of the customer's profile.
urlsPortalUrlsThe portal's own pages.
sign_in_providersarray of jsonThe 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_errorstring or nilWhy a sign-in with Google or Apple did not finish, in the shopper's words (from ?entrar=); nil otherwise. Set on account_login.
helpPortalHelp or nil, may be absentHow to reach the store, from its WhatsApp channel and company data. Only for a signed-in customer; nil when the store has neither.
customerPortalCustomer, may be absentThe signed-in customer's profile. Absent when nobody is signed in.
data_urlstring, may be absentWhere the customer downloads a copy of their data (LGPD). Only for a signed-in customer.
privacy_requests_urlstring, may be absentStorefront API address of the customer's privacy requests. Only for a signed-in customer.
privacy_openarray of json, may be absentThe customer's open privacy requests (kind, created_at). Only for a signed-in customer.
deletion_openboolean, may be absentTrue when a data deletion request is open. Only for a signed-in customer.
saved_cardsarray of json, may be absentThe 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_urlstring, may be absentStorefront API address of the customer's saved cards (DELETE <cards_url>/<id> removes one). Only for a signed-in customer.
orderPortalOrder or nil, may be absentThe order on the order page (nil when it was not found). Only on account_order.
trackingPortalTracking, may be absentThe guest tracking form and the order it found. Only on account_tracking.
ordersarray of PortalOrderItem, may be absentThe customer's orders, newest first, at most 50. Only on account, account_orders and account_products.
productsarray of json or nil, may be absentWhat the customer bought, item by item, with its stage. Only on account and account_products.
loyaltyPortalLoyalty or nil, may be absentPoints, 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.
subscriptionsarray of PortalSubscriptionItem, may be absentThe customer's running subscriptions (active or paused; cancelled ones are left out), with the words and dates ready. Only on account.
bookingsPortalBookings, may be absentThe 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

NomeTipoDescrição
portalPortal or nilThe customer portal's data. Nil outside the account pages.

portal.orders (PortalOrderItem)

ChaveTipoDescrição
numberstring or nilThe order number.
statusstringThe order status.
fulfillment_statusstring or nilThe fulfillment status.
status_labelstringWhere it stands, in the customer's words, such as "Em preparação".
tonestringHow to color it: attention (waiting on the customer), progress, done or cancelled.
openbooleanTrue while the order is attention or progress.
total_centsnumberThe total in cents.
created_atstringWhen it was placed, as an RFC 3339 timestamp.
created_onstringcreated_at as a local date, dd/mm/yyyy.
item_countnumberTotal quantity of items.
first_titlestring or nilThe title of the first item.
imagesarray of stringUp to 3 item image addresses.
urlstringThe 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

NomeTipoDescrição
portalPortal or nilThe customer portal's data. Nil outside the account pages.

portal.order (PortalOrder)

ChaveTipoDescrição
idstringThe order's UUID.
numberstringThe order number.
statusstringThe order status.
payment_statusstring or nilThe payment status.
fulfillment_statusstring or nilThe fulfillment status.
status_labelstringWhere it stands, in the customer's words.
tonestringHow to color it: attention, progress, done or cancelled.
stepsarray of jsonThe progress steps. Empty for cancelled and refunded orders.
paymentjson or nilHow it was paid and what is still due.
deliveryjson or nilWhere and how it is delivered.
created_atstringWhen it was placed, as an RFC 3339 timestamp.
created_onstringcreated_at as a local date, dd/mm/yyyy.
currencystringISO 4217 currency code.
subtotal_centsnumberSum of the items in cents.
discount_centsnumberDiscounts in cents.
shipping_centsnumberShipping in cents.
total_centsnumberThe total in cents.
itemsarray of jsonThe order's items, each with its stage.
shipmentsarray of jsonThe shipments, with tracking.
nfejson or nilThe invoice (NF-e) with the DANFE link; nil until issued.
correctionsarray of jsonThe 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

NomeTipoDescrição
portalPortal or nilThe 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

NomeTipoDescrição
portalPortal or nilThe 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

NomeTipoDescrição
portalPortal or nilThe customer portal's data. Nil outside the account pages.

portal.customer (PortalCustomer)

ChaveTipoDescrição
idstringThe customer's UUID.
emailstring or nilThe e-mail; nil when none.
full_namestring or nilThe full name; nil when none.
phonestring or nilThe phone in E.164; nil when none.
phone_displaystring or nilThe phone as people write it, (11) 98765-4321; nil when none.
documentstring or nilCPF or CNPJ, digits only; nil when none.
document_displaystring or nilThe document with its punctuation; nil when none.
date_of_birthstring or nilYYYY-MM-DD; nil when none.
addressjson or nilThe default delivery address in its parts (postal_code, postal_code_display, street, number, complement, neighborhood, city, state); nil when none.
addressesarray of jsonEvery saved address, the default first.
email_opt_inbooleanTrue when the customer accepts offers by e-mail.
whatsapp_opt_inbooleanTrue when the customer accepts offers by WhatsApp.
created_atstringWhen the customer registered, as an RFC 3339 timestamp.
created_onstringcreated_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

NomeTipoDescrição
portalPortal or nilThe 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

NomeTipoDescrição
portalPortal or nilThe 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

ChaveTipoDescrição
points_enabledbooleanTrue when purchases earn points.
cashback_enabledbooleanTrue when purchases earn cashback.
cashback_bpsnumberCashback 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_ratenumberPoints 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.
tierstring or nilThe shopper's tier; nil for a visitor below the lowest tier, or without tiers.
pending_daysnumberDays after payment before what a purchase earns counts.

Shop

Acessado como: shop

ChaveTipoDescrição
namestringThe store's name, as set in the admin.
slugstringThe store's identifier. It is also the {slug} in the platform's own storefront paths (/storefront-api/{slug}/...).
domainstringThe 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.
currencystringISO 4217 code of the store's currency; BRL when none is set.
money_formatstringAlways 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_centsnumberThe 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_realnumberLoyalty 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.
loyaltyShopLoyaltyWhat 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_typesarray of stringCodes of the payment providers the store has active, sorted alphabetically.
payment_methodsarray of stringThe 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_pagebooleanTrue when the card is typed on the gateway's own page (Asaas) instead of a card form in the store.
installmentsShopInstallmentsThe store's card installments: what the installment and installment_plan filters and checkout price with.
descriptionstring or nilThe store's description: the one in the editor's Theme settings (SEO), else the brand profile's tagline. Nil when there is neither.
emailstring, may be absentThe 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.
phonestring, may be absentThe 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.
legalShopLegal or nilThe store's legal identity (name, document, address, email, phone, privacy_url, returns_url, terms_url). Nil until the identity is complete in the admin.
policiesShopPoliciesThe 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.
companyShopCompanyWhat the store saved in "Dados da empresa" (name, document, address), complete or not; each part nil until it is filled in.
storefront_keystring or nilThe 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.
wholesaleWholesaleThe 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

ChaveTipoDescrição
prices_hiddenbooleanTrue 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_hintbooleanTrue 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_liststring or nilThe price list the signed-in customer pays (their prices are already in variant.final_price); nil for everybody else.
min_order_centsnumberThe signed-in reseller's smallest order, in cents; 0 when there is none.
min_item_quantitynumberThe fewest units of a product per order (every size and colour together); 0 when there is none.
pack_sizenumberProducts are sold in multiples of this many units; 0 when any quantity is fine.
applications_openbooleanThe store takes "Seja um revendedor" requests (the reseller-signup section shows its form only then).
turnstile_site_keystring or nilThe 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[]

ChaveTipoDescrição
codestringmin_order, min_quantity, pack_size or not_available; more may come.
messagestringReady to show, in Portuguese.
product_idstringThe product it is about; empty string for min_order.

Request

Acessado como: request

ChaveTipoDescrição
pathstringThe URL path, as the visitor sees it.
page_typestringThe 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.
localestringThe store's default locale code, such as pt-BR. It is also the locale.code the t filter translates with.
hoststringThe host the visitor is on (loja.com.br, a preview host), without the port.
schemestringAlways https.
querymap of stringThe 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.
portnumber, may be absentAlways absent today.

ContactDraft

Acessado como: cart.contact_draft

ChaveTipoDescrição
namestringThe buyer's full name as last saved in checkout; empty until typed.
emailstringThe buyer's e-mail as last saved in checkout; empty until typed.
phonestringThe buyer's phone as last saved in checkout; empty until typed.
zip_codestringThe delivery CEP as last saved in checkout; empty until typed.
streetstringThe delivery street as last saved in checkout; empty until typed.
numberstringThe street number as last saved in checkout; empty until typed.
neighborhoodstringThe neighborhood as last saved in checkout; empty until typed.
citystringThe city as last saved in checkout; empty until typed.
statestringThe state (UF) as last saved in checkout; empty until typed.
additional_infostringThe address complement as last saved in checkout; empty until typed.
documentstringThe buyer's CPF or CNPJ as last saved; empty until typed. A quote link can arrive with it already filled in.
email_opt_inbooleanWhether the box that accepts offers by e-mail is ticked, as last saved.
whatsapp_opt_inbooleanWhether the box that accepts offers by WhatsApp is ticked (see email_opt_in).
billing_same_as_shippingbooleanWhether the box "use the same address for billing" is ticked, as last saved: true until the shopper unticks it.
billing_zip_codestringThe billing CEP typed with that box unticked; empty until typed.
billing_streetstringThe billing street; empty until typed.
billing_numberstringThe billing street number; empty until typed.
billing_neighborhoodstringThe billing neighborhood; empty until typed.
billing_citystringThe billing city; empty until typed.
billing_statestringThe billing state (UF); empty until typed.
billing_additional_infostringThe billing address complement; empty until typed.

Cart

The visitor's open cart, priced the way checkout will charge it.

Acessado como: cart

ChaveTipoDescrição
idstringThe cart's UUID.
subtotal_pricenumberSum of the lines, in cents, before shipping and discounts.
shipping_pricenumberShipping in cents: the selected freight option or the pickup fee. 0 until one is chosen.
discount_centsnumberDiscount in cents already applied to total_price.
discount_codestring or nilThe coupon code the shopper applied, which discount_cents comes from; nil when there is none.
discount_code_issuestring or nilWhy 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.
promotionsarray of CartPromotionThe 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_centsnumberWhat the promotions take off together, in cents; 0 when none applies.
promotion_progressarray of PromotionProgressWhat 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_pricenumberWhat checkout will charge, in cents: the subtotal plus shipping minus the discount, after the store's price rounding.
item_countnumberNumber of items, counting quantities: two units of one variant count 2.
currencystringISO 4217 currency code of the cart.
requires_shippingbooleanTrue when at least one line is a physical product. False for carts of only digital goods or gift cards.
has_gift_cardbooleanThe cart buys gift cards: no coupon, no credit and no discount apply.
freight_optionsarray of FreightQuoteOptionShipping options quoted for destination_postal_code; empty until a quote is made.
itemsarray of CartItemThe lines in the cart, oldest first.
destination_postal_codestringThe CEP the shipping was quoted for; empty string until one is quoted.
selected_freight_option_idstringThe option_id of the chosen entry of freight_options; empty string when none is chosen.
discount_previewsarray of DiscountPreviewFor 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_draftContactDraftThe buyer's contact and address fields as last saved, to pre-fill checkout so its first render is already complete.
fulfillment_methodstringshipping (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_idstringThe chosen pickup location's id when fulfillment_method is pickup; empty string otherwise.
pickup_locationsarray of PickupLocationThe store's locations that accept pickup (active and pickup-enabled), by position.
wholesale_issuesarray of WholesaleIssueWhat 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_quotebooleanTrue 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_pricebooleanQuote carts only: the seller fixed the prices. False on ordinary carts.
lock_freightbooleanQuote carts only: the seller fixed the shipping option. False on ordinary carts.
lock_addressbooleanQuote carts only: the seller fixed the delivery address. False on ordinary carts.
max_installmentsnumber or nilThe 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_centsnumberThe store's smallest installment, in cents.
installment_planarray of InstallmentOptionThe 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_shippingFreeShipping or nilThe 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.
offersarray of CartOfferProducts 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_onstringThe 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_enabledbooleanTrue when the store takes scheduled orders: checkout may offer a date field between scheduling_earliest_on and scheduling_latest_on.
scheduling_earliest_onstringThe 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_onstringThe 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[]

ChaveTipoDescrição
namestringThe promotion's name as written in the admin.
kindstringbuy_x_get_y or tiered.
amount_centsnumberWhat it takes off this cart, in cents.

PromotionProgress

What a cart still needs for a promotion's next step.

Acessado como: cart.promotion_progress[]

ChaveTipoDescrição
namestringThe promotion's name as written in the admin.
kindstringbuy_x_get_y or tiered.
remaining_centsnumberCents of eligible products still missing (a tier by amount); 0 otherwise.
remaining_quantitynumberEligible units still missing (a tier by quantity, buy X get Y); 0 otherwise.
reward_typestringpercent (a whole percent off) or fixed (cents off).
reward_valuenumberThe percent or the cents the next step gives.
reward_quantitynumberUnits 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

ChaveTipoDescrição
threshold_centsnumberThe lowest subtotal, in cents and after discounts, at which a free-shipping rule applies.
remaining_centsnumberHow much more the cart needs, in cents; 0 once it qualifies.
progress_percentnumberHow far along the cart is, 0 to 100, for a progress bar.
qualifiesbooleanTrue once the cart qualifies.

PickupLocation

Acessado como: cart.pickup_locations[]

ChaveTipoDescrição
idstringThe location's UUID.
slugstringThe location's identifier.
namestringThe location's name.
descriptionstringA short description; empty string when none.
phonestringContact phone; empty string when none.
whatsappstringContact WhatsApp number; empty string when none.
emailstringContact e-mail; empty string when none.
streetstringStreet; empty string when none.
numberstringStreet number; empty string when none.
complementstringAddress complement; empty string when none.
neighborhoodstringNeighborhood; empty string when none.
citystringCity; empty string when none.
statestringState (UF); empty string when none.
postal_codestringCEP; empty string when none.
pickup_instructionsstringWhat the buyer should do on arrival; empty string when none.
pickup_lead_minutesnumberMinutes until an order is ready to be picked up.
pickup_fee_centsnumberWhat picking up costs, in cents; usually 0.

StorefrontDiscountsSummary

Acessado como: discounts

ChaveTipoDescrição
pix_percent_offnumberPercentage 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_centsnumberFixed amount, in cents, the best PIX rule takes off; 0 when that rule is a percentage or there is none.
pix_labelstringThe PIX rule's name as written in the admin; empty string when there is none.
card_percent_offnumberPercentage the best card rule takes off; 0 when that rule is a fixed amount or there is none.
card_fixed_off_centsnumberFixed amount, in cents, the best card rule takes off; 0 when that rule is a percentage or there is none.
card_labelstringThe card rule's name as written in the admin; empty string when there is none.
boleto_percent_offnumberPercentage the best boleto rule takes off; 0 when that rule is a fixed amount or there is none.
boleto_fixed_off_centsnumberFixed amount, in cents, the best boleto rule takes off; 0 when that rule is a percentage or there is none.
boleto_labelstringThe 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

ChaveTipoDescrição
maxnumberThe most installments, 1 to 12.
interest_freenumberThe most interest-free installments (all of them when interest is none).
intereststringHow 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_bpnumberThe store's monthly rate in basis points (199 is 1,99% a month); 0 unless monthly_rate.
minnumberThe 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[]

ChaveTipoDescrição
countnumberHow many installments.
installmentnumberEach installment after the first, in cents.
first_installmentnumberThe first installment, in cents (it takes the division's remainder).
totalnumberWhat the card is charged, in cents.
interestnumberThe interest over the price, in cents; 0 when interest-free.
interest_freebooleanTrue when the total is the price itself: no interest.
monthly_rate_bpnumberThe store's monthly rate for this count, in basis points; 0 when interest-free.

DiscountPreview

Acessado como: cart.discount_previews[]

ChaveTipoDescrição
payment_methodstringThe payment method the rule applies to: pix, card or boleto.
amount_centsnumberWhat the rule takes off this cart, in cents.
kindstringThe rule's kind: percent_off or fixed_off.
namestringThe rule's name as written in the admin.

FreightQuoteOption

Acessado como: cart.freight_options[]

ChaveTipoDescrição
option_idstringThe identifier to send when selecting this option.
service_namestringThe carrier's service name, such as PAC.
shipping_centsnumberThe price in cents.
carrier_namestringThe carrier's name; empty string when unknown.
delivery_daysnumberEstimated delivery time in days; 0 when unknown.
provider_codestringWhich module produced the option, so a theme can group or label by carrier now that a quote can merge several.
base_shipping_centsnumberWhat 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[]

ChaveTipoDescrição
idstringThe line's UUID: send it to the cart endpoints to change or remove the line.
product_idstringUUID of the product.
variant_idstringUUID of the variant.
titlestringThe product title, followed by - and the variant title when the variant has its own name.
quantitynumberUnits of this variant in the cart.
pricenumberUnit price in cents, as checkout will charge it.
line_pricenumberprice times quantity, in cents.
skustringThe variant's SKU; empty string when it has none.
imageProductImage, may be absentThe 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_notestring, may be absentA 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_cardCartGiftCard, may be absentWho the gift card is for. The key is only present on gift card lines.
availablebooleanFalse 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

ChaveTipoDescrição
recipient_namestringWho receives the gift card.
recipient_emailstringThe e-mail the gift card is sent to.
messagestringThe personal message; empty string when none.
sender_namestringThe name shown as sender.
deliver_onstringYYYY-MM-DD, or empty for "as soon as it is paid".
deliver_on_labelstringdeliver_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

ChaveTipoDescrição
idstringThe customer's UUID.
emailstringThe customer's e-mail.
accepts_marketingbooleanWhether the customer opted in to marketing messages.
orders_countnumberNumber of the customer's real orders (test, draft, cancelled and refunded orders are not counted).
total_spentnumberSum of those orders, in cents.
tagsarray of stringThe tags set on the customer in the admin.
first_namestring, may be absentFirst name. The key is absent when the customer has none.
last_namestring, may be absentLast name. The key is absent when the customer has none.
phonestring or nilPhone. The key is absent when the customer has none.
ordersarray of CustomerOrderThe customer's latest 20 orders, newest first (no test or draft orders). The account pages have more in portal.orders.
addressesarray of CustomerAddressThe customer's saved addresses, for checkout to offer.
addresses_countnumberNumber of saved addresses.
default_addressCustomerAddress, may be absentThe default one of addresses. The key is absent when the customer has none.
billing_addressesarray of CustomerAddressThe 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_accountbooleanAlways true: only signed-in customers reach the theme as customer.

CustomerOrder

Acessado como: customer.orders[]

ChaveTipoDescrição
idstringThe order's UUID.
namestringThe order number, or the order's UUID when it has none.
numberstringThe order number; empty string when it has none.
statusstringThe order's status.
financial_statusstringThe payment status; empty string when unknown.
fulfillment_statusstringThe fulfillment status; empty string when unknown.
total_pricenumberThe order total in cents.
currencystringISO 4217 currency code of the order.
created_atstringWhen the order was placed, as an RFC 3339 timestamp.
order_status_urlstringAddress of the order's page in the customer portal.

CustomerAddress

Acessado como: customer.addresses[], customer.default_address, customer.billing_addresses[]

ChaveTipoDescrição
idstringThe address's UUID.
first_namestringRecipient's first name; empty string when unknown.
last_namestringRecipient's last name; empty string when unknown.
companystringCompany; empty string when unknown.
address1stringStreet and number on one line.
address2stringThe address complement.
citystringCity.
provincestringState (UF).
countrystringCountry code; BR for saved addresses.
zipstringCEP.
phonestringPhone; empty string when unknown.
defaultbooleanTrue for the customer's default address.
labelstringThe customer's name for the address, such as "Casa"; empty string when unnamed.
streetstringStreet, on its own (Brazilian parts of the address, for filling checkout).
numberstringStreet number, on its own.
complementstringAddress complement, on its own.
neighborhoodstringNeighborhood.

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[]

ChaveTipoDescrição
idstringThe product's UUID.
titlestringThe product's title.
handlestringThe product's URL slug: its page is {{ routes.products_url }}/{{ product.handle }}.
product_typestringAlways product for now, because there is no product type field yet.
vendorstringThe brand name set on the product; empty string when none.
availablebooleanTrue 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_atstringWhen the product was created, as an RFC 3339 timestamp.
updated_atstringWhen the product was last changed, as an RFC 3339 timestamp.
tagsarray of stringAlways empty for now, because products have no tags yet.
category_slugsarray of stringSlugs 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.
highlightsarray of stringThe bullet-point highlights typed in the admin.
variantsarray of ProductVariantThe active variants, in the order set in the admin.
optionsarray of ProductOptionOption 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_imageProductImage, may be absentThe 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_variantProductVariant, may be absentThe 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_variantProductVariant, may be absentThe same as selected_variant, under the name Shopify's Dawn themes use.
imagesarray of ProductImageThe product's media (images and videos) in gallery order. See media_type.
price_rangePriceRangeLowest and highest price the customer pays across the variants, in cents (the card price, see variant.final_price).
lowest_price_variantProductVariant or nilThe 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_variesbooleanTrue when the variants counted in lowest_price_variant do not all cost the same: a card then says "a partir de" before the price.
descriptionstring or nilThe description as rich HTML, sanitized (no scripts or inline handlers), so it is safe to print unescaped. Nil when the product has none.
short_descriptionstringA one-line description to show above the highlights; empty string when not set (and in product lists).
compare_at_price_rangePriceRange, may be absentNot filled yet, so the key is always absent. Read variant.compare_at_price instead.
fieldsarray of FieldThe 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>.
fieldmap of FieldThe same fields by key: product.field.tipo_de_madeira.value. Nil for a key the product has no value for.
reference_tablesarray of ReferenceTableThe 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.
promotionsarray of ProductPromotionThe 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.
specificationsarray of SpecGroupSpecifications 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_togetherBoughtTogether or nilCompre 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_productsarray of ProductUp to 12 related products chosen in the admin, loaded without their own options, reviews or specifications. Empty in product lists.
reviewsarray of ReviewThe product's approved reviews, newest first, at most 50. Empty in product lists.
rating_summaryRatingSummaryCounts and average of the approved reviews. Zeros in product lists.
highlight_video_urlstring or nilA 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_urlstring or nilCover image of the highlight video; nil when there is none.
is_gift_cardbooleanTrue 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_amountbooleanTrue 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_optionsarray of SubscriptionOptionThe 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_providerstring or nilyoutube, vimeo, upload or external; nil when the product has no highlight video.
model_urlstringThe 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_placementstringWhere 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

ChaveTipoDescrição
productsarray of ProductThe products offered with it, 1 to 3, as in product lists: only those a shopper can see and buy.
sourcestringcurated (chosen by the store) or bought_together (often in the same orders).
discount_typestringpercent, fixed (cents off per set) or empty string when the set has no discount.
discount_valuenumberWhole percent or cents, per discount_type; 0 without a discount.
min_productsnumberHow many products (this one included) the cart must hold for the discount.

CartOffer

A product the cart offers (cart.offers).

Acessado como: cart.offers[]

ChaveTipoDescrição
productProductThe product, as in product lists (variants, images, prices).
headlinestringThe store's line over it; empty string for the theme's own.
discount_percentnumberWhole percent off one unit while the cart holds another product; 0 for none.
reasonstringoffer (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[]

ChaveTipoDescrição
namestringThe promotion's name as written in the admin.
kindstringbuy_x_get_y or tiered.
labelstringThe 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[]

ChaveTipoDescrição
keystringThe field's key, as in the admin's field settings (tipo_de_madeira).
labelstringThe field's name for the shopper's language.
kindstringtext, longtext, number, integer, boolean, date, select, multiselect, email, url, phone or document.
groupstringThe group the field belongs to (Materiais); empty string when it has none. Group a table by it.
unitstringThe unit shown after the value (cm); empty string when it has none.
valuejsonThe value: text, a number, true or false, or, for multiselect, a list of texts.
displaystringThe 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[]

ChaveTipoDescrição
namestringThe term's display name.
slugstringThe term's URL slug.
taxonomy_slugstringThe taxonomy the term belongs to (brand, material...), to build the filter address and styling hooks.
urlstringThe 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[]

ChaveTipoDescrição
namestringThe field's display name.
slugstringThe field's identifier.
kindstringThe field's type: text, longtext, number, dimension, weight or taxonomy.
unitstringUnit of a number, dimension or weight field, such as cm; empty string otherwise.
is_taxonomybooleanTrue when the value is one or more taxonomy terms: read terms.
display_as_linkbooleanWhen 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.
textstringThe 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.
termsarray of SpecTermThe taxonomy terms of the value. Empty for non-taxonomy fields.

SpecGroup

Acessado como: product.specifications[], products[].specifications[], new_products[].specifications[]

ChaveTipoDescrição
namestringThe group's display name.
slugstringThe group's identifier.
fieldsarray of SpecFieldThe 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[]

ChaveTipoDescrição
idstringThe table's UUID.
namestringThe table's name, used as its heading ("Tabela de cores Lonita", "Guia de tamanhos").
kindstringswatches (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).
unitstringThe unit of every value (cm); empty string when the values carry none.
descriptionstringA note to show with the table (how to measure, care of the fabric), plain text; empty string when none.
image_urlstringA picture to show with the table (how to measure, the piece's shape); empty string when none.
image_large_urlstringThe same picture at up to 1600 px wide (WebP); empty string when none.
columnsarray of stringThe headings of the value columns ("Busto", "Cintura"; "Largura", "Altura", "Profundidade"), in the order of each entry's values. Often empty for a palette.
entriesarray of ReferenceTableEntryThe rows, in order: the swatches, the sizes or the shapes.
sourcestringWhere 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[]

ChaveTipoDescrição
labelstringThe swatch's name ("GREGE"), the size ("M", "10", "18M") or the shape ("Retangular").
codestringThe swatch's code ("LA45C075"); empty string when it has none.
image_urlstringThe entry's picture (the swatch's texture, the shape's drawing) as uploaded; empty string when none.
image_thumb_urlstringThe picture at up to 400 px wide (WebP), for the grid; empty string when none.
image_large_urlstringThe picture at up to 1600 px wide (WebP), for the enlarged view; empty string when none.
color_hexstringThe swatch's color as RRGGBB (several joined by / for a two-tone swatch), for a swatch without a picture; empty string when none.
valuesarray of stringOne 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_textstringThe 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_positionnumberThe 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_valuestringThe 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[]

ChaveTipoDescrição
idstringThe review's UUID.
author_namestringThe name the author gave.
ratingnumberStars, from 1 to 5.
titlestringThe review's headline; empty string when none.
bodystringThe review's text.
is_verified_purchasebooleanTrue when the author bought this product.
created_atstringWhen the review was written, as an RFC 3339 timestamp.

RatingSummary

Acessado como: product.rating_summary, products[].rating_summary, new_products[].rating_summary

ChaveTipoDescrição
totalnumberNumber of approved reviews.
averagenumberMean rating from 0 to 5; 0 when there are no reviews.
average_roundednumberaverage rounded to the nearest whole star.
count_5numberReviews with 5 stars.
count_4numberReviews with 4 stars.
count_3numberReviews with 3 stars.
count_2numberReviews with 2 stars.
count_1numberReviews with 1 star.

ProductVariant

Acessado como: product.variants[], product.selected_variant, product.selected_or_first_available_variant

ChaveTipoDescrição
idstringThe variant's UUID.
titlestringThe variant's name; Default for a product with a single variant.
pricenumberThe regular price in cents.
availablebooleanTrue 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.
skustringThe SKU; empty string when none.
fulfillment_modestringstocked, on_demand or stocked_or_on_demand.
lead_time_daysnumberDays to make the variant when it is made on demand; 0 otherwise.
expected_availability_atstringDate the variant is expected to be available, as an RFC 3339 timestamp; empty string when unknown.
compare_at_pricenumberThe 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_pricenumberWhat 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_pricenumberOne unit paid by PIX, in cents, with the store's PIX rule (its minimum and rounding included).
installmentsnumberHow many interest-free installments one unit allows, by the store's rule.
max_installmentsnumberThe most installments one unit allows, interest included (the gateway's, with shop.installments.interest provider, are priced only at checkout).
installment_planarray of InstallmentOptionEvery 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_tiersarray of PriceTierThe 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.
fieldsarray of FieldThe 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>.
fieldmap of FieldThe same fields by key: product.field.tipo_de_madeira.value. Nil for a key the product has no value for.
weightnumberThe weight of one unit in grams: the variant's, else the product's; 0 when neither has one.
weight_unitstringg when weight is known; empty string otherwise.
option1stringThis variant's value for the product's first option (product.options[0]); empty string when the product has no such option.
option2stringThis variant's value for the product's second option; empty string when the product has no such option.
option3stringThis 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[]

ChaveTipoDescrição
min_quantitynumberFrom how many units of the product (every size and colour together) the price applies.
pricenumberThe 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[]

ChaveTipoDescrição
valuestringThe value as the shopper sees it, such as "Azul".
color_hexstringHex color of the swatch, or several joined by / for a two-tone swatch; empty string when the value has no color.
swatch_urlstringURL 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[]

ChaveTipoDescrição
namestringThe option's name, such as "Cor" or "Tamanho".
positionnumber1-based position of the option: 1, 2 or 3, matching a variant's option1, option2 and option3.
is_colorbooleanTrue for a color option: show swatches instead of text buttons.
valuesarray of ProductOptionValueThe option's selectable values.

ProductImage

Acessado como: product.featured_image, product.images[], collection.image

ChaveTipoDescrição
idstringThe media's UUID.
media_typestringimage (the default) or video. Branch on it to print a <picture> or a <video> / iframe.
poster_urlstring, may be absentFor a video: its cover image. The key is only present on videos that have one.
providerstring, may be absentFor a video: upload, youtube, vimeo or external. The key is only present on videos.
variant_idstringThe UUID of the variant this image belongs to; empty string for a product-level image, shown on every variant.
variant_idsarray of stringEvery 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_kindstringgallery (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.
srcstringBest available URL: the large JPEG, else the medium one, else the original. For a video, the video's URL.
srcsetstringJPEG srcset for the small, medium and large widths. Empty for a video.
srcset_webpstringWebP srcset in the same shape. Empty for a video.
src_thumbstringThe 200 px JPEG; falls back to the original when the size does not exist. For a video, its poster.
src_smallstringThe 400 px JPEG; falls back to the original. For a video, its poster.
src_mediumstringThe 800 px JPEG; falls back to the original. For a video, its poster.
src_largestringThe 1600 px JPEG; falls back to the original. For a video, its poster.
src_thumb_webpstringThe 200 px WebP. Empty for a video.
src_small_webpstringThe 400 px WebP. Empty for a video.
src_medium_webpstringThe 800 px WebP. Empty for a video.
src_large_webpstringThe 1600 px WebP. Empty for a video.
positionnumberPosition in the gallery; lower comes first.
altstringAlternative text; empty string when none.
widthnumberWidth in pixels of the original; 0 when unknown.
heightnumberHeight 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[]

ChaveTipoDescrição
unitstringweek or month.
countnumberEvery how many weeks or months.
labelstring"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

ChaveTipoDescrição
minnumberThe lowest price, in cents.
maxnumberThe highest price, in cents.
min_pricenumberThe same as min, under the name Shopify themes use.
max_pricenumberThe same as max, under the name Shopify themes use.

Collection

A category and its products.

Acessado como: collection, collections[]

ChaveTipoDescrição
idstringThe collection's UUID. A taxonomy filter page gets a synthesized collection.
titlestringThe collection's name.
handlestringThe collection's URL slug.
productsarray of ProductThe 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.
descriptionstring or nilThe collection's description. Nil when none.
imageProductImage, may be absentThe first image of the first product that has one. The key is absent when no product has an image.
products_countnumber, may be absentProducts 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_countnumber, may be absentProducts in the category without filters. Only on a category page that pages on the server.
filtersarray of Filter, may be absentThe filters of the page (see listing.filters). Only on a category page that pages on the server.
sort_bystring, may be absentThe 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

ChaveTipoDescrição
products_countnumberProducts that match the filters, on every page.
all_products_countnumberProducts in the list without filters.
sort_bystringThe 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_bystringThe order the section starts with (its "Ordem inicial" setting).
sort_optionsarray of SortOptionThe orders a shopper can pick, each with its address.
filtersarray of FilterThe filters the section shows, in order: availability, price, brand, then each variant option (Cor, Tamanho...). Empty when the section's filters are off.
active_filtersarray of ActiveFilterEvery filter value in force, each with the address without it, for "remove" chips.
filteredbooleanTrue when a filter is in force: the page then names the unfiltered page as canonical and asks search engines not to index it.
urlstringThe page's address without parameters: the action of the filter form.
clear_urlstringThe 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[]

ChaveTipoDescrição
valuestringThe sort parameter's value: for the store's order an empty string when it is the default, featured otherwise.
namestringThe order's name: "Destaques", "Mais recentes", "Menor preço", "Maior preço", "Nome, A a Z", "Mais vendidos".
urlstringThe list's address in this order, back on its first page, filters kept.
selectedbooleanTrue 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[]

ChaveTipoDescrição
labelstringThe filter's name: "Disponibilidade", "Preço", "Marca", or the option's name ("Cor").
typestringlist, price_range or boolean.
param_namestringThe query parameter of a list or a yes/no (cor, marca, disponivel); a price range has min_param and max_param.
is_colorbooleanTrue for a colour option: show values[].swatch_hex.
valuesarray of FilterValueThe values of a list, or the single value of a yes/no.
active_countnumberHow many of its values are in force (1 for a price range with a bound).
min_paramstringA price range's lower-bound parameter (preco_min, in reais); empty string otherwise.
max_paramstringA price range's upper-bound parameter (preco_max, in reais); empty string otherwise.
min_valuestringThe lower bound in force as typed, in reais; empty string when none.
max_valuestringThe upper bound in force as typed, in reais; empty string when none.
range_minnumberThe lowest product price in the list with the other filters, in cents; 0 for a list.
range_maxnumberThe highest product price in the list with the other filters, in cents; 0 for a list.
url_to_removestringThe list's address without this filter.

FilterValue

One value of a filter.

Acessado como: collection.filters[].values[], listing.filters[].values[], collections[].filters[].values[]

ChaveTipoDescrição
labelstringThe value as shown ("Azul", "M", "Bododo", "Somente disponíveis").
valuestringThe value the parameter carries (Azul, 1).
param_namestringThe query parameter (cor): a checkbox's name.
countnumberProducts the list would hold with this value ticked, the other filters kept.
activebooleanTrue when the value is in force.
urlstringThe list's address with this value ticked, or without it when it is in force.
swatch_hexstring#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[]

ChaveTipoDescrição
labelstring"Cor: Azul", "Até R$ 200", "Somente disponíveis".
url_to_removestringThe 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

ChaveTipoDescrição
current_pagenumberThe page shown, from 1.
current_offsetnumberProducts before this page.
page_sizenumberProducts per page (the section's "Produtos por página").
pagesnumberHow many pages the list has (at least 1).
itemsnumberProducts on every page together.
previousPaginateLink or nilThe page before; nil on the first.
nextPaginateLink or nilThe page after; nil on the last.
partsarray of PaginatePartPage links to show: the first, the last and those around the current one, with a gap (…, is_link false) between.

The address of another page of a list.

Acessado como: paginate.previous, paginate.next

ChaveTipoDescrição
urlstringThe page's address, filters and order kept.
titlestring"Anterior" or "Próxima".

PaginatePart

One entry of the page links: a page number or a gap.

Acessado como: paginate.parts[]

ChaveTipoDescrição
titlestringThe page number, or … for a gap.
urlstringThe page's address; empty string for a gap and for the current page.
is_linkbooleanFalse for a gap and for the current page.
is_currentbooleanTrue for the page shown.

Page

Acessado como: page

ChaveTipoDescrição
idstringThe page's UUID.
titlestringThe page's title.
handlestringThe page's URL slug.
contentstringThe page body as HTML, sanitized (no scripts or inline handlers). Empty for pages made in the site editor, whose content is their sections.
authorstring, may be absentThe author's name. The key is absent when the page has none.
published_atstring, may be absentWhen the page was published, as an RFC 3339 timestamp. The key is absent when unknown.

Routes

Acessado como: routes

ChaveTipoDescrição
home_urlstringThe store's home: /, or the storefront's path prefix when it is served under one.
cart_urlstringThe cart page (/carrinho).
cart_add_urlstringEndpoint that adds a variant to the cart (POST).
cart_change_urlstringEndpoint that changes a line's quantity (POST).
cart_clear_urlstringEndpoint that empties the cart (POST).
cart_freight_quote_urlstringEndpoint that quotes shipping for a CEP (POST).
cart_freight_select_urlstringEndpoint that chooses one of the quoted shipping options (POST).
freight_simulate_urlstringPOST /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_urlstringPOST /v1/storefront/carts/current/checkout: confirms the visitor's order once its payment is approved (pay through payment_intent_url).
payment_intent_urlstringPOST /v1/storefront/carts/current/payments: turns the visitor's cart into an order and starts its payment.
account_urlstringThe customer portal's home (/conta).
account_login_urlstringThe sign-in page (/conta/entrar).
account_logout_urlstringEndpoint that signs the customer out: submit a POST form to it.
account_register_urlstringThe same address as account_login_url: a customer signs up by signing in with a code.
search_urlstringThe search page (/busca); send the query as ?q=.
wishlist_urlstringThe favorites page (/favoritos).
booking_urlstringThe 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_urlstringThe list of categories (/categorias); a category is {{ routes.collections_url }}/{{ collection.handle }}.
products_urlstringPrefix of product pages: {{ routes.products_url }}/{{ product.handle }}.
all_products_urlstringThe list of every product (/produtos).
product_url_patternstringThe 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_patternstringThe address of a category's page, with {handle} where the category's handle goes (/categorias/{handle}, or the address the store chose).
api_urlstringBase 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

ChaveTipoDescrição
namestringThe 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.
directorystringcustomers on account pages; empty string elsewhere.
suffixstringAlways 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

ChaveTipoDescrição
idstringThe order's UUID.
item_variant_idsarray of stringVariant 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_quantitiesarray of numberThe quantity of each of those lines, in the same order as item_variant_ids.
item_countnumberTotal quantity of items in the order.
meta_browser_purchasebooleanWhether 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.
numberstring or nilThe order number shown to the customer; nil when the order has none.
total_centsnumberOrder total in cents.
subtotal_centsnumberSum of the items in cents, before shipping and discounts.
shipping_centsnumberShipping in cents.
discount_centsnumberDiscounts in cents.
currencystringISO 4217 currency code of the order.
payment_statusstring or nilThe payment status, such as captured once paid; nil when unknown.
fulfillment_statusstring or nilThe fulfillment status; nil when unknown.
customer_namestring or nilThe customer's name; nil when unknown.
customer_emailstring or nilThe customer's e-mail; nil when unknown.
created_atstringWhen the order was placed, as an RFC 3339 timestamp.
statusstringThe order's status: pending (waiting for payment), paid, fulfilled, cancelled or refunded.
payment_statestringWhere 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.
payablebooleanTrue when a new payment can be made for the order (pay_url): it still waits for one.
payment_methodstring or nilThe last payment attempt's method (pix, card, boleto); nil before any.
pix_codestring or nilThe PIX "copia e cola" code while payment_state is waiting by PIX; nil otherwise.
pix_qrstring or nilThe PIX QR code as an image URL (data:image/png;base64,...) while it waits; nil otherwise.
pix_expires_atstring or nilWhen the PIX code stops working, as an RFC 3339 timestamp; nil when there is none.
payment_redirect_urlstring or nilThe gateway's page where a card payment is finished (Asaas), while it waits; nil otherwise.
boleto_urlstring or nilThe boleto to print or save (a PDF or the gateway's page) while payment_state is waiting by boleto; nil otherwise.
boleto_linestring or nilThe boleto's linha digitável (47 digits, no separators), to paste in a bank app, while it waits; nil otherwise.
boleto_line_formattedstring or nilThe linha digitável grouped as printed on a boleto (23793.38128 60000.000003 ...), while it waits; nil otherwise.
boleto_barcodestring or nilThe boleto's barcode (44 digits) while it waits; nil otherwise.
boleto_due_datestring or nilWhen the boleto is due (YYYY-MM-DD) while it waits; nil otherwise.
boleto_pix_codestring or nilA PIX "copia e cola" code that pays the same boleto, when the gateway issues one; nil otherwise.
boleto_pix_qrstring or nilThat PIX as a QR code image URL (data:image/png;base64,...); nil otherwise.
boleto_expires_atstring or nilUntil 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_messagestring or nilWhy the last attempt failed, in the shopper's words, when payment_state is failed; nil otherwise.
refunded_centsnumberWhat was refunded, in cents (0 when nothing was).
pay_urlstringThe 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_urlstringThe endpoint to poll for the payment's state (GET, state as payment_state above).
loyaltyOrderLoyalty or nilWhat 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

ChaveTipoDescrição
pointsnumberPoints the order earns (0 when none).
cashback_centsnumberCashback the order earns, in cents (0 when none). It reaches the customer's store credit on available_on.
available_onstring or nilThe day the points and cashback count, dd/mm/aaaa (São Paulo); nil while the order waits for its payment.
pending_daysnumberDays after the payment before they count.
estimatedbooleanTrue before the order is settled: the amounts are worked out from the program's rates and can still change.
tierstring or nilThe tier the order earns at; nil without one.

The store's legal identity, from the admin's "Dados da empresa". shop.legal is nil until it is complete.

Acessado como: shop.legal

ChaveTipoDescrição
namestringThe legal name (razão social).
documentstringThe CNPJ or CPF, formatted.
addressstringThe address on one line.
emailstringThe contact e-mail; empty string when none.
phonestringThe contact phone, formatted; empty string when none.
privacy_urlstringAddress of the generated privacy policy page (/politica-de-privacidade).
returns_urlstringAddress of the generated returns policy page (/trocas-e-devolucoes).
terms_urlstringAddress 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

ChaveTipoDescrição
privacy_urlstring or nilAddress of the privacy policy (/politica-de-privacidade), or nil.
returns_urlstring or nilAddress of the returns policy (/trocas-e-devolucoes), or nil.
terms_urlstring or nilAddress 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

ChaveTipoDescrição
namestring or nilThe legal name (razão social), or nil.
documentstring or nilThe CNPJ or CPF, formatted, or nil.
addressstring or nilThe 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

ChaveTipoDescrição
codestringThe locale code, the store's default (for example pt-BR).
stringsmap of stringThe 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>

ChaveTipoDescrição
handlestringThe menu's identifier.
titlestringThe menu's name.
itemsarray of MenuItemThe top-level links.

MenuItem

One link of a menu.

Acessado como: menus.<key>.items[], menus.<key>.items[].children[], menus.<key>.items[].children[].children[]

ChaveTipoDescrição
titlestringThe link text.
urlstringThe address; # when the item has none.
activebooleanTrue when the link points at the page being shown.
childrenarray of MenuItemThe links nested under this one (up to three levels).

The search page's results.

Acessado como: search

ChaveTipoDescrição
termsstringThe search text (?q=), trimmed.
performedbooleanTrue when there were terms to search for.
results_countnumberHow many products match, across all pages.
pagenumberThe current page, starting at 1 (?page=).
pagesnumberHow many pages of 24 results there are, at least 1.
sortstringThe order in use (?sort=): relevance (the default), price-asc, price-desc or newest.
resultsarray of ProductThe current page's products, loaded without options, reviews or specifications.

Wishlist

The favorites page's data.

Acessado como: wishlist

ChaveTipoDescrição
productsarray of ProductThe saved products, newest first. Empty in previews.
countnumberHow many products are saved.
signed_inbooleanTrue when the list belongs to a signed-in customer.
alertsbooleanTrue when the customer can get price and stock alerts for the list.
sharedbooleanTrue 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_namestringThe 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[]

ChaveTipoDescrição
idstringThe document's UUID.
slugstring or nilThe document's slug, used in entry addresses; nil when it has none.
positionnumberThe order set in the admin; documents arrive sorted by it.
urlstring, may be absentThe 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.

ChaveTipoDescrição
idstringThe file's UUID.
urlstringWhere 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_urlstringThe file as uploaded.
posterstring or nilA 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.
filenamestringThe stored file name.
original_namestring or nilThe name it had when uploaded.
mime_typestringThe media type, such as image/webp.
widthnumber or nilWidth in pixels, for images and videos.
heightnumber or nilHeight in pixels, for images and videos.
altstring or nilAlternative text.

Section

The section being rendered, with the settings and blocks the editor saved for it.

Acessado como: section

ChaveTipoDescrição
idstringThe section's identifier on the page.
typestringThe section type (the file name under sections/).
settingsjsonThe values of the settings declared in the section's {% schema %}: section.settings.heading.
blocksarray of BlockThe section's enabled blocks, in order.
indexnumberPosition on the page, starting at 1.

Block

One block of a section.

Acessado como: section.blocks[]

ChaveTipoDescrição
idstringThe block's identifier.
typestringThe block type declared in the section's schema.
settingsjsonThe values of the block's settings.
attrsstringHTML 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>

ChaveTipoDescrição
slugstringThe form's identifier, its key in forms.
namestringThe form's name.
fieldsarray of jsonThe typed fields in order (key, label, type, required...). {% render 'mobiari-form', form: forms.contato %} renders them.
submit_labelstring or nilThe submit button's text; nil to use the default.
success_messagestring or nilThe message shown after a successful submission; nil to use the default.
actionstringWhere to post the form (/storefront-api/{slug}/forms/{form_slug}).
turnstile_site_keystring or nilCloudflare 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

ChaveTipoDescrição
schema_versionnumberVersion of the profile's format.
identityjsonName, wordmark, tagline, story, audience: brand.identity.name.
voicejsonHow the brand speaks, such as brand.voice.tagline.
colorsjsonThe color tokens: brand.colors.primary.value.
typographyjsonThe type tokens.
spacingjsonThe spacing tokens.
radiiarray of jsonThe corner-radius tokens.
effectsjsonShadows and other effects.
imageryjsonGuidance for photography and illustration.
iconographyjsonGuidance for icons.
componentsarray of jsonComponent specs, such as buttons.
assetsBrandAssetsLogos and images.
footerjsonThe brand footer used in e-mails.
emailjsonE-mail preferences.
guide_mdstringThe narrative brand guide, in Markdown.
open_questionsarray of stringQuestions still open in the profile.
sourcesarray of stringWhere the profile was derived from.
changelogarray of jsonThe profile's change history.
updated_atstringWhen the profile last changed.
kitjsonThe profile boiled down to the tokens a page needs.
css_urlstringAddress of the stylesheet generated from the profile (/assets/brand.css).

BrandAssets

The brand's logos and images.

Acessado como: brand.assets

ChaveTipoDescrição
logo_urlstring or nilThe logo; nil when none.
logo_dark_urlstring or nilThe logo for dark backgrounds; nil when none.
logo_widthnumberThe logo's display width in pixels; 0 when unset.
favicon_urlstring or nilThe favicon; nil when none.
imagesarray of jsonOther 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

ChaveTipoDescrição
storestringThe store's slug.
store_namestringThe store's name.
signed_inbooleanTrue when a customer is signed in.
whatsappbooleanTrue when sign-in codes can be sent by WhatsApp.
return_tostringThe address to come back to after signing in.
logout_urlstringEndpoint that signs out: submit a POST form to it.
api_urlstringBase of the Storefront API for the portal's scripts.
storefront_keystring or nilThe publishable storefront key; nil when the lookup failed.
profile_urlstringStorefront API address of the customer's profile.
urlsPortalUrlsThe portal's own pages.
sign_in_providersarray of jsonThe 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_errorstring or nilWhy a sign-in with Google or Apple did not finish, in the shopper's words (from ?entrar=); nil otherwise. Set on account_login.
helpPortalHelp or nil, may be absentHow to reach the store, from its WhatsApp channel and company data. Only for a signed-in customer; nil when the store has neither.
customerPortalCustomer, may be absentThe signed-in customer's profile. Absent when nobody is signed in.
data_urlstring, may be absentWhere the customer downloads a copy of their data (LGPD). Only for a signed-in customer.
privacy_requests_urlstring, may be absentStorefront API address of the customer's privacy requests. Only for a signed-in customer.
privacy_openarray of json, may be absentThe customer's open privacy requests (kind, created_at). Only for a signed-in customer.
deletion_openboolean, may be absentTrue when a data deletion request is open. Only for a signed-in customer.
saved_cardsarray of json, may be absentThe 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_urlstring, may be absentStorefront API address of the customer's saved cards (DELETE <cards_url>/<id> removes one). Only for a signed-in customer.
orderPortalOrder or nil, may be absentThe order on the order page (nil when it was not found). Only on account_order.
trackingPortalTracking, may be absentThe guest tracking form and the order it found. Only on account_tracking.
ordersarray of PortalOrderItem, may be absentThe customer's orders, newest first, at most 50. Only on account, account_orders and account_products.
productsarray of json or nil, may be absentWhat the customer bought, item by item, with its stage. Only on account and account_products.
loyaltyPortalLoyalty or nil, may be absentPoints, 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.
subscriptionsarray of PortalSubscriptionItem, may be absentThe customer's running subscriptions (active or paused; cancelled ones are left out), with the words and dates ready. Only on account.
bookingsPortalBookings, may be absentThe 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

ChaveTipoDescrição
showbooleanTrue when the store runs points or referrals, or the customer holds credit or points: whether to show the card.
programPortalLoyaltyProgramThe store's rules.
points_availablenumberPoints the customer can turn into credit now (negative after a refund took back points already spent).
points_pendingnumberPoints still waiting for their orders to stand.
redeemable_centsnumberThe credit the usable points buy now, in whole blocks, in cents.
redeem_pointsnumberThe points a redemption of every whole block takes.
redeem_urlstringStorefront API address that turns points into credit (POST with points).
points_expire_onstring or nildd/mm/aaaa when the points expire if the customer earns nothing more; nil when they do not.
credit_balance_centsnumberThe customer's store credit, in cents.
referralPortalReferral or nilThe customer's referral code; nil while the store has referrals off.
cashbackjsonCashback: 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).
tierjsonWhere 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.
ratesjsonWhat 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_expiringarray of jsonStore credit that expires, soonest first: kind, note, amount_cents, left_cents, expires_at (and valid_until, dd/mm/aaaa, on account_wallet).
wallet_entriesarray of json or nilThe 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_entriesarray of json or nilThe 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.
entriesarray of json or nilThe 50 latest points entries (kind, points, order_number, credit_cents, available_at, created_at, and the *_on dates). Only on account_wallet.
tier_changesarray of jsonThe 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

ChaveTipoDescrição
points_enabledbooleanCustomers earn points.
points_per_currency_unitnumberPoints per R$ 1,00 paid.
redeem_step_pointsnumberPoints turn into credit in blocks of this many.
redeem_step_centsnumberThe credit each block is worth, in cents.
pending_daysnumberDays after payment before an order's points and referral reward count.
expire_after_monthsnumber or nilMonths without earning before points expire; nil for never.
referrals_enabledbooleanCustomers can refer friends.
referrer_reward_centsnumberCredit for the customer who refers, in cents.
referee_reward_centsnumberCredit for the friend after their first order, in cents.
referral_min_order_centsnumberThe friend's first order must reach this, before freight, in cents.
cashback_enabledbooleanCustomers earn cashback (store credit) on what they pay for goods.
cashback_bpsnumberThe program's cashback percent in basis points (500 is 5%); a tier can give more.
cashback_expire_monthsnumber or nilMonths cashback stays in the wallet; nil for never.
tier_window_monthsnumberMonths of spend a tier counts.
tiersarray of jsonThe 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

ChaveTipoDescrição
codestringThe code, made of the first name and five characters.
share_pathstring/?ref={code}: put the store's address in front to share it.
pendingnumberFriends whose first order is still waiting to stand.
rewardednumberReferrals that rewarded the customer.
earned_centsnumberCredit referrals earned the customer, in cents.

PortalUrls

The portal's own pages.

Acessado como: portal.urls

ChaveTipoDescrição
accountstringThe portal's home (/conta).
ordersstringThe orders list (/conta/pedidos).
productsstringWhat the customer bought (/conta/produtos).
profilestringThe customer's details (/conta/dados).
walletstringThe customer's wallet: credit, cashback, points and tier (/conta/carteira).
trackingstringGuest order tracking, open to anyone (/rastreio).

PortalHelp

How a customer can reach the store.

Acessado como: portal.help

ChaveTipoDescrição
whatsapp_urlstring or nilA wa.me link to the store's WhatsApp; nil when there is none.
whatsappstring or nilThat number as people write it; nil when there is none.
emailstring or nilThe 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

ChaveTipoDescrição
idstringThe customer's UUID.
emailstring or nilThe e-mail; nil when none.
full_namestring or nilThe full name; nil when none.
phonestring or nilThe phone in E.164; nil when none.
phone_displaystring or nilThe phone as people write it, (11) 98765-4321; nil when none.
documentstring or nilCPF or CNPJ, digits only; nil when none.
document_displaystring or nilThe document with its punctuation; nil when none.
date_of_birthstring or nilYYYY-MM-DD; nil when none.
addressjson or nilThe default delivery address in its parts (postal_code, postal_code_display, street, number, complement, neighborhood, city, state); nil when none.
addressesarray of jsonEvery saved address, the default first.
email_opt_inbooleanTrue when the customer accepts offers by e-mail.
whatsapp_opt_inbooleanTrue when the customer accepts offers by WhatsApp.
created_atstringWhen the customer registered, as an RFC 3339 timestamp.
created_onstringcreated_at as a local date, dd/mm/yyyy.

PortalBookings

The customer's bookings on the account overview.

Acessado como: portal.bookings

ChaveTipoDescrição
upcomingarray of PortalBookingItemPending-payment and confirmed bookings that have not ended, soonest first.
pastarray of PortalBookingItemThe 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[]

ChaveTipoDescrição
numbernumberThe booking number.
servicestringThe service, as it was when booked.
providerstringWho serves the customer.
daystringThe day, dd/mm/yyyy, in the provider's time zone.
timestringThe start time, hh:mm, in the provider's time zone.
statusstringpending_payment, confirmed, completed, no_show or cancelled.
status_labelstringThe status in the customer's words, such as "Confirmado".
tonestringHow to color it: ok, attention (waiting on payment) or muted.
manage_urlstring or nilThe 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[]

ChaveTipoDescrição
idstringThe subscription id.
statusstringactive or paused.
status_labelstringWhere it stands, in the customer's words: "Ativa", "Pausada por você" or "Pausada pela loja".
tonestringHow to color it: ok, muted or attention (paused by the store).
interval_labelstringHow often it repeats, such as "a cada 2 semanas" or "todo mês".
next_order_onstring or nilWhen the next order is placed, dd/mm/yyyy; nil unless active.
can_pausebooleanTrue while it is active.
can_skipbooleanTrue while it is active: the next order is not placed.
can_resumebooleanTrue when the customer paused it themselves; a pause the store made is the store's to lift.
can_cancelbooleanTrue: the customer can cancel any running subscription.
itemsarray of PortalSubscriptionLineWhat each order brings.
api_urlstringStorefront API address of the subscription; POST /pause, /resume, /skip or /cancel to it.

PortalSubscriptionLine

One line of a subscription.

Acessado como: portal.subscriptions[].items[]

ChaveTipoDescrição
titlestringThe product, with the variant's title when it has one.
quantitynumberHow many of it each order brings.
unit_price_centsnumber or nilWhat one unit costs today, in cents.

PortalOrderItem

An order in the portal's lists.

Acessado como: portal.orders[]

ChaveTipoDescrição
numberstring or nilThe order number.
statusstringThe order status.
fulfillment_statusstring or nilThe fulfillment status.
status_labelstringWhere it stands, in the customer's words, such as "Em preparação".
tonestringHow to color it: attention (waiting on the customer), progress, done or cancelled.
openbooleanTrue while the order is attention or progress.
total_centsnumberThe total in cents.
created_atstringWhen it was placed, as an RFC 3339 timestamp.
created_onstringcreated_at as a local date, dd/mm/yyyy.
item_countnumberTotal quantity of items.
first_titlestring or nilThe title of the first item.
imagesarray of stringUp to 3 item image addresses.
urlstringThe order's page in the portal.

PortalOrder

One order on its page in the portal.

Acessado como: portal.order, portal.tracking.order

ChaveTipoDescrição
idstringThe order's UUID.
numberstringThe order number.
statusstringThe order status.
payment_statusstring or nilThe payment status.
fulfillment_statusstring or nilThe fulfillment status.
status_labelstringWhere it stands, in the customer's words.
tonestringHow to color it: attention, progress, done or cancelled.
stepsarray of jsonThe progress steps. Empty for cancelled and refunded orders.
paymentjson or nilHow it was paid and what is still due.
deliveryjson or nilWhere and how it is delivered.
created_atstringWhen it was placed, as an RFC 3339 timestamp.
created_onstringcreated_at as a local date, dd/mm/yyyy.
currencystringISO 4217 currency code.
subtotal_centsnumberSum of the items in cents.
discount_centsnumberDiscounts in cents.
shipping_centsnumberShipping in cents.
total_centsnumberThe total in cents.
itemsarray of jsonThe order's items, each with its stage.
shipmentsarray of jsonThe shipments, with tracking.
nfejson or nilThe invoice (NF-e) with the DANFE link; nil until issued.
correctionsarray of jsonThe 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

ChaveTipoDescrição
lookup_urlstringWhere the form posts (slug based: a plain HTML form).
errorstring or nilWhy nothing is shown, in the shopper's words; nil when there is nothing to say.
orderPortalOrder or nilThe 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_pathstring or nilThe 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 money e nunca divida à mão.
  • compare_at_price. Em uma variante é o preço promocional (menor que price), o contrário da Shopify.
  • Listas trazem menos. Um produto de products, collection.products ou search.results nã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.

Nesta página