Storefront API
- Authentication
- Account
- Account / Address
- Account / Credit Cards
- Account / Orders
- Order Status
- Cart
- Cart / Line Items
- Cart / Other
- Cart / Coupons
- Checkout
- Checkout / State
- Checkout / Shipments
- Checkout / Payments
- Checkout / Store Credit
- Stripe
- Products
- Vendors
- Stores
- Taxons
- Countries
- CMS Pages
- Menus
- Wishlists
- Wishlists / Wished Items
- Digital Downloads
Platform API
- Authentication
- Addresses
- Adjustments
- Classifications
- CMS Pages
- CMS Sections
- Countries
- Data Feeds
- Digital Links
- Digital Assets
- Line Items
- Menu Items
- Menus
- Option Types
- Option Values
- Orders
- Payment Methods
- Payments
- Products
- Promotion Actions
- Promotion Categories
- Promotion Rules
- Promotions
- Roles
- Shipments
- Shipping Categories
- Shipping Methods
- States
- Stock Items
- Stock Locations
- Store Credit Categories
- Store Credit Types
- Store Credits
- Tax Categories
- Tax Rates
- Taxonomies
- Taxons
- Users
- Variants
- Vendors
- Webhook Events
- Webhook Subscribers
- Wished Items
- Wishlists
- Zones
Update a CMS Section
Updates a CMS Section
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/cms_sections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cms_section": {
"name": "<string>",
"type": "Spree::Cms::Sections::ProductCarousel",
"linked_resource_type": "Spree::Taxon",
"linked_resource_id": "1",
"fit": "Screen",
"position": 2,
"gutters": "No Gutters",
"button_text": "Click Here",
"title": "Shop Today"
}
}'
{
"data": {
"id": "29",
"type": "cms_section",
"attributes": {
"name": "Super Hero",
"content": {},
"settings": {
"gutters": "No Gutters"
},
"fit": "Screen",
"destination": null,
"type": "Spree::Cms::Sections::HeroImage",
"position": 1,
"linked_resource_type": "Spree::Product",
"created_at": "2022-11-08T19:34:05.290Z",
"updated_at": "2022-11-08T19:34:05.525Z"
},
"relationships": {
"cms_page": {
"data": {
"id": "20",
"type": "cms_page"
}
},
"linked_resource": {
"data": {
"id": "28",
"type": "product"
}
}
}
}
}
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: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Body
Update this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Update the resource type that this section links to.
Spree::Taxon
, Spree::Product
, Spree::CmsPage
"Spree::Taxon"
Set the ID of the resource that you would like this section to link to.
"1"
This value is used by front end developers to set CSS classes for content that fits the screen edge-to-edge, or stays within the boundaries of the central container.
Screen
, Container
"Screen"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
This value is used by front end developers for styling the section padding.
Gutters
, No Gutters
"No Gutters"
Update the text value of the button used in this section.
"Click Here"
Update the title for this section.
"Shop Today"
Use a multipart/form-data
request to upload assets.
Update this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Update the resource type that this section links to.
Spree::Taxon
, Spree::Product
, Spree::CmsPage
"Spree::Taxon"
Set the ID of the resource that you would like this section to link to.
"1"
This value is used by front end developers to set CSS classes for content that fits the screen edge-to-edge, or stays within the boundaries of the central container.
Screen
, Container
"Screen"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
This value is used by front end developers for styling the section padding.
Gutters
, No Gutters
"No Gutters"
Update the text value of the button used in this section.
"Click Here"
Update the title for this section.
"Shop Today"
Use a multipart/form-data
request to upload assets.
Change this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
Update the ID of the Taxon that you would like displayed as a Product Carousel.
"1"
Update this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
Update the resource type that image one links to.
Spree::Taxon
, Spree::Product
"Spree::Taxon"
Update the resource type that image two links to.
Spree::Taxon
, Spree::Product
"Spree::Taxon"
Update the slug or path that image two links to.
"men/shirts"
Update the slug or path that image two links to.
"white-shirt"
Update the title used in image one.
"Shop Men's Shirts"
Update the title used in image two.
"Buy This Men's Shirt"
This value is used by front end developers to set CSS classes for content that fits the screen edge-to-edge, or stays within the boundaries of the central container.
Screen
, Container
"Screen"
Update the subtitle used in image one.
"Save 50% today"
Update the subtitle used in image two.
"Save 50% today"
This value is used by front end developers for styling the section padding.
Gutters
, No Gutters
"No Gutters"
Use a multipart/form-data
request to upload assets.
Use a multipart/form-data
request to upload assets.
Update this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
Set the resource type that this section links to.
Spree::Taxon
, Spree::Product
, Spree::CmsPage
"Spree::Taxon"
Change the ID of the resource that you would like this section to link to.
"1"
This value is used by front end developers to set CSS classes for content that fits the screen edge-to-edge, or stays within the boundaries of the central container.
Screen
, Container
"Screen"
This value is used by front end developers for styling the section padding.
Gutters
, No Gutters
"No Gutters"
Update the text value of the button used in this section.
"Click Here"
Update the title for the Section.
"Shop Today"
Update the subtitle for the Section.
"Save Big!"
Update the content here, this can be rich text editor content.
"Lots of text and content goes here."
Update this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
Update the resource type that image one links to.
Spree::Taxon
, Spree::Product
"Spree::Taxon"
Update the resource type that image two links to.
Spree::Taxon
, Spree::Product
"Spree::Taxon"
Update the resource type that image three links to.
Spree::Taxon
, Spree::Product
"Spree::Taxon"
Update the slug or path that image two links to.
"men/shirts"
Update the slug or path that image two links to.
"white-shirt"
Update the slug or path that image three links to.
"red-shirt"
Update the title used in image one.
"Shop Men's Shirts"
Update the title used in image two.
"Buy This Men's Shirt"
Update the title used in image three.
"Buy This Women's Skirt"
This value is used by front end developers to set CSS classes for content that fits the screen edge-to-edge, or stays within the boundaries of the central container.
Screen
, Container
"Screen"
This value is used by front end developers for styling the order the images appear.
Default
, Reversed
"Default"
This value is used by front end developers for showing and hiding the label on the images.
Show
, Hide
"Show"
Use a multipart/form-data
request to upload assets.
Use a multipart/form-data
request to upload assets.
Use a multipart/form-data
request to upload assets.
Update this section name.
Change the section type.
Spree::Cms::Sections::HeroImage
, Spree::Cms::Sections::FeaturedArticle
, Spree::Cms::Sections::ProductCarousel
, Spree::Cms::Sections::ImageGallery
, Spree::Cms::Sections::SideBySideImages
, Spree::Cms::Sections::RichTextContent
"Spree::Cms::Sections::ProductCarousel"
Pass the position that you want this section to appear in. (The list is not zero indexed, so the first item is position: 1
)
2
This value is used by front end developers to set CSS classes for content that fits the screen edge-to-edge, or stays within the boundaries of the central container.
Screen
, Container
"Screen"
Update the content, here, this can be rich text editor content.
"Lots of text and content goes here."
curl --request PATCH \
--url http://{defaultHost}/api/v2/platform/cms_sections/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"cms_section": {
"name": "<string>",
"type": "Spree::Cms::Sections::ProductCarousel",
"linked_resource_type": "Spree::Taxon",
"linked_resource_id": "1",
"fit": "Screen",
"position": 2,
"gutters": "No Gutters",
"button_text": "Click Here",
"title": "Shop Today"
}
}'
{
"data": {
"id": "29",
"type": "cms_section",
"attributes": {
"name": "Super Hero",
"content": {},
"settings": {
"gutters": "No Gutters"
},
"fit": "Screen",
"destination": null,
"type": "Spree::Cms::Sections::HeroImage",
"position": 1,
"linked_resource_type": "Spree::Product",
"created_at": "2022-11-08T19:34:05.290Z",
"updated_at": "2022-11-08T19:34:05.525Z"
},
"relationships": {
"cms_page": {
"data": {
"id": "20",
"type": "cms_page"
}
},
"linked_resource": {
"data": {
"id": "28",
"type": "product"
}
}
}
}
}