Skip to content

Product card

The product_card is the sales card inside the post body: image, brand, name, price and a button to the store. It is part of the block document and is rendered by canverly-web-public.

This page comes from the code running in the test environment (.net): canverly-web-public 3fd9896, canverly-authoring 868a24d, canverly-api f7b18b6.

{
"id": "pc1",
"type": "product_card",
"attrs": { "product_id": "01J9Z3K8M2XQ4R7T5V6W8Y0A1B" }
}

The block stores only the product id. The name, price, image and link come from the site’s product registry at render time. Changing the price in the registry changes every article that references that product.

Field (attrs) Type Required Notes
product_id string yes, in the current format Product id, a ULID (26 characters) or UUID. It is the id of the post of type produto on the same site. An id from another site, deleted or malformed does not resolve.
product_title string no Only the dashboard editor uses it, to show the name. The renderer ignores it.

The block id (pc1) is the id common to every block, not the product’s.

The roughly 50 articles published before the product registry existed store the whole card in the block, without product_id. It still renders, but it does not update itself and the link is not counted:

{
"id": "pc2",
"type": "product_card",
"attrs": {
"title": "Fone Modelo A",
"image": "https://cdn.exemplo.com/fone-a.jpg",
"price": "299,90",
"currency": "BRL",
"url": "https://loja.exemplo.com/fone-a",
"cta": "Ver na loja",
"vendor": "Marca A"
}
}
Field (attrs) Type Notes
title string Required for the card to appear.
url string Required for the card to appear. Not validated in any layer: the site puts it straight into the href. Send only https://.
image string Image URL. An external URL is imported to the CDN on save.
price number or string 299.9, "299,90" or "299.90". Unreadable or empty: the card comes out without the price line.
currency string Default BRL.
cta string Button text. Default Ver na loja.
vendor string Brand, above the name.

A product_id that also carries these fields uses the product and falls back to the block fields only when the registry does not have the value. Always prefer the product_id: the standalone format has no promotion, summary, image test or click count.

The product is a post of type produto, created in the dashboard (the site’s Products tab). The fields:

Field Type Required Values
post title text yes Becomes the card name.
preco number yes Finite number.
url_compra URL yes Absolute http or https, with no user and password and no space. For affiliates, it is the affiliate link itself.
preco_promocional number no Empty = no promotion.
moeda select no BRL (default), USD, EUR.
imagem image no Main image.
imagens_ab gallery no Variants for the image test (see below).
marca text no Shown above the name.
sku text no Does not appear on the card.
disponibilidade select no em_estoque (default), esgotado, pre_venda.
cta text no Button text. Default Ver na loja.
resumo long text no Line under the name.
descricao_interna long text no Internal use; does not appear.
<aside class="cv-product-card" aria-label="Produto recomendado: Fone Modelo A">
<!-- imagem 112x112, marca, nome (o link), resumo, preço, botão -->
</aside>
  • Name and link: the product name is the card’s only link, and the link covers the whole card (the entire card is clickable, without three identical links for the screen reader). The “Ver na loja” button is just visual text inside the same link.
  • Price: formatted as R$ 1.234,56 in reais; in another currency, the code before the value (USD 10,00). Without a price (product linked with an unreadable preco), the card appears without the price line.
  • Promotion: if preco_promocional is lower than preco, the full price appears struck through and the promotional one highlighted. A promotion without a full price, or higher than it, is not shown. The standalone format has no promotion.
  • Sold out: with disponibilidade: "esgotado", the button gives way to the text “Esgotado”, and the link stays active. pre_venda is accepted in the registry but does not change the card.
  • Image: <img> of 112 by 112 pixels, empty alt (decorative: the product name is already in the link), lazy loading, box with reserved aspect ratio (no layout shift). The image comes from the registry (imagem; without it, the first valid one from imagens_ab). Without an image, the card appears without it.
  • Rating/review: the block has no rating, stars or review field, on the site or in the registry. There is no aggregateRating.
  • Button text: the product’s cta; default “Ver na loja”.

