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

# Deactivate Tier Structure

> ⚠️ **BETA endpoint**

This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.

Transitions a tier structure to `INACTIVE` status.
Allowed from: `ACTIVE`.




## OpenAPI

````yaml /openapi/loyalties-v2.json post /v2/loyalties/tier-structures/{id}/deactivate
openapi: 3.1.0
info:
  title: Voucherify Loyalty v2 API
  version: 2.0.0
  description: >-
    Complete API documentation for Voucherify Loyalty v2 system. Requires
    LOYALTY_V2 feature flag.
servers:
  - url: https://api.voucherify.io
    description: Production
security:
  - bearerAuth: []
    X-App-Id: []
    X-App-Token: []
tags:
  - name: Card Definitions
    description: >-
      CRUD operations, lifecycle management, and activity history for card
      definitions. Card definitions describe the configuration for loyalty
      cards, including code generation, points expiration, earning/spending
      limits, pending points, refunds, and balance settings.
  - name: Programs
    description: >-
      Loyalty program CRUD, lifecycle management, program-scoped resource
      assignments (card definitions, earning rules, rewards, tier structures),
      member management (create, list, get, activate, deactivate, delete), card
      operations (points adjustment, pending points, expiring points,
      transactions), reward purchases, and activity history.
  - name: Earning Rules
    description: >-
      Manage earning rules that define how customers earn points or receive
      incentives based on triggers (events, segments, custom events). Includes
      CRUD, lifecycle, and activity history.
  - name: Tier Structures
    description: >-
      CRUD operations, lifecycle management, and activity history for tier
      structures. Includes nested tier definitions (create, list, update,
      delete) within tier structures. Tier structures define the tiering model
      for loyalty programs — how members qualify for and move between tiers.
  - name: Incentives
    description: >-
      Manage incentive definitions (fixed points, proportional points, material,
      digital). Includes CRUD, lifecycle transitions, and activity history.
  - name: Rewards
    description: >-
      CRUD, lifecycle operations, and activity history for reward definitions.
      Rewards can be material (product/SKU) or digital (discount coupons, gift
      vouchers).
  - name: Examine
    description: Examines the earning of loyalty points for a loyalty program member.
