openapi: 3.0.0
info:
  title: Notifications
  version: "2023"
  description: Notifications Service
tags:
  - name: Notifications
paths:
  /notifications/{notificationId}:
    get:
      tags:
        - Notifications
      operationId: getNotification
      summary: Get a notifications
      description: Gets a notification.
      parameters:
        - $ref: "#/components/parameters/Models.StorefrontAuthHeaders"
        - name: notificationId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The response model when a notification is successfully returned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Models.Notification"
        "404":
          description: The server cannot find the requested resource.
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Models.InternalServerErrorProblem"
security:
  - BearerAuth: []
components:
  parameters:
    Models.StorefrontAuthHeaders:
      name: x-api-key
      in: header
      required: true
      schema:
        type: string
  schemas:
    Models.InternalServerErrorProblem:
      type: object
      properties:
        type:
          type: string
          description: A URI reference [RFC3986] that identifies the problem type.
        title:
          type: string
          description: A short, human-readable summary of the problem type.
        status:
          type: number
          enum:
            - 500
          description: The HTTP status code([RFC7231], Section 6) generated by the origin
            server for this occurrence of the problem.
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem.
      allOf:
        - type: object
          description: ""
      description: The response model when an internal server error occurs
    Models.Notification:
      type: object
      required:
        - status
      properties:
        status:
          allOf:
            - $ref: "#/components/schemas/Models.NotificationStatus"
          description: The status of the notification
        payload:
          type: object
          additionalProperties:
            type: object
          description: The payload result of the notification, if any. This is typically a
            JSON object.
    Models.NotificationStatus:
      type: string
      enum:
        - pending
        - failed
        - complete
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
servers:
  - url: https://storefront.sandbox.onebasket.io
    description: Sandbox
    variables: {}
  - url: https://storefront.live.onebasket.io
    description: Live
    variables: {}
