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

# Update cards



## OpenAPI

````yaml /openapi/billing.json put /v1/billing/cards/{id}/
openapi: 3.0.3
info:
  title: Yume API — Биллинг
  version: 1.0.0
  description: Подписки, счета и тарификация.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/billing/cards/{id}/:
    put:
      tags:
        - cards
      summary: Update cards
      operationId: cards_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCard'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TenantCard'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TenantCard'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantCard'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    TenantCard:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        tenant:
          type: integer
          readOnly: true
        active:
          type: boolean
        status:
          allOf:
            - $ref: '#/components/schemas/TenantCardStatusEnum'
          readOnly: true
        card_hash:
          type: string
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        bank_alias:
          type: string
          readOnly: true
          nullable: true
        brand_alias:
          type: string
          readOnly: true
          nullable: true
        expiry_year:
          type: string
          readOnly: true
          nullable: true
        expiry_month:
          type: string
          readOnly: true
          nullable: true
        recurring:
          type: boolean
      required:
        - bank_alias
        - brand_alias
        - card_hash
        - created_at
        - expiry_month
        - expiry_year
        - id
        - status
        - tenant
    TenantCardStatusEnum:
      enum:
        - ok
        - approved
        - deleted
      type: string
      description: |-
        * `ok` - Активна
        * `approved` - Подтверждена
        * `deleted` - Удалено
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````