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

# Put v1businesses promo codes



## OpenAPI

````yaml /api-reference/openapi.json put /v1/businesses/{businessId}/promo-codes/{id}
openapi: 3.0.4
info:
  title: Smartbills.API
  version: v1
servers:
  - url: https://api.smartbills.io
    description: Production
security: []
paths:
  /v1/businesses/{businessId}/promo-codes/{id}:
    put:
      tags:
        - BusinessPromoCodes
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: businessId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessPromoCodesPromoCodeUpdateRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/BusinessPromoCodesPromoCodeUpdateRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/BusinessPromoCodesPromoCodeUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/BusinessPromoCodesSBPromoCodeResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessPromoCodesSBPromoCodeResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/BusinessPromoCodesSBPromoCodeResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/MicrosoftAspNetCoreMvcProblemDetails'
components:
  schemas:
    BusinessPromoCodesPromoCodeUpdateRequest:
      type: object
      properties:
        isActive:
          type: boolean
      additionalProperties: false
    BusinessPromoCodesSBPromoCodeResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/ModelsPromoCodesSBPromoCodeType'
        amount:
          $ref: '#/components/schemas/DTOMoney'
        percentage:
          type: number
          format: double
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    MicrosoftAspNetCoreMvcProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    ModelsPromoCodesSBPromoCodeType:
      enum:
        - PERCENTAGE
        - AMOUNT
      type: string
    DTOMoney:
      type: object
      properties:
        amount:
          type: number
          format: double
        currency:
          type: string
          nullable: true
        conversion:
          $ref: '#/components/schemas/DTOMoneyConversion'
      additionalProperties: false
    DTOMoneyConversion:
      type: object
      properties:
        originalAmount:
          type: number
          format: double
        originalCurrency:
          type: string
          nullable: true
        exchangeRate:
          type: number
          format: double
        convertedAt:
          type: string
          format: date-time
      additionalProperties: false

````