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
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 /fetchProjectProperties
Fetches the project properties from CaaS.
Input parameters
Parameter | In | Type | Default | Nullable | Description |
---|---|---|---|---|---|
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
{
"type": "ProjectProperties",
"data": {
"ps_logo": {
"type": "Image",
"id": "74fe3e66-0408-4aa8-8bd1-6f7ea3e2858f",
"previewId": "74fe3e66-0408-4aa8-8bd1-6f7ea3e2858f.de_DE",
"meta": {},
"description": null,
"resolutions": {
"16x4_L": {
"fileSize": 4004,
"extension": "png",
"mimeType": "image/png",
"width": 480,
"height": 480,
"url": "https://example.org/image.16x4_L.de_DE"
}
}
},
"ps_logo_small": {
"type": "Image",
"id": "8d11b307-2a4e-4c8c-8cbb-d79afcc00af1",
"previewId": "8d11b307-2a4e-4c8c-8cbb-d79afcc00af1.de_DE",
"meta": {},
"description": null,
"resolutions": {
"16x4_L": {
"fileSize": 3991,
"extension": "png",
"mimeType": "image/png",
"width": 480,
"height": 480,
"url": "https://example.org/image.16x4_L.de_DE"
}
}
},
"ps_logo_text": "Connect for Commerce",
"ps_theme_primary": "#D5DD03",
"ps_theme_secondary": "#999999"
},
"layout": "project_settings",
"meta": {},
"name": "ProjectProperties",
"previewId": "1775ac7c-39e0-49fd-8285-5e7ac76fd717.de_DE",
"id": "1775ac7c-39e0-49fd-8285-5e7ac76fd717",
"masterLocale": {
"identifier": "EN",
"country": "GB",
"language": "en"
}
}
Schema of the response body
{
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "ProjectProperties"
},
"data": {
"type": "object",
"properties": {
"ps_logo": {
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "Image"
},
"id": {
"type": "string"
},
"previewId": {
"type": "string"
},
"meta": {
"type": "object"
},
"description": {
"type": "string",
"nullable": true
},
"resolutions": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"fileSize": {
"type": "integer"
},
"extension": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"url": {
"type": "string"
}
}
}
}
}
},
"ps_logo_small": {
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "Image"
},
"id": {
"type": "string"
},
"previewId": {
"type": "string"
},
"meta": {
"type": "object"
},
"description": {
"type": "string",
"nullable": true
},
"resolutions": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"fileSize": {
"type": "integer"
},
"extension": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"url": {
"type": "string"
}
}
}
}
}
},
"ps_logo_text": {
"type": "string"
},
"ps_theme_primary": {
"type": "string"
},
"ps_theme_secondary": {
"type": "string"
}
},
"example": {
"ps_logo": {
"type": "Image",
"id": "74fe3e66-0408-4aa8-8bd1-6f7ea3e2858f",
"previewId": "74fe3e66-0408-4aa8-8bd1-6f7ea3e2858f.de_DE",
"meta": {},
"description": null,
"resolutions": {
"16x4_L": {
"fileSize": 4004,
"extension": "png",
"mimeType": "image/png",
"width": 480,
"height": 480,
"url": "https://example.org/image.16x4_L.de_DE"
}
}
},
"ps_logo_small": {
"type": "Image",
"id": "8d11b307-2a4e-4c8c-8cbb-d79afcc00af1",
"previewId": "8d11b307-2a4e-4c8c-8cbb-d79afcc00af1.de_DE",
"meta": {},
"description": null,
"resolutions": {
"16x4_L": {
"fileSize": 3991,
"extension": "png",
"mimeType": "image/png",
"width": 480,
"height": 480,
"url": "https://example.org/image.16x4_L.de_DE"
}
}
},
"ps_logo_text": "Connect for Commerce",
"ps_theme_primary": "#D5DD03",
"ps_theme_secondary": "#999999"
}
},
"layout": {
"type": "string",
"example": "project_settings"
},
"meta": {
"type": "object",
"example": {}
},
"name": {
"type": "string",
"example": "ProjectProperties"
},
"previewId": {
"type": "string",
"example": "1775ac7c-39e0-49fd-8285-5e7ac76fd717.de_DE"
},
"id": {
"type": "string",
"example": "1775ac7c-39e0-49fd-8285-5e7ac76fd717"
},
"masterLocale": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"example": "EN"
},
"country": {
"type": "string",
"example": "GB"
},
"language": {
"type": "string",
"example": "en"
}
}
}
},
"example": {
"type": "ProjectProperties",
"data": {
"ps_logo": {
"type": "Image",
"id": "74fe3e66-0408-4aa8-8bd1-6f7ea3e2858f",
"previewId": "74fe3e66-0408-4aa8-8bd1-6f7ea3e2858f.de_DE",
"meta": {},
"description": null,
"resolutions": {
"16x4_L": {
"fileSize": 4004,
"extension": "png",
"mimeType": "image/png",
"width": 480,
"height": 480,
"url": "https://example.org/image.16x4_L.de_DE"
}
}
},
"ps_logo_small": {
"type": "Image",
"id": "8d11b307-2a4e-4c8c-8cbb-d79afcc00af1",
"previewId": "8d11b307-2a4e-4c8c-8cbb-d79afcc00af1.de_DE",
"meta": {},
"description": null,
"resolutions": {
"16x4_L": {
"fileSize": 3991,
"extension": "png",
"mimeType": "image/png",
"width": 480,
"height": 480,
"url": "https://example.org/image.16x4_L.de_DE"
}
}
},
"ps_logo_text": "Connect for Commerce",
"ps_theme_primary": "#D5DD03",
"ps_theme_secondary": "#999999"
},
"layout": "project_settings",
"meta": {},
"name": "ProjectProperties",
"previewId": "1775ac7c-39e0-49fd-8285-5e7ac76fd717.de_DE",
"id": "1775ac7c-39e0-49fd-8285-5e7ac76fd717",
"masterLocale": {
"identifier": "EN",
"country": "GB",
"language": "en"
}
}
}
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 /getAvailableLocales
Gets the available locales in the configured FirstSpirit project.
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
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