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

# Unreject Commission

> Moves a `rejected` commission back to `pending`, so it becomes payable to the affiliate again. Use this to undo a rejection made by mistake. The previously stored `reject_reason` is no longer returned once the commission is pending. Only `rejected` commissions can be unrejected.



## OpenAPI

````yaml POST /v1/commissions/{id}/unreject
openapi: 3.1.0
info:
  title: Reditus API - Commissions
  description: API specification for managing commissions in Reditus affiliate programs.
  version: 1.0.0
servers:
  - url: https://api.getreditus.com/api
security: []
paths:
  /v1/commissions/{id}/unreject:
    post:
      summary: Unreject Commission
      description: >-
        Moves a `rejected` commission back to `pending`, so it becomes payable
        to the affiliate again. Use this to undo a rejection made by mistake.
        The previously stored `reject_reason` is no longer returned once the
        commission is pending. Only `rejected` commissions can be unrejected.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Reditus id of the commission
      responses:
        '200':
          description: Commission was moved back to pending
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommissionResponse'
        '404':
          description: Not Found - Commission not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseNotFound'
        '422':
          description: >-
            Unprocessable - Commission cannot be unrejected from its current
            state (it is pending or has been paid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseUnprocessable'
      security:
        - BearerAuth: []
components:
  schemas:
    CommissionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Commission'
    ErrorResponseNotFound:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Not Found
              details:
                type: string
                example: Commission not found
    ErrorResponseUnprocessable:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Unprocessable entity
              details:
                type: string
                example: Commission in state 'paid' cannot be rejected
    Commission:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
          properties:
            state:
              type: string
              description: 'Commission state: pending, rejected or paid'
            amount:
              type: integer
              description: Commission amount, in cents
            currency:
              type: string
              description: Three-letter ISO currency code of the amount
            partner_id:
              type: string
              description: ID of the partner the commission belongs to
            referral_id:
              type: string
              description: ID of the referral the commission originates from, if any
            reject_reason:
              type: string
              description: >-
                Reason the commission was rejected. Only present when state is
                rejected
            state_set_at:
              type: integer
            paid_at:
              type: integer
              description: Timestamp the commission was paid at, if paid
            created_at:
              type: integer
            updated_at:
              type: integer
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.