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 |
---|---|---|---|---|---|
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"
},
"displayed": {
"type": "boolean",
"example": true
}
}
}
}
}
}
}
}
}
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. | |
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"
},
"displayed": {
"type": "boolean",
"example": true
}
}
}
}
}
}
}
}
}
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. | |
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": "string"
}
}
}
Schema of the response body
{
"type": "object",
"properties": {
"idMap": {
"type": "object"
},
"seoRouteMap": {
"type": "object"
},
"structure": {
"type": "array"
},
"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",
"exampke": "en_GB"
}
}
}
}
}
}
}
Other responses
GET /isPreview
Determines whether the requester is in preview mode.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
X-Referrer |
header | string | No | Provide url about the iframe parent |
Response 200 OK
Other responses
Last update:
June 3, 2024