Skip to main content

Get a brand page

POST /v2/ian/bp

Retrieves a brand page that is associated with the display placement ad that is clicked by a customer. Send the click as the value for the slug field. The response returns a page URL, the top most banner, and an ordered list of brand page block ids that identify the blocks to appear in the page. Use the Get a brand page block endpoint to retrieve the block content.

Security

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

Parameters

NameInTypeRequiredDescription
X-Retailer-IdheaderstringOptionalThe retailer slug. This is only required for a retailer with multiple banners. Retailers with single banners can leave this empty.

Request

FieldTypeRequiredDescription
slugstringRequiredThe slug of brand page.
page_view_idstringRequiredIdentifier associated with the page view. Must be a UUID (Universal Unique Identifier).
interaction_idstringRequiredIdentifier to associate brand page with the display ad. Must be a UUID (Universal Unique Identifier).
session_contextSessionContextRequiredContext related to user session.
store_contextStoreContextRequiredContext related to the selected store.

SessionContext Object

FieldTypeRequiredDescription
user_idstringRequiredUnique user ID of the user performing the query. Maximum 50 characters.
user_ipstringRequiredThe IP address of the end user. Maximum 50 characters.
user_agentstringRequiredThe user agent of the device making the request. Maximum 50 characters.
test_onlybooleanOptionalWhen 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_codestringRequiredThe 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 \
--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",
"interaction_id": "string",
"session_context": {
"user_id": "string",
"user_ip": "string",
"user_agent": "string",
"test_only": true
},
"store_context": {
"location_code": "string"
}
}'

Response

FieldTypeRequiredDescription
slugstringRequiredThe slug and unique name of the brand page.
desktop_imageImageMediumPropertiesRequiredImage hero banner of brand page used for desktop.
mobile_imageImageMediumPropertiesRequiredImage hero banner of brand page used for mobile.
logo_imageImageMediumPropertiesOptionalLogo of brand page.
ordered_versioned_block_idsArray(BlockVersionedId)RequiredOrdered list of block ids (not including the hero banner).

ImageMediumProperties Object

FieldTypeRequiredDescription
public_urlstringRequiredPublic URL that a client must use for rendering. This URL uses the https:// scheme.
alt_textstringOptionalAlternative text to display in case the image fails loading.
image_metadataImageMetadataOptionalAdditional information about the image. This can be used to assist rendering, where needed.

ImageMetadata Object

FieldTypeRequiredDescription
widthintegerOptionalWidth of the image.
heightintegerOptionalHeight of the image.
size_bytesintegerOptionalSize of the image.
content_typestringOptionalMIME-type of the image.

BlockVersionedId Object

FieldTypeRequiredDescription
typestringRequiredType of the brand page block. Supported values: ['PRODUCT_COLLECTION', 'SPOTLIGHT_PRODUCT_COLLECTION', 'SECTION_BANNER', 'IMAGE_STORY').
versioned_identifierVersionedIdRequiredVersioned identifier of the block.

VersionedId Object

FieldTypeRequiredDescription
gidstringRequiredUnique ID of the entity.
versionintegerRequiredVersion of the entity.

Response examples

200 Success

{
"slug": "ben-jerry",
"desktop_image": {
"public_url": "https://display.instacart.dev/cdn-cgi/image.png",
"alt_text": "Awesome alt text!"
},
"mobile_image": {
"public_url": "https://display.instacart.dev/cdn-cgi/image.png",
"alt_text": "Awesome alt text!"
},
"logo_image": {
"public_url": "https://display.instacart.dev/cdn-cgi/image.png",
"alt_text": "Logo alt text!"
},
"ordered_versioned_block_ids": [
{
"type": "SPOTLIGHT_PRODUCT_COLLECTION",
"versioned_identifier": {
"gid": "9dd46839-2fd9-4e21-88cd-5af569b87421",
"version": 1
}
},
{
"type": "SECTION_BANNER",
"versioned_identifier": {
"gid": "082be2d9-e1ca-4a39-a99d-ff166c46c154",
"version": 1
}
},
{
"type": "PRODUCT_COLLECTION",
"versioned_identifier": {
"gid": "a1cd5b8e-4f07-4edb-9804-86861f9470ca",
"version": 1
}
}
]
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
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"}