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

# List notifications

> Retrieve the merchant's notifications, paginated and grouped by date, plus the unread count. Requires the READ_NOTIFICATIONS scope.

Returns the merchant's notifications grouped into date-labelled sections ("Today", "Yesterday", or a full weekday date), along with the total unread count. The store is bound to your app token server-side — never send a shop id.


## OpenAPI

````yaml GET /notifications
openapi: 3.1.0
info:
  title: Salesive Apps API — Messaging
  version: 1.0.0
  description: >-
    Read the merchant's notifications and send in-app notifications and
    templated emails on behalf of an installed third-party app. Every endpoint
    authenticates with an installed-app access token (prefix `app_`) and
    requires a specific OAuth scope. The target store is bound to the token
    server-side from the installation — never send a shop id.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /notifications:
    get:
      tags:
        - Notifications
      summary: List notifications
      description: >-
        Retrieve the merchant's notifications for the store, paginated and
        grouped into date-labelled sections ("Today", "Yesterday", or a full
        weekday date). The response also includes the total unread count. The
        store is bound to the app token server-side from the installation —
        never send a shop id. Requires the `READ_NOTIFICATIONS` scope.
      operationId: listNotifications
      parameters:
        - name: page
          in: query
          required: false
          description: Page number to retrieve.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          description: Number of notifications per page.
          schema:
            type: integer
            default: 10
            minimum: 1
      responses:
        '200':
          description: Paginated, date-grouped notifications plus the unread count.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          notifications:
                            type: array
                            description: >-
                              Date-labelled sections, each holding the
                              notifications created in that period.
                            items:
                              $ref: '#/components/schemas/NotificationGroup'
                          pagination:
                            $ref: '#/components/schemas/Pagination'
                          unreadCount:
                            type: integer
                            description: >-
                              Total number of unread notifications for the
                              merchant.
              example:
                status: 200
                success: true
                message: Notifications retrieved
                data:
                  notifications:
                    - title: Today
                      data:
                        - _id: 66b3f0a1c2d4e5f600112233
                          user: 66a1b2c3d4e5f60011223344
                          shop: 66a0a1b2c3d4e5f600112200
                          title: New order received
                          message: 'Order #1042 was just placed for $59.99.'
                          type: order
                          read: false
                          data:
                            orderId: 66b3efaa11223344556677
                          createdAt: '2026-06-28T09:14:00.000Z'
                          updatedAt: '2026-06-28T09:14:00.000Z'
                    - title: Yesterday
                      data:
                        - _id: 66b2cd33aabbccdd00112233
                          user: 66a1b2c3d4e5f60011223344
                          shop: 66a0a1b2c3d4e5f600112200
                          title: Low stock
                          message: Blue Hoodie is down to 3 units.
                          type: info
                          read: true
                          readAt: '2026-06-27T18:02:00.000Z'
                          data: {}
                          createdAt: '2026-06-27T15:40:00.000Z'
                          updatedAt: '2026-06-27T18:02:00.000Z'
                  pagination:
                    page: 1
                    limit: 10
                    total: 2
                    pages: 1
                  unreadCount: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    NotificationGroup:
      type: object
      description: A date-labelled section of notifications.
      properties:
        title:
          type: string
          description: 'The section label: "Today", "Yesterday", or a full weekday date.'
        data:
          type: array
          description: Notifications created within this section's period.
          items:
            $ref: '#/components/schemas/Notification'
    Pagination:
      type: object
      description: Pagination metadata for list responses.
      properties:
        total:
          type: integer
          description: Total number of matching items.
        page:
          type: integer
          description: Current page (1-based).
        limit:
          type: integer
          description: Items per page.
        pages:
          type: integer
          description: Total number of pages.
    Notification:
      type: object
      description: A single in-app notification belonging to the merchant on the store.
      properties:
        _id:
          type: string
          description: The notification id (Mongo ObjectId).
        user:
          type: string
          description: The recipient merchant's user id.
        shop:
          type: string
          description: The store id (bound server-side).
        title:
          type: string
          description: Short heading.
        message:
          type: string
          description: Body text.
        type:
          type: string
          description: Category (e.g. "info", "order", "urgent").
        url:
          type: string
          description: Optional deep-link URL.
        read:
          type: boolean
          description: Whether the notification has been read.
        readAt:
          type: string
          format: date-time
          description: When the notification was marked read, if applicable.
        data:
          type: object
          additionalProperties: true
          description: Arbitrary key/value metadata attached to the notification.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````