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

# Validate a payout

> When validating a payout you can ask your partner to:
- Validate all rewards
- Attach an invoice
You can ask your partner to do both actions or none of them.
            
**Examples:**
To validate a payout and ask your partner to attach an invoice:
`{
    "shouldAttachInvoice": true,
}`
            
To validate a payout and ask your partner to attach an invoice and validate all rewards:
`{
    "shouldAttachInvoice": true,
    "shouldValidateRewards ": true,
}`.



## OpenAPI

````yaml /openapi.json post /v3/payouts/{id}/validate
openapi: 3.0.1
info:
  title: Kiflo Public API v3
  description: "The Kiflo API allows you to have control over your integration and create the best experiences.\r\n\r\n***\r\n\r\n## Format\r\n\r\nThe API follows the REST standard using JSON to format requests and responses.  \r\nDecimals are formatted using invariant culture, ie: using \".\" (dot) as a decimal sperator and no thousands separator.  \r\nDates are formatted using ISO standards, in UTC format, including the timezone. Ex:  2015-03-25T12:00:00Z\r\n\r\n***\r\n\r\n## Security\r\n\r\nThe API is secured using an API token.\r\n\r\n**How to generate an API Access Token**  \r\n 1. Open your [account settings page](https://app.kiflo.com/account/integration)\r\n 2. Go to the \"API Access Token\" section\r\n 3. Click \"Add\" button\r\n 4. Choose a name that will be used to identify the token and click \"Add\"\r\n 4. Copy the generate token\r\n   \r\n> **Note:** For security reason, the generated API Access Token won't be visible after you close the settings page. Be sure to copy the generated token otherwise you won't be able to get it later.\r\n  \r\n**How to authenticate on the API**  \r\n  \r\nTo authenticate on the API, send the generated token in the Authorization header using the Bearer scheme:  \r\n`Authorization: Bearer #YOUR_GENERATED_TOKEN_HERE#`\r\n"
  version: v3
servers: []
security: []
paths:
  /v3/payouts/{id}/validate:
    post:
      tags:
        - Payouts
      summary: Validate a payout
      description: "When validating a payout you can ask your partner to:\r\n- Validate all rewards\r\n- Attach an invoice\r\nYou can ask your partner to do both actions or none of them.\r\n            \r\n**Examples:**\r\nTo validate a payout and ask your partner to attach an invoice:\r\n`{\r\n    \"shouldAttachInvoice\": true,\r\n}`\r\n            \r\nTo validate a payout and ask your partner to attach an invoice and validate all rewards:\r\n`{\r\n    \"shouldAttachInvoice\": true,\r\n    \"shouldValidateRewards \": true,\r\n}`."
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PayoutValidateRequestDto'
          application/json:
            schema:
              $ref: '#/components/schemas/PayoutValidateRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/PayoutValidateRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/PayoutValidateRequestDto'
      responses:
        '200':
          description: Payout validated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutDto'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                errorCode: Transactions.InvalidCustomerIdentifier
                errorMessage: You must specify one customer identifier
      security:
        - oauth2:
            - Payout.Validate
            - Api
components:
  schemas:
    PayoutValidateRequestDto:
      type: object
      properties:
        payoutId:
          type: integer
          format: int32
        shouldValidateRewards:
          type: boolean
        shouldAttachInvoice:
          type: boolean
      additionalProperties: false
    PayoutDto:
      type: object
      properties:
        id:
          type: integer
          format: int32
        partnerId:
          type: integer
          format: int32
        partnerName:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        uniqueId:
          type: string
          nullable: true
        currency:
          type: string
          nullable: true
        rewardType:
          $ref: '#/components/schemas/RewardType'
        fromDate:
          type: string
          format: date-time
          nullable: true
        toDate:
          type: string
          format: date-time
          nullable: true
        amount:
          $ref: '#/components/schemas/AmountDto'
        taxAmount:
          $ref: '#/components/schemas/AmountDto'
        grossAmount:
          $ref: '#/components/schemas/AmountDto'
        rewardCount:
          type: integer
          format: int32
        creationDate:
          type: string
          format: date-time
        paidDate:
          type: string
          format: date-time
          nullable: true
        acceptedDate:
          type: string
          format: date-time
          nullable: true
        validatedDate:
          type: string
          format: date-time
          nullable: true
        paidByUserId:
          type: integer
          format: int32
          nullable: true
        acceptedByUserId:
          type: integer
          format: int32
          nullable: true
        validatedByUserId:
          type: integer
          format: int32
          nullable: true
        invalidatedDate:
          type: string
          format: date-time
          nullable: true
        invalidatedByUserId:
          type: integer
          format: int32
          nullable: true
        status:
          $ref: '#/components/schemas/PayoutStatus'
        source:
          $ref: '#/components/schemas/PayoutSource'
        shouldValidateRewards:
          type: boolean
        shouldAttachInvoice:
          type: boolean
        isSelfInvoice:
          type: boolean
        properties:
          type: object
          additionalProperties:
            nullable: true
          nullable: true
        rewards:
          type: array
          items:
            $ref: '#/components/schemas/RewardDto'
          nullable: true
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        errorCode:
          type: string
          nullable: true
        errorMessage:
          type: string
          nullable: true
      additionalProperties: false
    RewardType:
      enum:
        - Unknown
        - Cash
        - Coupon
        - Credit
        - GiftCard
      type: string
    AmountDto:
      type: object
      properties:
        value:
          type: number
          format: double
        currency:
          type: string
          nullable: true
      additionalProperties: false
    PayoutStatus:
      enum:
        - Unknown
        - Draft
        - Pending
        - Ready
        - Paid
      type: string
    PayoutSource:
      enum:
        - Unknown
        - Manual
        - Automatic
      type: string
    RewardDto:
      type: object
      properties:
        id:
          type: integer
          format: int32
        uniqueId:
          type: string
          nullable: true
        partnerId:
          type: integer
          format: int32
        dealId:
          type: integer
          format: int32
          nullable: true
        status:
          $ref: '#/components/schemas/RewardStatus'
        creationDate:
          type: string
          format: date-time
        amount:
          $ref: '#/components/schemas/AmountDto'
        payoutId:
          type: integer
          format: int32
          nullable: true
        comment:
          type: string
          nullable: true
        rewardType:
          $ref: '#/components/schemas/RewardType'
        properties:
          type: object
          additionalProperties:
            nullable: true
          nullable: true
      additionalProperties: false
    RewardStatus:
      enum:
        - Unknown
        - Pending
        - Accepted
        - Paid
        - Declined
      type: string

````