> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snagsolutions.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get page sections

> This endpoint allows you to fetch page sections



## OpenAPI

````yaml /api-reference/openapi.documented.json get /api/page_sections
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/page_sections:
    get:
      tags:
        - Landing Page
      summary: Get page sections
      description: This endpoint allows you to fetch page sections
      parameters:
        - name: websiteId
          in: query
          description: Unique identifier for the website to filter by
          required: true
          schema:
            type: string
            format: uuid
            title: Website ID
            example: 123e4567-e89b-12d3-a456-426614174333
        - name: organizationId
          in: query
          description: Unique identifier for the organization to filter by
          required: true
          schema:
            type: string
            format: uuid
            title: Organization ID
            example: 123e4567-e89b-12d3-a456-426614174334
        - name: placement
          in: query
          description: Placement of the page section
          required: true
          schema:
            type: string
            enum:
              - global
              - page
            title: Placement
            example: page
        - name: pageId
          in: query
          description: Unique identifier for the page to filter by
          schema:
            type: string
            format: uuid
            title: Page ID
            example: 123e4567-e89b-12d3-a456-426614174336
        - name: all
          in: query
          description: Whether to get all sections regardless of duration
          schema:
            type: string
            enum:
              - '1'
            title: All
            example: '1'
        - name: pageSectionType
          in: query
          description: Type of the page section to filter by
          schema:
            type: string
            enum:
              - all_items
              - discovery_item
              - discovery_items_grid
            nullable: true
            title: Page Section Type
            example: page
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    title: ID
                    description: Unique identifier for the page section
                    example: 123e4567-e89b-12d3-a456-426614174337
                  websiteId:
                    type: string
                    format: uuid
                    title: Website ID
                    description: Unique identifier for the website
                    example: 123e4567-e89b-12d3-a456-426614174333
                  organizationId:
                    type: string
                    format: uuid
                    title: Organization ID
                    description: Unique identifier for the organization
                    example: 123e4567-e89b-12d3-a456-426614174334
                  title:
                    type: string
                    nullable: true
                    title: Title
                    description: Title of the page section
                    example: Featured Collection
                  pageSectionType:
                    type: string
                    enum:
                      - all_items
                      - discovery_item
                      - discovery_items_grid
                    nullable: true
                    title: Page Section Type
                    description: Type of the page section
                    example: discovery_items_grid
                  placement:
                    type: string
                    enum:
                      - global
                      - page
                    title: Placement
                    description: Placement of the page section
                    example: page
                  sortId:
                    type: number
                    title: Sort ID
                    description: Order of the page section
                    example: 1
                  pageId:
                    type: string
                    format: uuid
                    title: Page ID
                    description: ID of the page this section belongs to
                    example: 123e4567-e89b-12d3-a456-426614174336
                  durationStart:
                    type: string
                    format: date-time
                    title: Duration Start
                    description: Start time of the page section visibility
                    example: '2023-01-01T00:00:00.000Z'
                  durationEnd:
                    type: string
                    format: date-time
                    nullable: true
                    title: Duration End
                    description: End time of the page section visibility
                    example: '2023-12-31T23:59:59.999Z'
                  banner:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      websiteCollectionBanners:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                          required:
                            - id
                      carousel:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          carouselItems:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  format: uuid
                                sortId:
                                  type: number
                              required:
                                - id
                                - sortId
                        required:
                          - id
                          - carouselItems
                        nullable: true
                    required:
                      - id
                      - websiteCollectionBanners
                    nullable: true
                  itemsGrids:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                      required:
                        - id
                  discoveryItems:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        title:
                          type: string
                        description:
                          type: string
                          nullable: true
                        layout:
                          type: string
                          enum:
                            - container_style
                            - full_width_hero
                          nullable: true
                        loyaltySection:
                          type: string
                          nullable: true
                        pageMediaLink:
                          type: string
                          nullable: true
                        mediaLink:
                          type: string
                          nullable: true
                        website:
                          type: string
                          nullable: true
                        twitter:
                          type: string
                          nullable: true
                        loyaltyRuleGroupId:
                          type: string
                          nullable: true
                        sortId:
                          type: number
                        buttonText:
                          type: string
                          nullable: true
                        externalLink:
                          type: string
                          nullable: true
                        hideQuestInfo:
                          default: false
                          type: boolean
                      required:
                        - id
                        - title
                required:
                  - id
                  - websiteId
                  - organizationId
                  - placement
                  - durationStart
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    title: Success
                    description: Indicates operation success
                    example: false
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Internal server error
                  debugInfo:
                    type: string
                    title: Debug Info
                    description: Optional debug information
                    example: Stack trace or additional error details
                required:
                  - success
                  - message
                title: Internal Server Error Response
                description: Schema for internal server error response

````