paths:
  /v2/loyalties/tier-structures/{id}/deactivate:
    parameters:
      - $ref: '#/components/parameters/TierStructureId'
    post:
      tags:
        - Tier Structures
      summary: Deactivate Tier Structure
      description: >
        ⚠️ **BETA endpoint**


        This is a work-in-progress documentation of a BETA endpoint. The
        parameters, fields, request and response bodies, and other data may
        subject to change. If you want to share feedback or improvements,
        contact Voucherify support or your Technical Account Manager.


        Transitions a tier structure to `INACTIVE` status.

        Allowed from: `ACTIVE`.
      operationId: deactivateTierStructure
      responses:
        '200':
          description: Deactivated tier structure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TierStructure'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Invalid state transition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    TierStructureId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Unique tier structure identifier.
  schemas:
    TierStructure:
      type: object
      description: A tier structure resource as returned by the API.
      properties:
        id:
          type: string
          description: Unique tier structure identifier.
        name:
          type: string
          maxLength: 200
          description: Display name.
        type:
          type: string
          enum:
            - POINT_BALANCE
            - POINT_EARNED
          description: Tiering model type.
        card_definition_id:
          type: string
          description: ID of the linked card definition.
        point_earned:
          oneOf:
            - $ref: '#/components/schemas/TierStructurePointEarned'
            - type: 'null'
          description: >-
            Point-earned tracking configuration. Present when `type` is
            `POINT_EARNED`.
        expiration:
          oneOf:
            - $ref: '#/components/schemas/TierStructureExpiration'
            - type: 'null'
          description: Tier qualification expiration settings.
        downgrade:
          oneOf:
            - $ref: '#/components/schemas/TierStructureDowngrade'
            - type: 'null'
          description: Downgrade behaviour settings.
        metadata:
          type: object
          description: Custom key-value metadata.
          additionalProperties: true
        status:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - INACTIVE
            - DELETED
          description: Current lifecycle status.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 creation timestamp.
        updated_at:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
          description: ISO 8601 last-update timestamp.
        object:
          type: string
          enum:
            - tier_structure
          description: Object type discriminator.
      required:
        - id
        - name
        - type
        - card_definition_id
        - metadata
        - status
        - created_at
        - object
    ErrorResponse:
      type: object
      description: Standard error response.
      properties:
        code:
          type: integer
          description: HTTP status code.
        key:
          type: string
          description: Machine-readable error key.
        message:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional error details.
        request_id:
          type:
            - string
            - 'null'
          description: Request identifier for tracing.
        resource_id:
          type: string
          description: Related resource identifier (when applicable).
        resource_type:
          type: string
          description: Related resource type (when applicable).
      required:
        - code
        - key
        - message
    TierStructurePointEarned:
      type: object
      properties:
        period:
          $ref: '#/components/schemas/TierStructurePointEarnedPeriod'
        type:
          type: string
          enum:
            - IMMEDIATELY
            - NEXT_TRACKING_PERIOD
          description: When the earned points are applied to tier qualification.
      required:
        - period
        - type
    TierStructureExpiration:
      type: object
      description: >
        Expiration configuration. The sub-object that is present depends on
        `type`:

        - `NO_EXPIRATION`: no sub-objects

        - `ROLLING_EXPIRATION`: `rolling_expiration` required

        - `CALENDAR_EXPIRATION`: `calendar_expiration` required

        - `SLIDING_EXPIRATION`: `sliding_expiration` required
      properties:
        type:
          type: string
          enum:
            - NO_EXPIRATION
            - SLIDING_EXPIRATION
            - ROLLING_EXPIRATION
            - CALENDAR_EXPIRATION
        rolling_expiration:
          oneOf:
            - $ref: '#/components/schemas/TierStructureRollingExpiration'
            - type: 'null'
        calendar_expiration:
          oneOf:
            - $ref: '#/components/schemas/TierStructureCalendarExpiration'
            - type: 'null'
        sliding_expiration:
          oneOf:
            - $ref: '#/components/schemas/TierStructureSlidingExpiration'
            - type: 'null'
      required:
        - type
    TierStructureDowngrade:
      type: object
      properties:
        type:
          type: string
          enum:
            - MULTI_LEVEL
            - SINGLE_LEVEL
            - NO_DOWNGRADE
          description: Downgrade strategy.
        grace_period:
          oneOf:
            - $ref: '#/components/schemas/TierStructureDowngradeGracePeriod'
            - type: 'null'
          description: Optional grace period before downgrade takes effect.
    TierStructurePointEarnedPeriod:
      type: object
      properties:
        value:
          type: integer
          minimum: 1
          description: Duration value.
        unit:
          type: string
          enum:
            - HOUR
            - DAY
            - WEEK
            - MONTH
            - YEAR
          description: Duration unit.
      required:
        - value
        - unit
    TierStructureRollingExpiration:
      type: object
      properties:
        period:
          $ref: '#/components/schemas/TierStructureRollingExpirationPeriod'
      required:
        - period
    TierStructureCalendarExpiration:
      type: object
      properties:
        calendar_dates:
          type: array
          items:
            $ref: '#/components/schemas/TierStructureCalendarDate'
          minItems: 1
          maxItems: 20
          description: List of calendar dates when tier qualification expires.
      required:
        - calendar_dates
    TierStructureSlidingExpiration:
      type: object
      description: Sliding window expiration that resets on qualifying activity.
      properties:
        earning_activity:
          type: boolean
          description: Whether earning activity resets the expiration window.
        spending_activity:
          type: boolean
          description: Whether spending activity resets the expiration window.
        custom_activity:
          type: boolean
          description: Whether custom activity resets the expiration window.
        custom_activity_types:
          type: array
          items:
            type: string
          maxItems: 10
          description: >-
            Custom event schema IDs that reset the window. Required when
            `custom_activity` is true.
        period:
          $ref: '#/components/schemas/TierStructureSlidingExpirationPeriod'
      required:
        - earning_activity
        - spending_activity
        - custom_activity
        - period
    TierStructureDowngradeGracePeriod:
      type: object
      properties:
        value:
          type: integer
          minimum: 1
          description: 'Duration value. Max depends on unit: DAY=90, MONTH=12, YEAR=5.'
        unit:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
        round_up:
          type: boolean
          description: Whether to round up the grace period to the next full unit.
      required:
        - value
        - unit
    TierStructureRollingExpirationPeriod:
      type: object
      properties:
        value:
          type: integer
          minimum: 1
          description: 'Duration value. Max depends on unit: DAY=90, MONTH=12, YEAR=5.'
        unit:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
      required:
        - value
        - unit
    TierStructureCalendarDate:
      type: object
      description: >-
        Day/month pair. Day range depends on month (Feb max 29, Apr/Jun/Sep/Nov
        max 30, others max 31).
      properties:
        day:
          type: integer
          minimum: 1
          maximum: 31
        month:
          type: integer
          minimum: 1
          maximum: 12
      required:
        - day
        - month
    TierStructureSlidingExpirationPeriod:
      type: object
      properties:
        value:
          type: integer
          minimum: 1
          description: 'Duration value. Max depends on unit: DAY=90, MONTH=12, YEAR=5.'
        unit:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
      required:
        - value
        - unit
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header

````