Connect for Commerce Frontend API Server 1.0.0
This schema has to be implemented by any server functioning as the backend of the Frontend API in order for the client module to use it.
Endpoints
GET /findPage
Finds a page based on the given parameters.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
ecom-share-token |
header | string | No | Provide a token for ShareView | |
id |
query | string | No | ID of the page as defined in the mapping. | |
locale |
query | string | No | Locale of the desired response. | |
type |
query | string | No | Type of the page; either 'product', 'category' or 'content'. | |
x-referrer |
header | string | No | Provide url about the iframe parent |
Response 200 OK
{
"previewId": "befda52e-240a-4961-b167-80ea7bab00a8",
"children": [
{
"name": "sup_content",
"previewId": "57eaaa37-cdec-4c1a-8867-d3b860cec996",
"children": [
{
"id": "76d255f3-e65f-42ee-96b6-42ea00677b5e",
"previewId": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb",
"type": "type",
"sectionType": "section_type",
"data": {},
"children": [
{}
],
"displayed": true
}
]
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"previewId": {
"type": "string",
"example": "befda52e-240a-4961-b167-80ea7bab00a8"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "sup_content"
},
"previewId": {
"type": "string",
"example": "57eaaa37-cdec-4c1a-8867-d3b860cec996"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "76d255f3-e65f-42ee-96b6-42ea00677b5e"
},
"previewId": {
"type": "string",
"example": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb"
},
"type": {
"type": "string",
"example": "type"
},
"sectionType": {
"type": "string",
"example": "section_type"
},
"data": {
"type": "object"
},
"children": {
"type": "array",
"items": {
"type": "object"
}
},
"displayed": {
"type": "boolean",
"example": true
}
}
}
}
}
}
}
}
}
Response headers
Name | Description | Schema |
---|---|---|
Access-Control-Expose-Headers |
Header to expose the `shared-preview` header. | string |
shared-preview |
Header indicating shared preview information. | string |
Other responses
GET /findElement
Finds an element based on the given parameters.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
fsPageId |
query | string | No | ID of the FirstSpirit page. | |
locale |
query | string | No | Locale of the desired response. | |
token |
header | string | No | Provide a token for ShareView | |
x-referrer |
header | string | No | Provide url about the iframe parent |
Response 200 OK
{
"previewId": "befda52e-240a-4961-b167-80ea7bab00a8",
"children": [
{
"name": "sup_content",
"previewId": "57eaaa37-cdec-4c1a-8867-d3b860cec996",
"children": [
{
"id": "76d255f3-e65f-42ee-96b6-42ea00677b5e",
"previewId": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb",
"type": "type",
"sectionType": "section_type",
"data": {},
"children": [
{}
],
"displayed": true
}
]
}
]
}
Schema of the response body
{
"type": "object",
"properties": {
"previewId": {
"type": "string",
"example": "befda52e-240a-4961-b167-80ea7bab00a8"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "sup_content"
},
"previewId": {
"type": "string",
"example": "57eaaa37-cdec-4c1a-8867-d3b860cec996"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "76d255f3-e65f-42ee-96b6-42ea00677b5e"
},
"previewId": {
"type": "string",
"example": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb"
},
"type": {
"type": "string",
"example": "type"
},
"sectionType": {
"type": "string",
"example": "section_type"
},
"data": {
"type": "object"
},
"children": {
"type": "array",
"items": {
"type": "object"
}
},
"displayed": {
"type": "boolean",
"example": true
}
}
}
}
}
}
}
}
}
Response headers
Name | Description | Schema |
---|---|---|
Access-Control-Expose-Headers |
Header to expose the `shared-preview` header. | string |
shared-preview |
Header indicating shared preview information. | string |
Other responses
GET /fetchNavigation
Fetches the navigation based on the given parameters.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
initialPath |
query | string | No | Sub-path to search below. | |
locale |
query | string | No | Locale of the desired response. | |
token |
header | string | No | Provide a token for ShareView | |
x-referrer |
header | string | No | Provide url about the iframe parent |
Response 200 OK
{
"idMap": {},
"seoRouteMap": {},
"structure": [
{}
],
"pages": {},
"meta": {
"identifier": {
"tenantId": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb",
"navigationId": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb",
"languageId": "en_GB"
}
}
}
Schema of the response body
{
"type": "object",
"properties": {
"idMap": {
"type": "object"
},
"seoRouteMap": {
"type": "object"
},
"structure": {
"type": "array",
"items": {
"type": "object"
}
},
"pages": {
"type": "object"
},
"meta": {
"type": "object",
"properties": {
"identifier": {
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"example": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb"
},
"navigationId": {
"type": "string",
"example": "792e9ece-b3cf-49b0-ba96-b8c03a2d4acb"
},
"languageId": {
"type": "string",
"example": "en_GB"
}
}
}
}
}
}
}
Response headers
Name | Description | Schema |
---|---|---|
Access-Control-Expose-Headers |
Header to expose the `shared-preview` header. | string |
shared-preview |
Header indicating shared preview information. | string |
Other responses
GET /isPreview
Determines whether the requester is in preview mode.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
token |
header | string | No | Provide a token for ShareView | |
x-referrer |
header | string | No | Provide url about the iframe parent |
Response 200 OK
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.
Response headers
Name | Description | Schema |
---|---|---|
Access-Control-Expose-Headers |
Header to expose the `shared-preview` header. | string |
shared-preview |
Header indicating shared preview information. | string |
Other responses
Last update:
June 3, 2024