For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage Checkout Blocks

Checkout blocks are the content a checkoutBlock or postPurchase experience tests. Each block belongs to one variation. The following block types are supported:

  • trustBadge — Trust badges, guarantees, or brand logos

  • upsell — Product recommendations in checkout

  • shippingProgressBar — Progress toward free shipping

  • timer — A countdown timer

  • faqs — Collapsible questions and answers

  • postPurchaseUpsell — A one-click offer shown after checkout

blockType picks which variables (content settings), styles, and template values a request accepts. Unknown fields are rejected with a 400 that names the field.

Create vs. replace. POST keeps the template's value for every field you leave out, at any depth, so a minimal body creates a complete block. PUT replaces the block's content: name, variables, and styles are required, and every field you leave out, at any depth, resets to the template's value instead of keeping the saved one. The exception is postPurchaseUpsell: its PUT merges the fields you send onto the saved block. A post-purchase upsell may also adjust related settings on its own to stay valid, and lists what it changed in the response's adjustments.

Post-purchase readiness. Adding a postPurchaseUpsell block checks that the store is ready for post-purchase upsells (plan, Shopify permissions, and settings), and returns a 400 listing what to fix if it isn't. API keys get no exemption from this check. Replacing an existing post-purchase upsell with PUT doesn't re-run it.

Discounts. Discounts can't be set with an API key. Set an offer's discount in Intelligems, or through the Intelligems MCP while signed in. A request that sends one gets a 400: that's an upsell's variables.discount, a product rule's discount, or a post-purchase upsell's discountType or discountValue. A PUT keeps the discount saved on the block, along with the settings that decide who gets it: the block's product rules and display conditions, maxProductLimit and excludeItemsInCart, and a post-purchase upsell's maxQuantityType and maxQuantity. Changing any of those on a discounted block returns a 400. You can still rename a discounted block, change its copy and styles, and change a post-purchase upsell's compareAtPriceDisplay, which only changes the struck-through price shown. A block without a discount takes any change.

Display conditions and upsell rules. displayConditions (when a block shows) and upsellProductRules (which products an upsell or postPurchaseUpsell block recommends) are written as a flat list of conditions joined by match: "all" or "any". On PUT, omit a field to keep its current value, send null to remove it, or send a value to replace it. postPurchaseUpsell blocks don't use display conditions, and only upsell and postPurchaseUpsell blocks take product rules.

Reading blocks back. GET returns the blocks as they are stored. Stored display conditions and product rules are in the compiled form the storefront evaluates, not the condition-list form you send, so don't send them back on PUT.

Live tests. You can add, change, and delete blocks on a running experience. Changes take effect for shoppers immediately.

Your organization's plan must include checkout block tests; otherwise every checkout-block endpoint returns a 403.

List checkout blocks

get

Lists an experience's checkout blocks, grouped by variation.

The response has one entry per variation, each with its variationId, name, isControl, and blocks:

{
  "variations": [
    {
      "variationId": "YOUR_VARIATION_ID",
      "name": "Control",
      "isControl": true,
      "blocks": []
    }
  ]
}

Query Parameters

All query parameters are optional.

  • variationId (UUID) — Only return this variation's blocks.

  • blockType (string) — Only return blocks of this type.

Important Notes

  • Each block is returned as stored, including its id, which the PUT and DELETE endpoints take.

  • displayConditions and upsellProductRules come back in the compiled form the storefront evaluates, not the condition-list form you send on POST and PUT.

Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.

Authorizations
intelligems-access-tokenstringRequired

Intelligems external API access token.

Path parameters
experienceIdstring · uuidRequired

The experience the checkout block belongs to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Query parameters
variationIdstring · uuidOptional

Only return blocks on this variation.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
blockTypestring · enumOptional

Only return blocks of this type.

Possible values:
Responses
200

OK

