# Create Points Redemption Method

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/managers/loyalty-program/points-redemption:
    post:
      summary: Create Points Redemption Method
      deprecated: false
      description: >-
        Creates a new redemption method (e.g., gift certificate) for a store's
        loyalty program.


        <Accordion title="🔑Scopes" defaultOpen>
            
         `loyalty_program.read_write` - Loyalty Program Read & Write
         
        </Accordion>
      operationId: post-managers-loyalty-program-points-redemption
      tags:
        - Default module/Apps/Merchant APIs/Marketing/Loyalty Program
        - Loyalty Program
      parameters:
        - name: Authorization
          in: header
          description: >-
            The Authorization token is a unique key given to the third-party
            application (Partner) by Zid. It is used to authenticate the API
            requests made by the Partner application. The token verifies the
            partner's identity and ensures they have permission to access Zid's
            API but does not provide any specific user or store information. It
            should be included in the header of API requests when the partner
            application needs to access Zid's API.
          required: true
          example: '{{Autherization}}'
          schema:
            type: string
        - name: X-Manager-Token
          in: header
          description: >-
            This token is used to authenticate and access information related to
            the store. It is obtained through an OAuth mechanism and is required
            to perform operations on the store's data. The `X-Manager-Token`
            should be included in the header of API requests that require
            store-related information.
          required: false
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            Specifies the Media Types acceptable for the client. In this case,
            it signals that the client expects a response in the JSON format.
          required: true
          example: application/json
          schema:
            type: string
            default: application/json
        - name: Accept-Language
          in: header
          description: >-
            Preferred language for the response. Defaults to `en` if not
            specified.
          required: false
          example: en
          schema:
            type: string
            enum:
              - en
              - ar
            examples:
              - en
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                config[type]:
                  type: string
                  enum:
                    - percentage_discount_settings
                    - fixed_rate_settings
                  x-apidog-enum:
                    - value: percentage_discount_settings
                      name: ''
                      description: ''
                    - value: fixed_rate_settings
                      name: ''
                      description: ''
                  example: fixed_rate_settings
                config[discount]:
                  type: integer
                  example: 1
                config[points]:
                  type: integer
                  example: 1
              required:
                - config[type]
                - config[discount]
                - config[points]
            examples: {}
      responses:
        '200':
          description: The redemption method is created successfully.
          content:
            application/json:
              schema:
                type: object
                x-examples:
                  Example 1:
                    status: object
                    points_redemption:
                      status: true
                      message: Point redemption method added successfully
                      redemptionRule:
                        store_id: 266fd313-f39a-4f43-82c5-6069651e32cc
                        external_id: '1120'
                        name: '100'
                        points_to_redeem: 100
                        rule_type: fixed_rate_settings
                        reward:
                          discount_value: 10
                        is_active: true
                        id: bf1aeb4a-d85e-443d-80dc-f0ac43757605
                        updated_at: '2024-07-31T11:10:50.000000Z'
                        created_at: '2024-07-31T11:10:50.000000Z'
                    message:
                      type: object
                      code: MSG_POPUP_OK
                      name: Points redemption
                      description: Point redemption method added successfully
                properties:
                  status:
                    type: string
                    description: Indicates the overall status of the API response.
                  points_redemption:
                    type: object
                    description: >-
                      Contains details about the points redemption method that
                      was added.
                    properties:
                      status:
                        type: boolean
                        description: >-
                          Indicates whether the point redemption method was
                          added successfully. In this case, it is true.
                        default: true
                      message:
                        type: string
                        description: >-
                          A descriptive message confirming the successful
                          addition of the points redemption method.
                        examples:
                          - Point redemption method added successfully
                      redemptionRule:
                        $ref: '#/components/schemas/LoyaltyRedemptionRule'
                    x-apidog-orders:
                      - status
                      - message
                      - redemptionRule
                    x-apidog-ignore-properties: []
                  message:
                    type: object
                    description: >-
                      Contains additional information or messages related to the
                      API response.
                    properties:
                      type:
                        type: string
                        description: Specifies the type of message.
                      code:
                        type: string
                        description: A code representing the specific message.
                        examples:
                          - MSG_POPUP_OK
                      name:
                        type: string
                        description: A short, human-readable title or name for the message.
                        examples:
                          - '"Points redemption"'
                      description:
                        type: string
                        description: A detailed description of the message.
                        examples:
                          - '"Point redemption method added successfully"'
                    x-apidog-orders:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - status
                  - points_redemption
                  - message
                x-apidog-ignore-properties: []
              example:
                status: object
                points_redemption:
                  status: true
                  message: Point redemption method added successfully
                  redemptionRule:
                    store_id: d297fb8b-c322-412e-a2f4-ffa96dc57022
                    external_id: '202603021311282861'
                    name: '1'
                    points_to_redeem: 1
                    rule_type: fixed_rate_settings
                    reward:
                      discount_value: 1
                    is_active: true
                    id: 4890974d-d474-4d08-99a4-a42b856ea71a
                    updated_at: '2026-03-02T13:11:28.000000Z'
                    created_at: '2026-03-02T13:11:28.000000Z'
                message:
                  type: object
                  code: MSG_POPUP_OK
                  name: Points redemption
                  description: Point redemption method added successfully
          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_0
                    $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
        x-200:OK:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  points_redemption:
                    type: object
                    properties:
                      status:
                        type: boolean
                      message:
                        type: string
                      redemptionRule:
                        type: object
                        properties:
                          store_id:
                            type: string
                          external_id:
                            type: string
                          name:
                            type: string
                          points_to_redeem:
                            type: integer
                          rule_type:
                            type: string
                          reward:
                            type: object
                            properties:
                              discount_value:
                                type: integer
                            required:
                              - discount_value
                            x-apidog-orders:
                              - discount_value
                            x-apidog-ignore-properties: []
                          is_active:
                            type: boolean
                          id:
                            type: string
                          updated_at:
                            type: string
                          created_at:
                            type: string
                        required:
                          - store_id
                          - external_id
                          - name
                          - points_to_redeem
                          - rule_type
                          - reward
                          - is_active
                          - id
                          - updated_at
                          - created_at
                        x-apidog-orders:
                          - store_id
                          - external_id
                          - name
                          - points_to_redeem
                          - rule_type
                          - reward
                          - is_active
                          - id
                          - updated_at
                          - created_at
                        x-apidog-ignore-properties: []
                    required:
                      - status
                      - message
                      - redemptionRule
                    x-apidog-orders:
                      - status
                      - message
                      - redemptionRule
                    x-apidog-ignore-properties: []
                  message: *ref_0
                required:
                  - status
                  - points_redemption
                  - message
                x-apidog-orders:
                  - status
                  - points_redemption
                  - message
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: Default module/Apps/Merchant APIs/Marketing/Loyalty Program
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-9148632-run
components:
  schemas:
    LoyaltyRedemptionRule:
      type: object
      description: >-
        Contains detailed information about the newly added point redemption
        rule.
      properties:
        store_id:
          type: string
          description: >-
            The unique identifier of the store associated with this redemption
            rule.
          examples:
            - 266fd313-f39a-4f43-82c5-6069651e32cc
        external_id:
          type: string
          description: An external identifier associated with the point redemption rule.
          examples:
            - '1120'
        name:
          type: string
          description: The name or label of the redemption rule.
          examples:
            - '100'
        points_to_redeem:
          type: integer
          description: The number of points required to redeem this reward.
          examples:
            - 100
        rule_type:
          type: string
          description: >-
            The type of rule applied to the redemption method, such as
            "fixed_rate_settings".
          examples:
            - fixed_rate_settings
        reward:
          type: object
          description: Details about the reward associated with the redemption method.
          properties:
            discount_value:
              type: integer
              description: The value of the discount provided as a reward.
              examples:
                - 10
          x-apidog-orders:
            - discount_value
          x-apidog-ignore-properties: []
        is_active:
          type: boolean
          description: ' Indicates whether the redemption method is currently active.'
          default: true
        id:
          type: string
          description: A unique identifier for the point redemption rule.
          examples:
            - bf1aeb4a-d85e-443d-80dc-f0ac43757605
        updated_at:
          type: string
          description: >-
            The date and time when the redemption rule was last updated, in ISO
            8601 format.
          examples:
            - '2024-07-31T11:10:50.000000Z'
        created_at:
          type: string
          description: >-
            The date and time when the redemption rule was created, in ISO 8601
            format.
          examples:
            - '2024-07-31T11:10:50.000000Z'
      x-apidog-orders:
        - store_id
        - external_id
        - name
        - points_to_redeem
        - rule_type
        - reward
        - is_active
        - id
        - updated_at
        - created_at
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    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: []

```
