Skip to main content

Get a brand page block

POST /v2/ian/bp_block

Retrieves a block of content to display within a brand page. Content can be anything the advertiser wants to display on the page, such as additional banners or lists of products. Send one block_versioned_id per request in the order in which the ids appeared in the ordered_versioned_block_ids array returned by the Get a brand page endpoint.

Security

NameInDescription
AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.

Parameters

NameInTypeRequiredDescription
X-Retailer-IdheaderstringOptional

The retailer slug. This is only required for a retailer with multiple banners. Retailers with single banners can leave this empty.

Request

FieldTypeRequiredDescription
slugstringRequired

The slug of brand page.

page_view_idstringRequired

Identifier associated with the page view. Must be a UUID (Universal Unique Identifier).

block_versioned_idBlockVersionedIdRequired

Versioned identifier of the block.

session_contextSessionContextRequired

Context related to user session.

store_contextStoreContextRequired

Context related to the selected store.

BlockVersionedId Object

FieldTypeRequiredDescription
typestringOptional

Type of the brand page block.

versioned_identifierVersionedIdOptional

Versioned identifier of the block.

VersionedId Object

FieldTypeRequiredDescription
gidstringOptional

Unique ID of the entity.

versionintegerOptional

Version of the entity.

SessionContext Object

FieldTypeRequiredDescription
user_idstringOptional

Unique user ID of the user performing the query. Maximum 50 characters.

user_ipstringOptional

The IP address of the end user. Maximum 50 characters.

user_agentstringOptional

The user agent of the device making the request. Maximum 50 characters.

test_onlybooleanOptional

When true, the campaigns created for Carrot Ads testing are guaranteed to participate in the ads auction along with other campaigns. Default is false.

StoreContext Object

FieldTypeRequiredDescription
location_codestringRequired

The store location code used to perform the query. Maximum 100 characters.

Request examples

curl --request POST \
--url https://connect-ian.instacart.com/v2/ian/bp_block \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Retailer-Id: string' \
--data '{
"slug": "string",
"page_view_id": "string",
"block_versioned_id": {
"type": "HERO_BANNER",
"versioned_identifier": {
"gid": "string",
"version": 1
}
},
"session_context": {
"user_id": "string",
"user_ip": "string",
"user_agent": "string",
"test_only": true
},
"store_context": {
"location_code": "string"
}
}'

Response

FieldTypeRequiredDescription
brand_page_blockBlockOptional

Content for brand page block.

Block Object

FieldTypeRequiredDescription
bannerBannerOptional

Brand page banner block. May be a section banner or an image story banner with title and text. One of the blocks in this table is returned per brand page block.

item_listItemListOptional

Brand page item list block. May be a standard item list or a spotlight item list with included spotlight item images. One of the blocks in this table is returned per brand page block.

FieldTypeRequiredDescription
titlestringOptional

The title of the brand page banner. Only applicable for image story banner.

textstringOptional

The text of the brand page banner. Only applicable for image story banner.

desktop_imageImageMediumPropertiesRequired

The desktop banner image.

mobile_imageImageMediumPropertiesOptional

The mobile banner image.

ImageMediumProperties Object

FieldTypeRequiredDescription
public_urlstringRequired

Public URL that a client must use for rendering. This URL uses the https:// scheme.

alt_textstringOptional

Alternative text to display in case the image fails loading.

image_metadataImageMetadataOptional

Additional information about the image. This can be used to assist rendering, where needed.

ImageMetadata Object

FieldTypeRequiredDescription
widthintegerOptional

Width of the image.

heightintegerOptional

Height of the image.

size_bytesintegerOptional

Size of the image.

content_typestringOptional

MIME-type of the image.

ItemList Object

FieldTypeRequiredDescription
titlestringRequired

The title of the item list.

product_idsArray(integer)Required

The product ids of the item list.

rrcsArray(string)Required

The rrcs of the item list.

upcsArray(string)Optional

The UPCs of the item list.

spotlight_itemsArray(SpotlightItem)Optional

Only included for spotlight item lists, which will have optional advertiser-provided images.

SpotlightItem Object

FieldTypeRequiredDescription
product_idintegerRequired

The product ID of the spotlight item.

rrcstringRequired

Retailer reference code (RRC) of the spotlight item.

upcstringOptional

Universal product code (UPC) of the spotlight item.

desktop_imageImageMediumPropertiesOptional

Optional spotlight item image used for desktop. If an image is not returned, fall back to using the default image instead.

mobile_imageImageMediumPropertiesOptional

Optional spotlight item image used for mobile. If an image is not returned, fall back to using the default image instead.

Response examples

200 Success

{
"brand_page_block": {
"banner": {
"title": "mock title!",
"text": "mock text",
"desktop_image": {
"public_url": "https://display.instacart.dev/cdn-cgi/image.png",
"alt_text": "Awesome alt text!"
}
}
}
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Request with invalid block type"is not included in the list"1001{"key":"block_versioned_id.type"}
400Missing slug"can't be blank"1001{"key":"slug"}
400Missing page view id"can't be blank"1001{"key":"page_view_id"}
400Invalid page view ID"must be a UUID or 'None'"1001{"key":"page_view_id"}
400too long user_id in the session context"User ID length must be less than 51 characters"1001{"key":"session_context.user_id"}
400too long location code in the store context"Location code length must be less than 101 characters"1001{"key":"store_context.location_code"}