# Noticiation Settings

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/products/notifications/settings/:
    get:
      summary: Noticiation Settings
      deprecated: false
      description: |-
        Retrieve current settings for availability notifications.

        <Accordion title="🔑Scopes" defaultOpen>
            
          `products.read` - Products Read
         
        </Accordion>
      operationId: get-products-notifications-settings
      tags:
        - >-
          Default module/Apps/Merchant APIs/Products/Product Availability
          Notifications
        - Product Notifications
      parameters:
        - name: Access-Token
          in: header
          description: >-
            An Access Token is a unique string that represents the authorization
            granted to a client (Partner application) by a user (Merchant or
            Store Manager) to access their protected resources. It is part of
            the OAuth 2.0 standard and is used to authenticate API requests on
            behalf of the user. Access Tokens have a limited lifespan and must
            be used within their validity period. Once expired, a new Access
            Token can be obtained using a Refresh Token. Access Tokens should be
            treated as sensitive information and must be kept secure to prevent
            unauthorized access to the user's data. If you do not have an
            `Access-Token`, but have the older alternative instead, i.e., the
            `X-Manager-Token`, then see the instructions
            [here](docs/Migrate-to-OAUTH-2.0.md) on how to obtain the
            `Access-Token`.
          required: true
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Store-Id
          in: header
          description: ''
          required: true
          example: '{{StoreId}}'
          schema:
            type: number
            examples:
              - 37213
        - name: Accept-Language
          in: header
          description: ''
          required: false
          example: en
          schema:
            type: string
            enum:
              - ar
              - en
            x-apidog-enum:
              - value: ar
                name: ''
                description: ''
              - value: en
                name: ''
                description: ''
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  x-stoplight:
                    id: ntiw7wouwh7w0
                  description: Email address of the customer.
                  examples:
                    - test@test.com
                language:
                  type: string
                  x-stoplight:
                    id: bx3gkvm3uw5wz
                  description: Language preference of the customer.
                  examples:
                    - ar
              x-apidog-orders:
                - email
                - language
              x-apidog-ignore-properties: []
            example:
              email: test@test.com
              language: ar
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                title: Retrieve Availability Notification Settings Response
                type: object
                description: >-
                  Response containing availability notification configuration
                  used to notify customers when a product is back in stock.
                required:
                  - settings
                properties:
                  settings:
                    type: object
                    description: Availability notification settings configuration.
                    required:
                      - delay_unit
                      - delay_value
                      - email_text
                      - email_title
                      - coupon_code
                    properties:
                      delay_unit:
                        type: string
                        description: Unit used to calculate the notification delay.
                        enum:
                          - minute
                          - hour
                          - day
                        examples:
                          - minute
                      delay_value:
                        type: integer
                        description: >-
                          Delay value before sending the notification,
                          represented as a numeric string.
                      email_text:
                        type: object
                        description: >-
                          Email body template sent to customers when the product
                          becomes available.
                        required:
                          - ar
                          - en
                        properties:
                          ar:
                            type: string
                            description: >-
                              Arabic email body template. Supports placeholders
                              like {customer_name}, {product_name},
                              {product_url}.
                            examples:
                              - >-
                                عزيزنا {customer_name}، تم توفر {product_name}
                                في المتجر، بإمكانك طلبه الآن 

                                {product_url}
                          en:
                            type: string
                            description: >-
                              English email body template. Supports placeholders
                              like {customer_name}, {product_name},
                              {product_url}.
                            examples:
                              - >-
                                Dear {customer_name}, {product_name} is now back
                                in stock. You can order it now.

                                {product_url}
                        x-apidog-orders:
                          - ar
                          - en
                        x-apidog-ignore-properties: []
                      email_title:
                        type: object
                        description: >-
                          Email subject/title template for availability
                          notifications.
                        required:
                          - ar
                          - en
                        properties:
                          ar:
                            type: string
                            description: >-
                              Arabic email subject template. Supports
                              placeholders like {product_name} and {store_name}.
                            examples:
                              - '{product_name} متوفر الآن في {store_name}!'
                          en:
                            type: string
                            description: >-
                              English email subject template. Supports
                              placeholders like {product_name} and {store_name}.
                            examples:
                              - '{product_name} is now available on {store_name}!'
                        x-apidog-orders:
                          - ar
                          - en
                        x-apidog-ignore-properties: []
                      coupon_code:
                        type: string
                        description: >-
                          Optional coupon code sent with the availability
                          notification email. Null if no coupon is applied.
                        examples:
                          - null
                        nullable: true
                    x-apidog-orders:
                      - delay_unit
                      - delay_value
                      - email_text
                      - email_title
                      - coupon_code
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - settings
                x-apidog-ignore-properties: []
              example:
                settings:
                  delay_unit: hour
                  delay_value: 15
                  email_text:
                    ar: سيتم إرسال إشعار عند توفر المنتج
                    en: You will be notified when the product is available
                  email_title:
                    ar: المنتج متوفر الآن
                    en: Product is now available
                  coupon_code: null
          headers: {}
          x-apidog-name: OK
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Response returned when the request cannot be authenticated
                  because the required credentials are missing, invalid, or
                  expired.
                properties:
                  status:
                    type: string
                    description: Indicates the overall status of the API response.
                    examples:
                      - error
                  message:
                    type: object
                    description: >-
                      Contains structured details explaining why the request
                      could not be authenticated.
                    properties:
                      type:
                        type: string
                        description: Indicates the category of the response message.
                        examples:
                          - error
                      code:
                        type: string
                        description: >-
                          A machine-readable code identifying the authentication
                          error. Returns null when no specific code is
                          available.
                        examples:
                          - UNAUTHORIZED
                        nullable: true
                      name:
                        type: string
                        description: >-
                          A short, human-readable title describing the
                          authentication error. Returns null when no title is
                          available.
                        examples:
                          - Unauthorized
                        nullable: true
                      description:
                        type: string
                        description: >-
                          A human-readable explanation of why the request could
                          not be authenticated. Returns null when no detailed
                          explanation is available.
                        examples:
                          - >-
                            Authentication credentials are missing, invalid, or
                            expired.
                        nullable: true
                    required:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-orders:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                examples:
                  - status: error
                    message:
                      type: error
                      code: UNAUTHORIZED
                      name: Unauthorized
                      description: >-
                        Authentication credentials are missing, invalid, or
                        expired.
                x-apidog-ignore-properties: []
              examples:
                '2':
                  summary: Example 1
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_MISSING
                      name: Sorry
                      description: Please login first.
                '3':
                  summary: Example 2
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Login session expired. Please login again.
                '4':
                  summary: Example 3
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Invalid authentication
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the error.
                  message:
                    $ref: '#/components/schemas/ResponseEnvelopMessage'
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                x-apidog-ignore-properties: []
              example:
                status: error
                message:
                  type: error
                  code: MSG_HIDDEN
                  name: Error
                  description: Internal Server Error
          headers: {}
          x-apidog-name: Internal Server error
      security: []
      x-apidog-folder: >-
        Default module/Apps/Merchant APIs/Products/Product Availability
        Notifications
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-9148668-run
components:
  schemas:
    ResponseEnvelopMessage:
      type: object
      properties:
        type:
          type: string
          description: Type of response message returned by the API.
          examples:
            - success
        code:
          type: string
          description: Response code returned by the API, if available.
          examples:
            - MSG_POPUP_OK
          nullable: true
        name:
          type: string
          description: Name or title of the response message, if available.
          examples:
            - Coupons
          nullable: true
        description:
          type: string
          description: Detailed description of the response message, if available.
          examples:
            - Coupons created successfully
          nullable: true
      required:
        - type
        - code
        - name
        - description
      description: Additional response metadata.
      x-apidog-orders:
        - type
        - code
        - name
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.zid.sa/
    description: Prod Env
security: []

```
