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

# Update entitlement status

> Update the status of an entitlement



## OpenAPI

````yaml put /entitlements/{id}/status
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /entitlements/{id}/status:
    parameters: []
    put:
      tags:
        - Entitlement
      summary: Update entitlement status
      description: Update the status of an entitlement
      operationId: updateEntitlementStatus
      parameters:
        - name: id
          in: path
          description: Entitlement identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        description: The updated Entitlement resource
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Entitlement.UpdateEntitlementStatusInput-UpdateEntitlementStatus
          text/html:
            schema:
              $ref: >-
                #/components/schemas/Entitlement.UpdateEntitlementStatusInput-UpdateEntitlementStatus
        required: true
      responses:
        '200':
          description: Entitlement resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entitlement-EntitlementRead'
            text/html:
              schema:
                $ref: '#/components/schemas/Entitlement-EntitlementRead'
          links: {}
        '400':
          description: Invalid input
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity
      deprecated: false
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT \
             /entitlements/{id}/status \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "active": ""
            }'
components:
  schemas:
    Entitlement.UpdateEntitlementStatusInput-UpdateEntitlementStatus:
      type: object
      description: ''
      deprecated: false
      properties:
        active:
          description: The status of the entitlement
          type: boolean
    Entitlement-EntitlementRead:
      type: object
      description: Get all entitlements of a subscription
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        subscriptionItem:
          readOnly: true
          anyOf:
            - $ref: '#/components/schemas/SubscriptionItem-EntitlementRead'
            - type: 'null'
        feature:
          anyOf:
            - $ref: '#/components/schemas/Feature-EntitlementRead'
            - type: 'null'
        value:
          description: >-
            The value of the entitlement. Can be a boolean (switch), a string
            (custom), a number (quantity) or a custom number (range).
          example: 'true'
          type: string
        validFrom:
          description: The date from which the entitlement is valid
          type:
            - string
            - 'null'
          format: date-time
        validUntil:
          description: The date until which the entitlement is valid
          type:
            - string
            - 'null'
          format: date-time
        active:
          description: >-
            Whether the entitlement is currently active (computed based on
            validity dates and enabled state)
          type: boolean
        status:
          description: >-
            The status of the entitlement. Computed based on validity dates and
            enabled state.


            Possible values:
             * `active`: Entitlement is enabled and currently within its validity period
             * `pending`: Entitlement is enabled but validFrom is in the future
             * `disabled`: Entitlement is manually disabled
             * `expired`: Entitlement validUntil date has passed
          example: active
          type: string
          enum:
            - active
            - pending
            - disabled
            - expired
    SubscriptionItem-EntitlementRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 01F9ZQZJZJQZJZJZJZJZJZJZJZ
          type: string
        name:
          readOnly: true
          description: >-
            The name of the item which will be used in the invoice. The name is
            translated based on the customer's locale.
          example: Fitness M
          type: string
        description:
          readOnly: true
          description: >-
            The description of the item which will be used in the invoice. The
            description is translated based on the customer's locale.
          example: Everything included
          type:
            - string
            - 'null'
        furtherInformation:
          readOnly: true
          description: >-
            Further information defines additional information for the item
            which will be displayed in the invoice.
          example: 'Additional agreements: The contract includes a free drink flatrate.'
          type:
            - string
            - 'null'
        status:
          readOnly: true
          description: |-
            The status of the item.

            Possible values:
             * `active`: The item is active and will be billed.
             * `canceled`: The item is canceled and will be billed until the end of the contract.
             * `pending`: The item is pending and will be billed after the contract start.
             * `terminated`: The item is terminated and will not be billed.
          example: active
          enum:
            - active
            - canceled
            - pending
            - terminated
        subscriptionId:
          readOnly: true
          type: string
    Feature-EntitlementRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          description: >-
            The identifier of the feature, this can be a slug or a id. If not
            provided, it will be generated automatically. This must be unique.
          example: feature-1
          type: string
        name:
          description: >-
            The name of the feature. Examples: `number of users`, `disk usage`,
            `traffic`, `CRM integration`, `API access`.
          example: number of users
          type: string
        description:
          description: The description of the feature, shown in the admin-UI.
          example: >-
            This feature allows you to manage the number of users in your
            account.
          type:
            - string
            - 'null'
        status:
          description: >-
            The status of the feature.

            Draft: The feature is not yet published. Those can be used to create
            entitlements but they won't be available until activation.

            Active: The feature is available and can be used.

            Archived: The feature is no longer available and can't be used for
            **new** entitlements. Existing entitlements will still work.
            Archived features can be activated again.
          example: active
          type: string
          enum:
            - draft
            - active
            - archived
        type:
          description: >-
            The type of the feature.

            switch: The feature can be enabled or disabled for a subscription.
            You can add additional config options in the options key.

            custom: The levels of the feature can be fully customized. As an
            example, you can define a feature `SLA` with 3 levels: `basic`,
            `premium`, `enterprise`.

            quantity: The levels of the feature are based on a quantity. As an
            example, you can define a feature `number of users` with levels `5`,
            `10`, `25`, `50`, `100`. You can also provide a `unlimited` level.

            range: The value can be customized in a given range. As an example,
            you can define a feature `disk usage` with a range from `1GB` to
            `1000GB`, you can also provide a unlimited level to allow all
            values.
          example: switch
          type: string
          enum:
            - switch
            - custom
            - quantity
            - range
        config:
          description: >-
            The config of the feature. This is only required for the types
            `custom`, `quantity` and `range`.
          examples:
            switch:
              value:
                internalFeatureName: feature-1
              summary: Switch config example. This is optional for the type `switch`.
            custom:
              value:
                - value: basic
                  label: Basic
                - value: premium
                  label: Premium
                - value: enterprise
                  label: Enterprise
              summary: Custom levels
            quantity:
              value:
                - value: '5'
                  label: 5 users
                - value: '10'
                  label: 10 users
                - value: '25'
                  label: 25 users
                - value: '50'
                  label: 50 users
                - value: '100'
                  label: 100 users
                - value: unlimited
                  label: Unlimited users
              summary: Quantity levels
            range:
              value:
                from: '1'
                to: '1000'
              summary: Range levels
            range unlimited:
              value:
                from: '1'
                to: null
              summary: Range levels with unlimited
          oneOf:
            - title: Custom, quantity
              type: array
              items:
                type: object
                properties:
                  value:
                    type:
                      - string
                      - integer
                  label:
                    type: string
                required:
                  - value
                  - label
            - title: Range
              required:
                - from
                - to
              type: object
              properties:
                from:
                  type:
                    - integer
                    - 'null'
                to:
                  type:
                    - integer
                    - 'null'
        unit:
          readOnly: true
          type:
            - string
            - 'null'
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````