Return a CMS Section
Returns a CMS Section
GET
/
api
/
v2
/
platform
/
cms_sections
/
{id}
Return a CMS Section
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://{defaultHost}/api/v2/platform/cms_sections/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v2/platform/cms_sections/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "19",
"type": "cms_section",
"attributes": {
"name": "Debitis rerum nulla maiores quam ut impedit.",
"content": {},
"settings": {
"gutters": "No Gutters"
},
"fit": "Screen",
"destination": null,
"type": "Spree::Cms::Sections::HeroImage",
"position": 4,
"linked_resource_type": "Spree::Product",
"created_at": "2022-11-08T19:34:04.573Z",
"updated_at": "2022-11-08T19:34:04.573Z"
},
"relationships": {
"cms_page": {
"data": {
"id": "17",
"type": "cms_page"
}
},
"linked_resource": {
"data": {
"id": "25",
"type": "product"
}
}
}
}
}{
"error": "The access token is invalid"
}{
"error": "The resource you were looking for could not be found."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes
Response
Record found
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Return a CMS Section
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://{defaultHost}/api/v2/platform/cms_sections/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url http://{defaultHost}/api/v2/platform/cms_sections/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "19",
"type": "cms_section",
"attributes": {
"name": "Debitis rerum nulla maiores quam ut impedit.",
"content": {},
"settings": {
"gutters": "No Gutters"
},
"fit": "Screen",
"destination": null,
"type": "Spree::Cms::Sections::HeroImage",
"position": 4,
"linked_resource_type": "Spree::Product",
"created_at": "2022-11-08T19:34:04.573Z",
"updated_at": "2022-11-08T19:34:04.573Z"
},
"relationships": {
"cms_page": {
"data": {
"id": "17",
"type": "cms_page"
}
},
"linked_resource": {
"data": {
"id": "25",
"type": "product"
}
}
}
}
}{
"error": "The access token is invalid"
}{
"error": "The resource you were looking for could not be found."
}