application/json
get/v25-10-beta/experiences/{experienceId}/checkout-blocks
curl --location 'https://api.intelligems.io/v25-10-beta/experiences/YOUR_EXPERIENCE_ID/checkout-blocks' \
--header 'intelligems-access-token: YOUR_API_KEY'
{
  "variations": [
    {
      "variationId": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "isControl": true,
      "blocks": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "variationId": "123e4567-e89b-12d3-a456-426614174000",
          "locationId": "text",
          "blockType": "text",
          "blockTemplate": "badgeList",
          "name": "text",
          "displayConditions": {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "expression": [
              {
                "query": {
                  "key": "anything",
                  "type": "anything",
                  "filter": "includes",
                  "value": "text"
                },
                "operator": "and"
              }
            ]
          },
          "variables": {
            "headerText": "text",
            "items": [
              {
                "order": 1,
                "title": "text",
                "subtitle": "text",
                "type": "text",
                "icon": null,
                "iconColor": null,
                "iconSize": null,
                "imageSize": 1,
                "imageSizeUnit": "pixels",
                "imageAspectRatio": null,
                "image": null,
                "mediaSpacing": "text"
              }
            ]
          },
          "styles": {
            "typography": {
              "header": {
                "fontSize": "text",
                "fontStyle": "text"
              },
              "itemTitle": {
                "fontSize": "text",
                "fontStyle": "text"
              },
              "itemSubtitle": {
                "fontSize": "text",
                "fontStyle": "text"
              }
            },
            "backgroundColors": {
              "header": "text",
              "item": "text",
              "block": "text"
            },
            "colors": {
              "headerText": "text",
              "itemTitleText": "text",
              "itemSubtitleText": "text"
            },
            "layout": {
              "headerTextAlign": "text",
              "bodyAlign": "text",
              "itemTextAlign": "text",
              "itemPositionAlign": "text",
              "rowCount": 1,
              "columnCount": 1
            },
            "appearance": {
              "headerBorderThickness": "text",
              "headerBorderStyle": "none",
              "headerCornerRadius": "text",
              "headerPadding": "text",
              "bodySpacing": "text",
              "headingToBodySpacing": "text",
              "blockBorderThickness": "text",
              "blockBorderStyle": "none",
              "blockPadding": "text",
              "blockCornerRadius": "text",
              "itemBorderThickness": "text",
              "itemBorderStyle": "none",
              "itemCornerRadius": "text",
              "itemTextSpacing": "text"
            }
          }
        }
      ]
    }
  ]
}

Add checkout block

post

Adds a checkout block to one of an experience's variations.

The block starts from its template's defaults. Send only what you want to change, at any depth: every field of variables and styles you leave out keeps the template's value. A list you send, such as a trust badge's items or an FAQ block's questions, replaces the template's list whole.

Required Fields

  • blockType (string) — The block type (see the list above)

  • variationId (UUID) — The variation to add the block to. It must belong to the experience in the path.

Optional Fields

  • name (string) — Display name in the dashboard. Defaults to the template's name and the block's position.

  • template (string) — The preset to start from. The values depend on blockType. Not accepted for postPurchaseUpsell.

  • variables (object) — Content settings for this block type

  • styles (object) — Style settings for this block type

  • displayConditions (object) — Cart conditions that decide when the block shows. Omit it to show the block on every cart. Not accepted for postPurchaseUpsell.

  • upsellProductRules (array) — Which products the block recommends. upsell and postPurchaseUpsell only. Leave it out to start with Shopify's recommendations on every cart or order, the same as a block added in Intelligems.

Response

{ "block": { ... } }, with the saved block. A postPurchaseUpsell block also returns adjustments, listing anything the API changed on its own to keep the offer valid. An upsell block sent without upsellProductRules returns adjustments too, saying which products it starts with.

