Update Home Page Blocks
PUT/api/admin/portal/home/blocks
Replace the Home page blocks only. Announcements, featured products and the landing page are left as they are, so this can be saved on its own without sending the rest of the configuration.
customers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body fields:
- blocks (required, array, at most 20 blocks, built-ins included; may be empty): the Home page layout, in display order. The stored blocks are all replaced; an empty array resets Home to the five built-in sections, all visible.
- blocks_version (optional, string up to 64 characters, or null): the
blocks_versionthis edit started from, from Get Portal Home Page or the previous save. If the saved blocks have changed since, nothing is saved and the response is 409. Leave it out, or send null, to save without the check.
Each block:
- type (required): a built-in section,
announcements,account_summary,spend_progress,featuredororder_again, or a custom block,banner_carousel,link_tiles,category_tiles,brand_tilesorproduct_grid. Each built-in may appear at most once; a built-in left out is added back, visible, at the end. Custom blocks may repeat. - id (optional, string up to 40 characters, or null): a custom block's id from a previous response, to keep it. Null, or an id the last save did not have, creates a new block with a new ULID. Built-ins ignore it: their id is always their type.
- visible (optional, boolean, default true): false hides the block from every buyer. A built-in only uses
typeandvisible. - heading (optional, string up to 60 characters, or null): the title shown over a custom block.
- audience (optional, object or null):
catalog_idsnull (or no audience) = every dealer; a list of portal catalog ids = only dealers on at least one of those catalogs; an empty list = no dealer. Each id is a positive integer; a save also needs it to be an existing, not deleted, portal catalog ("One of the chosen catalogs no longer exists. Remove it and save again."). - settings (optional, object or null):
- auto_advance (optional, boolean, default false) and interval (optional, seconds between slides: 5, 7 or 10; default 7): banner carousels only.
- columns (optional, integer): 2, 3 or 4 for link tiles; 3, 4 or 6 for category tiles and product grids (default 4); 4, 6 or 8 for brand tiles (default 6).
- link_to (optional,
catalogorassets, defaultcatalog): brand tiles only.catalogopens the catalog filtered to the brand;assetsopens the brand's assets link in a new tab (a brand without one opens its catalog page). - count (optional, 4, 8, 12, 16 or 24, default 8): product grids only. How many products show at first, and how many each "Load more" adds.
- sort (optional,
name,price_asc,price_descornewest, defaultname): product grids only. Prices sort by each dealer's own price.
- slides (
banner_carousel, required: 1 to 8). Each slide:- id (optional, string up to 40 characters, or null): the slide's id from a previous response, to keep it; otherwise a new ULID is given.
- image (required, object): the desktop artwork,
{path, width, height}as returned by Upload Home Page Image withkind=slide.path(required, up to 255 characters) is the uploaded file: underportal/home/and ending in.jpg,.jpeg,.png,.webp,.svgor.gif. A save also needs the file to still exist ("This image is missing. Upload it again."), and applies the same check tomobile_imageand tile images;widthandheightare optional integers of at least 1. - mobile_image (optional, same object, or null): artwork for phones, uploaded with
kind=slide_mobile. - alt (required, string up to 160 characters): describes the slide for people who cannot see it.
- link (optional, link object or null): where the slide goes when clicked.
- starts_at / ends_at (optional, ISO-8601 date-time or null): when the slide is shown. ends_at must be after starts_at; null start = now, null end = never ends. A value without an offset is read as UTC; dates are stored in UTC.
- tiles (
link_tiles, required: 2 to 8). Each tile:- id (optional, string up to 40 characters, or null): as for slides.
- label (required, string up to 40 characters): must be unique within the block, ignoring case.
- caption (optional, string up to 80 characters, or null).
- icon (string, or null): one of the curated icon names:
mdi-star-outline,mdi-lightning-bolt-outline,mdi-cart-outline,mdi-clipboard-list-outline,mdi-file-document-edit-outline,mdi-receipt-text-outline,mdi-cash-multiple,mdi-credit-card-outline,mdi-truck-outline,mdi-truck-fast-outline,mdi-package-variant-closed,mdi-keyboard-return,mdi-shield-check-outline,mdi-tag-outline,mdi-sale-outline,mdi-percent-outline,mdi-heart-outline,mdi-fire,mdi-new-box,mdi-gift-outline,mdi-trophy-outline,mdi-file-download-outline,mdi-book-open-variant,mdi-school-outline,mdi-video-outline,mdi-image-outline,mdi-palette-outline,mdi-storefront-outline,mdi-map-marker-outline,mdi-calendar-star,mdi-clock-outline,mdi-headset,mdi-phone-outline,mdi-email-outline,mdi-help-circle-outline,mdi-information-outline,mdi-cog-outline,mdi-tools,mdi-wrench-outline,mdi-bike. Any other name is refused with "Pick one of the listed icons." - image (object, or null):
{path, width, height}uploaded withkind=tile. A tile needs exactly one oficonandimage. - link (required, link object).
- categories (
category_tiles, required: 1 to 12). Each entry:- id (required, positive integer): a product category, at most once per block (the same category may appear in different blocks). A save also needs the category to exist and not be archived ("This category is archived or no longer exists. Remove it and save again.").
- label (optional, string up to 40 characters, or null): shown instead of the category name.
- image (optional, object or null): the tile's own picture,
{path, width, height}uploaded withkind=tile. Without one the tile shows the category's own image.
- brands (
brand_tiles, required: 1 to 24). Each entry:- id (required, positive integer): a product brand, at most once per block. A save also needs the brand to exist ("This brand no longer exists. Remove it and save again.").
- label (optional, string up to 40 characters, or null): shown instead of the brand's portal name (and used as the tile's accessible name). The tile shows the brand's logo, or its name when it has none.
- source (
product_grid, required, object): where the grid's products come from.- type (required):
category,brandorcollection. - id (required, positive integer): the category, brand or tag id. A save needs the category to exist and not be archived, the brand to exist, and the tag to be published as a collection ("This tag is not a published collection. Publish it under Catalog display, or choose another.").
Items that do not belong to a block's type (for example
tileson a banner) are not stored.
- type (required):
A link is an object:
- type (required):
catalog(the whole catalog),category,brand,tag,page(an info page),portal(a portal page) orurl(a web address). - id: the category or brand id; a positive integer, required for
categoryandbrand. Optional fortag, so a renamed tag is still followed. - value: for
tagthe tag name (up to 100 characters); forpagethe info page slug (lower-case letters, numbers and dashes, for examplereturns-policy); forportalone ofhome,catalog,brands,quick-order,special-order-list,lists,quotes,orders,invoices,returnsormy-company; forurlan address starting withhttps://,http://,mailto:ortel:(up to 2,048 characters). Ignored for other types. - new_tab (optional, boolean, default false): opens a
urllink in a new browser tab. Ignored for other types. Only the keys a type uses are stored.
Image files that the previous blocks used and the new ones do not are deleted after the save. Uploaded images that were never saved onto a block are deleted by a later save once they are more than 24 hours old.
An invalid body returns 422 with one message per field under errors, keyed by its position (for example blocks.3.tiles.1.label). An image whose file is deleted, for example by another save, after the body was checked also returns 422 on its field ("This image is missing. Upload it again.").
A stale blocks_version returns 409 with message: "Someone else saved the home page since you opened it. Reload to see their changes." Load the blocks again before saving.
Returns blocks, blocks_version (the version just saved; send it with the next save) and limits in the same shape as Get Portal Home Page: new blocks, slides and tiles carry their new ULIDs.
Requires a staff bearer token with portal management permission.
Request
Responses
- 200
- 401
- 403
- 409
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Conflict
Response Headers
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.