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

# Update cashback information. For internal usage only



## OpenAPI

````yaml https://backend.swap.coffee/openapi patch /v1/cashback/{id}
openapi: 3.0.3
info:
  title: Swap Coffee API
  version: 1.0.0
servers:
  - url: https://backend.swap.coffee/
  - url: http://localhost:8080/
security:
  - {}
  - ApiKey: []
tags:
  - name: Entity
    description: Tokens, pools, DEXes, etc.
  - name: Routing
    description: >-
      Core functionality of the aggregation service. Build routes, get
      transactions, etc.
  - name: Strategies
    description: Limit orders, DCA, VCA, etc.
  - name: Yield
    description: >-
      Yield aggregator functionality. Provides and handles routes to pools with
      the best yield.
  - name: Referral
    description: Everything related to the referral program of swap.coffee.
  - name: Cashback
    description: Cashback programs conducted on swap.coffee.
  - name: Claim
    description: Claiming various rewards available on swap.coffee.
  - name: Contests
    description: Timed contests based on trading volumes for certain token-pairs.
  - name: Staking
    description: Responsible of managing staked funds, corresponding rewards, etc.
  - name: DEX
    description: Core functionality of the Coffee DEX service.
  - name: LiquidityProvisioning
    description: Everything related to liquidity provisioning in DEXes.
  - name: Boosts
    description: >-
      Functionality to support incentives and rewards for liquidity providers
      among all DEXes.
  - name: Profile
    description: Retrieve information about user profiles.
  - name: Partnership
    description: Various functionality for our partners.
  - name: Statistics
    description: Retrieve information about dex aggregation stats.
  - name: Ton
    description: Retrieve information about TON entities.
  - name: Auth
    description: Auth operations. For internal usage only.
paths:
  /v1/cashback/{id}:
    patch:
      tags:
        - Cashback
      summary: Update cashback information. For internal usage only
      operationId: updateCashback
      parameters:
        - $ref: '#/components/parameters/pathLongId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiCashbackUpdateRequest'
      responses:
        '200':
          description: Created cashback
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCashbackInfo'
        default:
          $ref: '#/components/responses/ApiError'
components:
  parameters:
    pathLongId:
      in: path
      name: id
      required: true
      schema:
        type: integer
        format: int64
  schemas:
    ApiCashbackUpdateRequest:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        distributor:
          type: string
          description: Where rewards stored
          example: EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ
        reward_token:
          type: string
          example: EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/ApiDexSwapCondition'
        distribute:
          type: number
          description: How many tokens will be distributed to users
        distributed:
          type: number
          description: How many tokens already distributed to users
        start_time_seconds:
          type: integer
          format: int64
          description: Begin cashback promo in unix seconds
        end_time_seconds:
          type: integer
          format: int64
          description: End cashback promo in unix seconds
        reward_denominator:
          type: number
        is_hidden:
          type: boolean
        limits:
          type: array
          items:
            $ref: '#/components/schemas/ApiCashbackLimitUpdateRequest'
        image_url:
          type: string
        references:
          type: array
          items:
            $ref: '#/components/schemas/ApiContentReference'
    ApiCashbackInfo:
      type: object
      required:
        - id
        - title
        - description
        - distributor
        - reward_token
        - conditions
        - distribute
        - distributed
        - start_time_seconds
        - end_time_seconds
        - reward_denominator
        - is_hidden
        - is_active
        - limits
        - image_url
        - references
      properties:
        id:
          type: integer
          format: int64
        title:
          type: string
        description:
          type: string
        distributor:
          type: string
          description: Where rewards stored
          example: EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ
        reward_token:
          type: string
          example: EQCZ_pV6EJNSr6XpvPaa-IVkT6ImqkiPftRMOICJP1B_75wZ
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/ApiDexSwapCondition'
        distribute:
          type: number
          description: How many tokens will be distributed to users
        distributed:
          type: number
          description: How many tokens already distributed to users
        start_time_seconds:
          type: integer
          format: int64
          description: Begin cashback promo in unix seconds
        end_time_seconds:
          type: integer
          format: int64
          description: End cashback promo in unix seconds
        reward_denominator:
          type: number
        is_active:
          type: boolean
          description: Can this cashback program accrue tokens to participants
        limits:
          type: array
          items:
            $ref: '#/components/schemas/ApiCashbackLimit'
        image_url:
          type: string
        references:
          type: array
          items:
            $ref: '#/components/schemas/ApiContentReference'
        is_hidden:
          type: boolean
    ApiDexSwapCondition:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/ApiDexSwapConditionType'
        args:
          description: Arguments required to construct condition type
          type: array
          items:
            type: string
    ApiCashbackLimitUpdateRequest:
      type: object
      properties:
        limit_id:
          type: integer
          format: int64
        interval_duration_seconds:
          type: integer
          format: int64
        max_distribute_at_interval:
          type: number
    ApiContentReference:
      type: object
      required:
        - ref_name
        - ref_url
      properties:
        ref_name:
          type: string
        ref_url:
          type: string
    ApiCashbackLimit:
      type: object
      required:
        - limit_id
        - interval_duration_seconds
        - max_distribute_at_interval
      properties:
        limit_id:
          type: integer
          format: int64
        interval_duration_seconds:
          type: integer
          format: int64
        max_distribute_at_interval:
          type: number
    ApiDexSwapConditionType:
      type: string
      enum:
        - unique
        - listed
        - partner_address
        - tokens
        - tokens-pair
        - tokens-exact
        - users-whitelist
        - swap-tx-min-amount
        - blacklist-pair
        - blacklist-tokens
        - dexes
  responses:
    ApiError:
      description: Some error during request processing
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````