Important Notes

  • Blocks can only be added to a checkoutBlock, postPurchase or personalization experience, the same as in Intelligems. Adding one to any other experience, such as a price or offer test, returns a 400.

  • A postPurchaseUpsell block needs a store that is ready for post-purchase upsells. If it isn't, the request returns a 400 listing what to fix.

  • Discounts can't be set with an API key. An upsell's variables.discount, a product rule's discount, and a post-purchase upsell's discountType and discountValue return a 400. Set discounts in Intelligems.

  • On a store that uses Agentic Logic, a new upsell or postPurchaseUpsell block shows products from the store's built-in "Shopify recommendations" rule, the same as one added in Intelligems. Its products come from that rule, so upsellProductRules returns a 400 there. To show different products, pick another rule in Intelligems.

  • A recurring timer's resetTimezone is set to the store's timezone. If the store has none, send one: it has to be an IANA name such as America/New_York, or the request returns a 400.

  • Blocks added to a running experience show to shoppers immediately.

Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.

Authorizations
intelligems-access-tokenstringRequired

Intelligems external API access token.

Path parameters
experienceIdstring · uuidRequired

The experience the checkout block belongs to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Body
or
or
or
or
or
Responses
200

OK

application/json
post/v25-10-beta/experiences/{experienceId}/checkout-blocks
curl --location 'https://api.intelligems.io/v25-10-beta/experiences/YOUR_EXPERIENCE_ID/checkout-blocks' \
--header 'content-type: application/json' \
--header 'intelligems-access-token: YOUR_API_KEY' \
--data '{
  "blockType": "timer",
  "variationId": "YOUR_VARIATION_ID",
  "name": "Sale ends soon",
  "template": "textCountdown",
  "variables": {
    "timerMode": "perVisitor",
    "durationMinutes": 15,
    "countdownText": "Offer ends in {{Time remaining}}",
    "expiredText": "Offer ended"
  },
  "displayConditions": {
    "match": "all",
    "conditions": [
      { "attribute": "cartSubtotal", "operator": "greaterThan", "value": 50 }
    ]
  }
}'
{
  "block": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "variationId": "123e4567-e89b-12d3-a456-426614174000",
    "locationId": "text",
    "blockType": "text",
    "blockTemplate": "badgeList",
    "name": "text",
    "displayConditions": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "expression": [
        {
          "query": {
            "key": "anything",
            "type": "anything",
            "filter": "includes",
            "value": "text"
          },
          "operator": "and"
        }
      ]
    },
    "variables": {
      "headerText": "text",
      "items": [
        {
          "order": 1,
          "title": "text",
          "subtitle": "text",
          "type": "text",
          "icon": null,
          "iconColor": null,
          "iconSize": null,
          "imageSize": 1,
          "imageSizeUnit": "pixels",
          "imageAspectRatio": null,
          "image": null,
          "mediaSpacing": "text"
        }
      ]
    },
    "styles": {
      "typography": {
        "header": {
          "fontSize": "text",
          "fontStyle": "text"
        },
        "itemTitle": {
          "fontSize": "text",
          "fontStyle": "text"
        },
        "itemSubtitle": {
          "fontSize": "text",
          "fontStyle": "text"
        }
      },
      "backgroundColors": {
        "header": "text",
        "item": "text",
        "block": "text"
      },
      "colors": {
        "headerText": "text",
        "itemTitleText": "text",
        "itemSubtitleText": "text"
      },
      "layout": {
        "headerTextAlign": "text",
        "bodyAlign": "text",
        "itemTextAlign": "text",
        "itemPositionAlign": "text",
        "rowCount": 1,
        "columnCount": 1
      },
      "appearance": {
        "headerBorderThickness": "text",
        "headerBorderStyle": "none",
        "headerCornerRadius": "text",
        "headerPadding": "text",
        "bodySpacing": "text",
        "headingToBodySpacing": "text",
        "blockBorderThickness": "text",
        "blockBorderStyle": "none",
        "blockPadding": "text",
        "blockCornerRadius": "text",
        "itemBorderThickness": "text",
        "itemBorderStyle": "none",
        "itemCornerRadius": "text",
        "itemTextSpacing": "text"
      }
    }
  },
  "adjustments": [
    "text"
  ]
}

