Skip to main content
GET
/
api
/
page_sections
Get page sections
curl --request GET \
  --url https://admin.snagsolutions.io/api/page_sections
import 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>",
      "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

websiteId
string<uuid>
required

Unique identifier for the website to filter by

Example:

"123e4567-e89b-12d3-a456-426614174333"

organizationId
string<uuid>
required

Unique identifier for the organization to filter by

Example:

"123e4567-e89b-12d3-a456-426614174334"

placement
enum<string>
required

Placement of the page section

Available options:
global,
page
Example:

"page"

pageId
string<uuid>

Unique identifier for the page to filter by

Example:

"123e4567-e89b-12d3-a456-426614174336"

all
enum<string>

Whether to get all sections regardless of duration

Available options:
1
Example:

"1"

pageSectionType
enum<string> | null

Type of the page section to filter by

Available options:
all_items,
discovery_item,
discovery_items_grid
Example:

"page"

Response

200

id
string<uuid>
required

Unique identifier for the page section

Example:

"123e4567-e89b-12d3-a456-426614174337"

websiteId
string<uuid>
required

Unique identifier for the website

Example:

"123e4567-e89b-12d3-a456-426614174333"

organizationId
string<uuid>
required

Unique identifier for the organization

Example:

"123e4567-e89b-12d3-a456-426614174334"

placement
enum<string>
required

Placement of the page section

Available options:
global,
page
Example:

"page"

durationStart
string<date-time>
required

Start time of the page section visibility

Example:

"2023-01-01T00:00:00.000Z"

title
string | null

Title of the page section

Example:

"Featured Collection"

pageSectionType
enum<string> | null

Type of the page section

Available options:
all_items,
discovery_item,
discovery_items_grid
Example:

"discovery_items_grid"

sortId
number

Order of the page section

Example:

1

pageId
string<uuid>

ID of the page this section belongs to

Example:

"123e4567-e89b-12d3-a456-426614174336"

durationEnd
string<date-time> | null

End time of the page section visibility

Example:

"2023-12-31T23:59:59.999Z"

banner
object | null
itemsGrids
object[]
discoveryItems
object[]