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

# Update a plan

> Update a certain plan. <h3>OAuth</h3>Required scopes: <code>plans</code>



## OpenAPI

````yaml /assets/openapi.json patch /plans/v1/{id}
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /plans/v1/{id}:
    patch:
      tags:
        - Plans
      summary: Update a plan
      description: 'Update a certain plan. <h3>OAuth</h3>Required scopes: <code>plans</code>'
      operationId: updatePlan
      parameters:
        - name: id
          in: path
          description: The id of the plan.
          schema:
            type: string
            format: uuid
          required: true
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      requestBody:
        $ref: '#/components/requestBodies/updatePlan'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - plans
components:
  requestBodies:
    updatePlan:
      content:
        application/json:
          schema:
            type: object
            properties:
              plan:
                description: Plan fields to update.
                type: object
                properties:
                  access:
                    description: Third-party access integrations.
                    type: object
                    properties:
                      avigilonAltaGroupRef:
                        description: Avigilon Alta access group reference.
                        nullable: true
                        type: number
                      brivoGroupRef:
                        description: Brivo access group reference.
                        nullable: true
                        type: number
                      kisiGroupRef:
                        description: Kisi access group reference.
                        nullable: true
                        type: number
                      saltoksAccessGroupRef:
                        description: Salto KS access group reference.
                        nullable: true
                        type: string
                        format: uuid
                      tapkeyGroupRef:
                        description: Tapkey access group reference.
                        nullable: true
                        type: string
                        format: uuid
                  addons:
                    description: Addons included in the plan.
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                      required:
                        - id
                  commitmentCycles:
                    description: Number of billing cycles the member is committed to.
                    default: 0
                    type: integer
                    minimum: 0
                    maximum: 1000
                  credits:
                    description: Credits included in the plan.
                    default: 0
                    type: number
                    minimum: 0
                    maximum: 1000000000
                  customTax:
                    description: Custom tax settings.
                    type: object
                    properties:
                      enabled:
                        description: Whether custom tax is enabled.
                        type: boolean
                      rate:
                        description: Custom tax rate percentage.
                        type: number
                        minimum: 0
                        maximum: 100
                    required:
                      - enabled
                      - rate
                    additionalProperties: false
                  dayPasses:
                    description: Number of day passes included in the plan.
                    default: 0
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  description:
                    description: Description of the plan.
                    default: ''
                    type: string
                  discounts:
                    description: Percentage discounts by product type.
                    deprecated: true
                    type: object
                    properties:
                      creditPackages:
                        description: Discount percentage for credit packages.
                        type: number
                        minimum: 0
                        maximum: 100
                      desks:
                        description: Discount percentage for desk bookings.
                        type: number
                        minimum: 0
                        maximum: 100
                      equipment:
                        description: Discount percentage for equipment bookings.
                        type: number
                        minimum: 0
                        maximum: 100
                      events:
                        description: Discount percentage for event tickets.
                        type: number
                        minimum: 0
                        maximum: 100
                      rooms:
                        description: Discount percentage for room bookings.
                        type: number
                        minimum: 0
                        maximum: 100
                      shop:
                        description: Discount percentage for shop products.
                        type: number
                        minimum: 0
                        maximum: 100
                    required:
                      - creditPackages
                      - desks
                      - events
                      - rooms
                      - shop
                    additionalProperties: false
                  exclusiveAccess:
                    description: Resources exclusively available to members on this plan.
                    default:
                      resourceRefs: []
                    type: object
                    properties:
                      resourceRefs:
                        description: Resource IDs with exclusive access for this plan.
                        type: array
                        items:
                          description: ID of a resource with exclusive access.
                          type: string
                          format: uuid
                    required:
                      - resourceRefs
                  grantedDiscounts:
                    description: Coupons granted to members on this plan.
                    type: array
                    items:
                      type: object
                      properties:
                        coupon:
                          description: Coupon to grant with the plan.
                          type: object
                          properties:
                            amountOff:
                              description: Fixed discount amount.
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                            createDate:
                              description: ISO timestamp of when the coupon was created.
                              type: string
                              format: date-time
                            currencyCode:
                              description: Currency code for amountOff.
                              type: string
                            deleteDate:
                              description: ISO timestamp of when the coupon was deleted.
                              type: string
                              format: date-time
                            duration:
                              description: How long the coupon discount applies.
                              type: string
                              enum:
                                - forever
                                - once
                                - repeating
                            durationInMonths:
                              description: Duration in months when duration is repeating.
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                            enabledForCredits:
                              description: Whether the coupon applies to credit purchases.
                              type: boolean
                            id:
                              description: Unique identifier of the coupon.
                              type: string
                              format: uuid
                            limitedItems:
                              description: Item-level redemption limits.
                              type: object
                              properties:
                                enabled:
                                  description: Whether item-level limits are enabled.
                                  type: boolean
                                values:
                                  description: Limited item values.
                                  type: array
                                  items: {}
                            limitedRedemption:
                              description: Redemption limits.
                              type: object
                              properties:
                                enabled:
                                  description: Whether redemption limits are enabled.
                                  type: boolean
                                usage:
                                  description: Current redemption count.
                                  type: number
                                value:
                                  description: Maximum redemption count.
                                  type: number
                            networkRef:
                              description: ID of the network this coupon belongs to.
                              type: string
                              format: uuid
                            organizationRef:
                              description: ID of the location this coupon belongs to.
                              type: string
                              format: uuid
                            percentOff:
                              description: Percentage discount amount.
                              type: number
                              minimum: 0
                              maximum: 100
                            productTypes:
                              description: Product types the coupon applies to.
                              type: array
                              items:
                                type: string
                                enum:
                                  - roomBookings
                                  - eventSpaceBookings
                                  - conferenceRoomBookings
                                  - meetingRoomBookings
                                  - phoneBoothBookings
                                  - stationBookings
                                  - studioBookings
                                  - hotDeskBookings
                                  - dedicatedDeskBookings
                                  - parkingBookings
                                  - equipmentBookings
                                  - eventTickets
                                  - shopProducts
                                  - packages
                                  - subscriptionItems
                          required:
                            - id
                      required:
                        - coupon
                  price:
                    description: Price of the plan.
                    type: number
                    minimum: 0
                  printing:
                    description: Printing integration settings.
                    type: object
                    properties:
                      ezeepBlueGroupRef:
                        description: Ezeep Blue printing group reference.
                        nullable: true
                        type: string
                        format: uuid
                  selfSignup:
                    description: Self sign-up settings.
                    type: object
                    properties:
                      enabled:
                        description: Whether members can self-sign up.
                        type: boolean
                      type:
                        description: Self sign-up flow type.
                        type: string
                        enum:
                          - immediate
                          - request
                    required:
                      - enabled
                      - type
                    additionalProperties: false
                  setupFee:
                    description: One-time setup fee.
                    default: 0
                    type: number
                    minimum: 0
                  title:
                    description: Display name of the plan.
                    type: string
                    minLength: 1
            required:
              - plan
      required: true
  schemas:
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````