Replace checkout block

put

Replaces a checkout block's content.

The block keeps its id, variation, template, and position. Everything else comes from the request: name, variables, and styles are required, and every field you leave out, at any depth, resets to the template's value rather than keeping its saved value. A list you send, such as a trust badge's items or an FAQ block's questions, replaces the template's list whole.

To change a few settings, GET the block and copy its name, variables, and styles into the request with your changes. Don't send the whole block back: the body is strict, so the read-only fields GET returns (id, variationId, locationId, blockTemplate) are rejected. GET also returns displayConditions and upsellProductRules in their stored, compiled form, which this endpoint doesn't accept. Leave both out to keep them as they are, or send the condition-list form that POST takes to replace them. Also remove an upsell's variables.discount when you copy it: discounts can't be sent with an API key.

A postPurchaseUpsell block is the exception: its PUT merges the fields you send onto the saved block, and returns adjustments listing anything the API changed on its own to keep the offer valid.

Required Fields

  • blockType (string) — Must match the saved block's type. A block's type can't be changed.

  • name (string) — Display name in the dashboard

  • variables (object) — The block's content settings. Fields you leave out reset to the template's values.

  • styles (object) — The block's style settings. Fields you leave out reset to the template's values.

Optional Fields

  • displayConditions (object or null) — Omit it to keep the current conditions, send null to remove them, or send a condition list (the same form as POST) to replace them. Not accepted for postPurchaseUpsell.

  • upsellProductRules (array or null) — Omit it to keep the current rules, send null to remove them, or send a list of rules (the same form as POST) to replace them. upsell and postPurchaseUpsell only.

Response

{ "block": { ... } }, with the saved block, plus adjustments for a postPurchaseUpsell block.

Important Notes

  • The block must belong to the experience in the path, or the request returns a 404.

  • A PUT never changes a block's discount. The block keeps the discount saved in Intelligems, and a request that sends one (an upsell's variables.discount, a rule's discount, or a post-purchase upsell's discountType or discountValue) returns a 400.

  • If a block has a discount, whether on the block or on its saved rules, a PUT can't change who gets it. Sending upsellProductRules or displayConditions (a list or null) returns a 400, and so does changing maxProductLimit, excludeItemsInCart, or a post-purchase upsell's maxQuantityType or maxQuantity. Leave the rules and conditions out to keep them, and send the other fields as GET returns them. To change any of them, edit the block in Intelligems.

  • A timer's resetTimezone is optional. The API sets it to the store's timezone, replacing any value you send. If the store has no timezone, the API keeps the one you send, and a recurring timer sent without one returns a 400. A zone you send has to be an IANA name, such as America/New_York: one that isn't returns a 400.

  • Updating a postPurchaseUpsell block doesn't re-check that the store is ready for post-purchase upsells. Only adding one does.

  • Changes to a running experience take effect for shoppers immediately.

Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.

Authorizations
intelligems-access-tokenstringRequired

Intelligems external API access token.

Path parameters
experienceIdstring · uuidRequired

The experience the checkout block belongs to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
blockIdstring · uuidRequired

The checkout block to act on. Copy it from the GET response.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Body
or
or
or
or
or
Responses
200

OK

