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

# Send Points API

> Credit reward points to one or more recipients from the Super Admin wallet.

**Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`


| \*\*Property \*\*                                 | \*\* Type \*\* | \*\* Description\*\*                                    |
| :------------------------------------------------ | :------------- | :------------------------------------------------------ |
| `variables.recipients_data.sender_email`          | `String`       | **Super Admin email** sending the points.               |
| `variables.recipients_data.expiry_month`          | `Int/String`   | Expiry of points in month.                              |
| `variables.recipients_data.recipients`            | `[Recipient]`  | List of recipient objects to whom balance will be sent. |
| `variables.recipients_data.recipients[].to_name`  | `String`       | Recipient’s full name.                                  |
| `variables.recipients_data.recipients[].to_email` | `String`       | Recipient’s email address.                              |
| `variables.recipients_data.recipients[].amount`   | `String`       | Amount of balance/credits to be sent.                   |
| `variables.recipients_data.recipients[].citation` | `String`       | Purpose or reference note for the transaction.          |

## Response Schema

| Property            | Type   | Description                                           |
| ------------------- | ------ | ----------------------------------------------------- |
| `data.unique_id`    | number | Unique identifier of the transaction.                 |
| `data.email`        | string | Email address of the recipient (optional).            |
| `data.points`       | number | Number of points to be credited or transferred.       |
| `data.name`         | string | Full name of the recipient user.                      |
| `data.phone_code`   | string | Country calling code of the recipient’s phone number. |
| `data.phone_number` | string | Mobile number of the recipient user.                  |


## OpenAPI

````yaml specs/reward-points-api.yaml POST /sendPoints
openapi: 3.0.3
info:
  title: Xoxoday Reward Points API
  version: '1.2'
  description: >
    APIs for sending, fetching, and cancelling reward points in the Xoxoday
    ecosystem.


    **Auth endpoints** use operation-level server overrides against

    `https://stagingstores.xoxoday.com/chef/v1/oauth`.


    **Points operations** (`/fetchPoints`, `/sendPoints`, `/cancelPoints`) are
    virtual

    path suffixes — all three really dispatch to `POST /v1/oauth/api` via the
    body

    `query` field. OpenAPI does not allow two POST operations on the same path,
    so

    virtual suffixes are used for playground differentiation.


    **Cancel Points** uses `accounts.xoxoday.com` as its real host
    (operation-level

    server override applied).
servers:
  - url: https://stagingstores.xoxoday.com/chef/v1/oauth/api
    description: Sandbox
  - url: https://accounts.xoxoday.com/chef/v1/oauth/api
    description: Production
  - url: https://canvas.xoxoday.com/chef/v1/oauth/api
    description: Testing
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: Token management — validate, refresh, and create user tokens.
  - name: Points
    description: Send, fetch, and cancel reward points.
paths:
  /sendPoints:
    post:
      tags:
        - Points
      summary: Send Points API
      description: >
        Credit reward points to one or more recipients from the Super Admin
        wallet.


        **Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`
      operationId: sendPoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - storesAdmin.mutation.sendBalance
                  default: storesAdmin.mutation.sendBalance
                  description: Always use `storesAdmin.mutation.sendBalance`.
                tag:
                  type: string
                  enum:
                    - storeAdmin
                  default: storeAdmin
                  description: Always use `storeAdmin`.
                variables:
                  type: object
                  required:
                    - sender_email
                    - recipients
                  properties:
                    sender_email:
                      type: string
                      format: email
                      description: Super Admin email address sending the points.
                      example: superadmin@yourcompany.com
                    expiry_month:
                      type: integer
                      description: Points expiry in months from the date of sending.
                      example: 12
                    recipients:
                      type: array
                      description: List of recipients to send points to.
                      items:
                        type: object
                        required:
                          - to_email
                          - amount
                        properties:
                          to_name:
                            type: string
                            description: Recipient's full name.
                            example: John Smith
                          to_email:
                            type: string
                            format: email
                            description: Recipient's email address.
                            example: john@company.com
                          amount:
                            type: string
                            description: Amount of points to send.
                            example: '100'
                          citation:
                            type: string
                            description: Purpose or reference note for the transaction.
                            example: Awesome work
            example:
              query: storesAdmin.mutation.sendBalance
              tag: storeAdmin
              variables:
                sender_email: superadmin@yourcompany.com
                expiry_month: 12
                recipients:
                  - to_name: John Smith
                    to_email: john@company.com
                    amount: '100'
                    citation: Awesome work
      responses:
        '200':
          description: Points sent successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      unique_id:
                        type: integer
                        description: Unique identifier of the transaction.
                      email:
                        type: string
                        description: Email address of the recipient.
                      points:
                        type: number
                        description: Number of points credited.
                      name:
                        type: string
                        description: Full name of the recipient.
                      phone_code:
                        type: string
                        description: Country calling code of the recipient's phone number.
                      phone_number:
                        type: string
                        description: Mobile number of the recipient.
              example:
                data:
                  unique_id: 987654321
                  email: john@company.com
                  points: 100
                  name: John Smith
                  phone_code: '+1'
                  phone_number: '9998887776'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/BadGateway'
components:
  responses:
    BadRequest:
      description: Invalid request body or parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              message:
                type: string
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Unauthorized
    BadGateway:
      description: Upstream service error.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <access_token>`'

````