customerAppBlocks
Requires a customer (portal or buyer app) session.
The blocks installed apps show you at one place in the app, e.g. buyer.account.block. A block that failed is left out.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerAppBlocks($target: String!) {
customerAppBlocks(target: $target) {
title
appName
appHandle
handle
installationId
components {
currencyCode
type
amount
display
label
max
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerAppBlocks($target: String!) {\n customerAppBlocks(target: $target) {\n title\n appName\n appHandle\n handle\n installationId\n components {\n currencyCode\n type\n amount\n display\n label\n max\n }\n }\n}",
"variables": {
"target": "string"
}
}
EOF
Variables:
{
"target": "string"
}
Response:
{
"data": {
"customerAppBlocks": [
{
"title": "string",
"appName": "string",
"appHandle": "string",
"handle": "string",
"installationId": "id",
"components": [
{
"currencyCode": "string",
"type": "string",
"amount": "string",
"display": "string",
"label": "string",
"max": 0
}
]
}
]
}
}
customerAppBlocks(
contextId: ID
target: String!
): [AppBlockView!]!
Arguments
customerAppBlocks.contextId ● ID scalar
The product id for product.details.app_block. Leave it out for the other places.
customerAppBlocks.target ● String! non-null scalar
The place: buyer.account.block, buyer.cart.block, buyer.header.badge or product.details.app_block.
Type
AppBlockView object
One installed app's block for a place in the app. A block that failed is left out, never sent empty.