application/json
put/v25-10-beta/experiences/{experienceId}/checkout-blocks/{blockId}
Replace a timer
curl --location --request PUT 'https://api.intelligems.io/v25-10-beta/experiences/YOUR_EXPERIENCE_ID/checkout-blocks/YOUR_BLOCK_ID' \
--header 'content-type: application/json' \
--header 'intelligems-access-token: YOUR_API_KEY' \
--data '{
  "blockType": "timer",
  "name": "Sale ends soon",
  "variables": {
    "timerMode": "fixedDate",
    "endDateTime": "2026-12-01T05:00:00.000Z",
    "countdownText": "Sale ends in {{Time remaining}}",
    "expiredText": "Sale over"
  },
  "styles": {
    "typography": { "text": { "fontSize": "base", "fontStyle": "normal" } },
    "backgroundColors": { "block": "transparent", "expired": "transparent" },
    "colors": { "text": "base", "expiredText": "subdued" },
    "layout": { "textAlign": "center" },
    "appearance": {
      "blockBorderThickness": "none",
      "blockCornerRadius": "none",
      "blockPadding": "none"
    }
  },
  "displayConditions": null
}'
{
  "block": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "variationId": "123e4567-e89b-12d3-a456-426614174000",
    "locationId": "text",
    "blockType": "text",
    "blockTemplate": "badgeList",
    "name": "text",
    "displayConditions": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "expression": [
        {
          "query": {
            "key": "anything",
            "type": "anything",
            "filter": "includes",
            "value": "text"
          },
          "operator": "and"
        }
      ]
    },
    "variables": {
      "headerText": "text",
      "items": [
        {
          "order": 1,
          "title": "text",
          "subtitle": "text",
          "type": "text",
          "icon": null,
          "iconColor": null,
          "iconSize": null,
          "imageSize": 1,
          "imageSizeUnit": "pixels",
          "imageAspectRatio": null,
          "image": null,
          "mediaSpacing": "text"
        }
      ]
    },
    "styles": {
      "typography": {
        "header": {
          "fontSize": "text",
          "fontStyle": "text"
        },
        "itemTitle": {
          "fontSize": "text",
          "fontStyle": "text"
        },
        "itemSubtitle": {
          "fontSize": "text",
          "fontStyle": "text"
        }
      },
      "backgroundColors": {
        "header": "text",
        "item": "text",
        "block": "text"
      },
      "colors": {
        "headerText": "text",
        "itemTitleText": "text",
        "itemSubtitleText": "text"
      },
      "layout": {
        "headerTextAlign": "text",
        "bodyAlign": "text",
        "itemTextAlign": "text",
        "itemPositionAlign": "text",
        "rowCount": 1,
        "columnCount": 1
      },
      "appearance": {
        "headerBorderThickness": "text",
        "headerBorderStyle": "none",
        "headerCornerRadius": "text",
        "headerPadding": "text",
        "bodySpacing": "text",
        "headingToBodySpacing": "text",
        "blockBorderThickness": "text",
        "blockBorderStyle": "none",
        "blockPadding": "text",
        "blockCornerRadius": "text",
        "itemBorderThickness": "text",
        "itemBorderStyle": "none",
        "itemCornerRadius": "text",
        "itemTextSpacing": "text"
      }
    }
  },
  "adjustments": [
    "text"
  ]
}

Delete checkout block

delete

Deletes a checkout block.

Deleting a block also removes its display conditions and detaches it from any Agentic Logic placement. The variation's other blocks are not changed.

Response

{ "deleted": true, "blockId": "YOUR_BLOCK_ID" }

Important Notes

  • The block must belong to the experience in the path, or the request returns a 404.

  • Deleting a block from a running experience removes it for shoppers immediately.

Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.

Authorizations
intelligems-access-tokenstringRequired

Intelligems external API access token.

Path parameters
experienceIdstring · uuidRequired

The experience the checkout block belongs to.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
blockIdstring · uuidRequired

The checkout block to act on. Copy it from the GET response.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Responses
200

OK

application/json
delete/v25-10-beta/experiences/{experienceId}/checkout-blocks/{blockId}
Delete a block
curl --location --request DELETE 'https://api.intelligems.io/v25-10-beta/experiences/YOUR_EXPERIENCE_ID/checkout-blocks/YOUR_BLOCK_ID' \
--header 'intelligems-access-token: YOUR_API_KEY'
{
  "deleted": true,
  "blockId": "123e4567-e89b-12d3-a456-426614174000"
}

Last updated

Was this helpful?