The card link always comes out with:

<a href="/go/p/01J9Z3K8M2XQ4R7T5V6W8Y0A1B?de=<id-do-artigo>" rel="noopener sponsored nofollow" target="_blank">
  • rel="noopener sponsored nofollow" is fixed: it declares the commercial relationship and stops the crawler from following. It is not configurable through attrs.
  • In a card linked to the registry, the href points to the counted exit route /go/p/<product>?de=<article>, which records the click and answers 302 to the store. The destination always comes from the registry (url_compra), never from the URL: it is not an open redirect. In a standalone card, the href is the attrs.url directly, without counting.
  • There is no “affiliate id” field, UTM or automatic parameter. The affiliate link is the url_compra itself that the owner writes.
  • The card does not replace the advertising notice: flag the commercial content in the article text, as the writing kit asks.

For cards linked to the registry (with a valid product_id):

Event When How
click the reader opens /go/p/<product> The site records the click and answers 302. Each opening generates a record (no deduplication).
impression the card is at least 50% visible, once per card per visit The browser sends a signal to /go/imp, which always answers 204.

The click carries the site, the product, the source article (?de=, only if it is a valid id), the destination domain, the type (clique or impressao) and the image variant (0 to 9). Visits from the site’s team are not counted; bots are recorded and flagged, and the human counters exclude them. The limit is 20 clicks and 60 impressions per minute per visitor; above that the record is discarded and the reader continues normally to the store. If recording fails, the redirect happens anyway.

The numbers are in the dashboard’s Metrics screen (clicks per product, per article, per day, and impressions against clicks per image variant).

With two or more images (imagem plus imagens_ab with http(s) URLs, up to 10 variants), the browser draws one variant per visitor (kept in the session), swaps the image inside the same box and notes the variant (v=) in the link and in the impression. Without JavaScript, the card always shows the first image.

The whole <aside> is omitted, without error, when:

  • the name or the store link is missing (product without url_compra, or standalone card without title or url);
  • the product_id does not resolve: deleted product, from another site, malformed id, or the registry was down at the time (and there are no standalone fields to fall back on);
  • the block was created by the editor with product_id: null and has not yet picked a product.
  • content_html: GET /v1/posts/{reference} omits the product_card (and ad, related_posts and story_page). A card with an outdated price would be worse than no card, and the price is fetched live.
  • Read from the source before rewriting. If you convert the content_html back in a PATCH, the card is erased. Use GET /v1/posts/{reference}/source, which returns the blocks as stored, and preserve the product_card when resending the blocks_json.
  • Sanitization: the API neither sanitizes nor validates any attrs of the product_card on write. Authoring only imports to the CDN the external image in attrs.image (standalone format); a permanently rejected image refuses the save (422 IMAGEM_EXTERNA_INVALIDA, field blocks.product_card).
  • SEO score: the product_card does not count words, links or media. It is a “rich” block: a heading directly followed by it loses points in rico_apos_heading. Put a paragraph between the heading and the card. canverly-seo has no rule about product, affiliate or sponsored.
  • Authoring external links: the card link does not enter the site’s external links registry.
  • JSON-LD: the site does not emit Product, Offer or aggregateRating for the card. What it does not have (rating, reviews) is not invented.
  • Writing validator: the kit’s converter (Markdown to blocks) never emits product_card; it only enters the article through blocks_json or the editor.

Divergences between the renderer and writes

Section titled “Divergences between the renderer and writes”
Case What happens
Card without title and url (or product without url_compra) Saved without error; does not render.
attrs.url of the standalone format Not validated by authoring or the API; the site uses it directly in the href.
disponibilidade: "pre_venda" Accepted in the registry; the card only reacts to esgotado.
product_title Written by the editor; the renderer ignores it.
product_id from another site Accepted on write; the card stays hidden on the site.
rel Always noopener sponsored nofollow on the site; authoring does not annotate the link.
Original produto template Declared a Product/Offer schema that the site does not read.

The complete body, with a callout and a table, is in A complete body.