curl --request GET \
--url https://admin.snagsolutions.io/api/page_sectionsimport requests
url = "https://admin.snagsolutions.io/api/page_sections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://admin.snagsolutions.io/api/page_sections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.snagsolutions.io/api/page_sections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin.snagsolutions.io/api/page_sections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admin.snagsolutions.io/api/page_sections")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/page_sections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174337",
"websiteId": "123e4567-e89b-12d3-a456-426614174333",
"organizationId": "123e4567-e89b-12d3-a456-426614174334",
"placement": "page",
"durationStart": "2023-01-01T00:00:00.000Z",
"title": "Featured Collection",
"pageSectionType": "discovery_items_grid",
"sortId": 1,
"pageId": "123e4567-e89b-12d3-a456-426614174336",
"durationEnd": "2023-12-31T23:59:59.999Z",
"banner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"websiteCollectionBanners": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"carousel": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carouselItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortId": 123
}
]
}
},
"itemsGrids": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"discoveryItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"layout": "container_style",
"loyaltySection": "<string>",
"pageMediaLink": "<string>",
"mediaLink": "<string>",
"website": "<string>",
"twitter": "<string>",
"loyaltyRuleGroupId": "<string>",
"sortId": 123,
"buttonText": "<string>",
"externalLink": "<string>",
"hideQuestInfo": false
}
]
}"Forbidden, Could not validate api key"{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Get page sections
This endpoint allows you to fetch page sections
curl --request GET \
--url https://admin.snagsolutions.io/api/page_sectionsimport requests
url = "https://admin.snagsolutions.io/api/page_sections"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://admin.snagsolutions.io/api/page_sections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://admin.snagsolutions.io/api/page_sections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin.snagsolutions.io/api/page_sections"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admin.snagsolutions.io/api/page_sections")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/page_sections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174337",
"websiteId": "123e4567-e89b-12d3-a456-426614174333",
"organizationId": "123e4567-e89b-12d3-a456-426614174334",
"placement": "page",
"durationStart": "2023-01-01T00:00:00.000Z",
"title": "Featured Collection",
"pageSectionType": "discovery_items_grid",
"sortId": 1,
"pageId": "123e4567-e89b-12d3-a456-426614174336",
"durationEnd": "2023-12-31T23:59:59.999Z",
"banner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"websiteCollectionBanners": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"carousel": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carouselItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sortId": 123
}
]
}
},
"itemsGrids": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"discoveryItems": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"layout": "container_style",
"loyaltySection": "<string>",
"pageMediaLink": "<string>",
"mediaLink": "<string>",
"website": "<string>",
"twitter": "<string>",
"loyaltyRuleGroupId": "<string>",
"sortId": 123,
"buttonText": "<string>",
"externalLink": "<string>",
"hideQuestInfo": false
}
]
}"Forbidden, Could not validate api key"{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Query Parameters
Unique identifier for the website to filter by
"123e4567-e89b-12d3-a456-426614174333"
Unique identifier for the organization to filter by
"123e4567-e89b-12d3-a456-426614174334"
Placement of the page section
global, page "page"
Unique identifier for the page to filter by
"123e4567-e89b-12d3-a456-426614174336"
Whether to get all sections regardless of duration
1 "1"
Type of the page section to filter by
all_items, discovery_item, discovery_items_grid "page"
Response
200
Unique identifier for the page section
"123e4567-e89b-12d3-a456-426614174337"
Unique identifier for the website
"123e4567-e89b-12d3-a456-426614174333"
Unique identifier for the organization
"123e4567-e89b-12d3-a456-426614174334"
Placement of the page section
global, page "page"
Start time of the page section visibility
"2023-01-01T00:00:00.000Z"
Title of the page section
"Featured Collection"
Type of the page section
all_items, discovery_item, discovery_items_grid "discovery_items_grid"
Order of the page section
1
ID of the page this section belongs to
"123e4567-e89b-12d3-a456-426614174336"
End time of the page section visibility
"2023-12-31T23:59:59.999Z"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?