> ## 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.

# Cancel Points API

> Cancel previously issued points for one or more recipients using their unique transaction ID.

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


| Property                                 | Type   | Description                                                              |
| ---------------------------------------- | ------ | ------------------------------------------------------------------------ |
| `recipients_data.recipients`             | array  | List of recipients for whom points cancellation is requested.            |
| `recipients_data.recipients[].unique_id` | number | Unique transaction ID of the points issuance that needs to be cancelled. |

## Response Schema

| Property                                    | Type    | Description                                                                  |
| ------------------------------------------- | ------- | ---------------------------------------------------------------------------- |
| `data.cancelBalance.error`                  | boolean | Indicates whether the cancellation operation failed (`false` = success).     |
| `data.cancelBalance.message`                | string  | Summary message describing the overall cancellation result.                  |
| `data.cancelBalance.recipients`             | array   | List of point transactions processed in the cancellation request.            |
| `data.cancelBalance.recipients[].unique_id` | number  | **Unique transaction ID** of the points issuance.                            |
| `data.cancelBalance.recipients[].success`   | boolean | Indicates whether the transaction cancellation was successful.               |
| `data.cancelBalance.recipients[].message`   | string  | Transaction-level status message explaining the outcome of the cancellation. |


## OpenAPI

````yaml specs/reward-points-api.yaml POST /cancelPoints
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:
  /cancelPoints:
    post:
      tags:
        - Points
      summary: Cancel Points API
      description: >
        Cancel previously issued points for one or more recipients using their
        unique transaction ID.


        **Real URL:** `POST https://accounts.xoxoday.com/chef/v1/oauth/api`
      operationId: cancelPoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - variables
              properties:
                query:
                  type: string
                  enum:
                    - storesAdmin.mutation.cancelBalance
                  default: storesAdmin.mutation.cancelBalance
                  description: Always use `storesAdmin.mutation.cancelBalance`.
                tag:
                  type: string
                  enum:
                    - storeAdmin
                  default: storeAdmin
                  description: Always use `storeAdmin`.
                variables:
                  type: object
                  properties:
                    recipients_data:
                      type: object
                      properties:
                        recipients:
                          type: array
                          description: List of transactions to cancel.
                          items:
                            type: object
                            required:
                              - unique_id
                            properties:
                              unique_id:
                                type: integer
                                description: >-
                                  Unique transaction ID of the points issuance
                                  to cancel.
                                example: 987654321
            example:
              query: storesAdmin.mutation.cancelBalance
              tag: storeAdmin
              variables:
                recipients_data:
                  recipients:
                    - unique_id: 987654321
      responses:
        '200':
          description: Cancellation result returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      cancelBalance:
                        type: object
                        properties:
                          error:
                            type: boolean
                            description: '`false` = success.'
                          message:
                            type: string
                            description: >-
                              Summary message describing the overall
                              cancellation result.
                          recipients:
                            type: array
                            items:
                              type: object
                              properties:
                                unique_id:
                                  type: integer
                                  description: Unique transaction ID.
                                success:
                                  type: boolean
                                  description: >-
                                    Whether this transaction was successfully
                                    cancelled.
                                message:
                                  type: string
                                  description: Transaction-level status message.
              example:
                data:
                  cancelBalance:
                    error: false
                    message: Cancellation processed successfully
                    recipients:
                      - unique_id: 987654321
                        success: true
                        message: Points cancelled successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/BadGateway'
      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
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>`'

````