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

# Bulk Update Memberships

> Bulk update memberships (name, description, price).



## OpenAPI

````yaml put /inventory/memberships/bulk
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /inventory/memberships/bulk:
    put:
      tags:
        - Memberships
      summary: Bulk Update Memberships
      description: Bulk update memberships (name, description, price).
      operationId: bulk_update_memberships_inventory_memberships_bulk_put
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/BulkMembershipUpdate'
              type: array
              title: Updates
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/MembershipDetail-Output'
                type: array
                title: >-
                  Response Bulk Update Memberships Inventory Memberships Bulk
                  Put
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BulkMembershipUpdate:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        price:
          anyOf:
            - type: integer
            - type: 'null'
          title: Price
      type: object
      required:
        - id
      title: BulkMembershipUpdate
    MembershipDetail-Output:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the membership
        externalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalid
          description: External system identifier for the membership
        name:
          type: string
          title: Name
          description: Name of the membership
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the membership
        price:
          type: integer
          title: Price
          description: Price of the membership in cents
        patientCreditAmount:
          type: integer
          title: Patientcreditamount
          description: Amount of patient credit in cents
          default: 0
        patientCreditFrequency:
          $ref: '#/components/schemas/MembershipFrequency'
          description: Frequency of patient credit
          default: MONTHLY
        patientCreditExpiryDays:
          anyOf:
            - type: integer
            - type: 'null'
          title: Patientcreditexpirydays
          description: Days until patient credit expires
        maxRenewals:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maxrenewals
          description: Maximum number of renewals (null means unlimited)
          default: 0
        autoRenew:
          type: boolean
          title: Autorenew
          description: Whether the membership auto-renews
          default: true
        setupFee:
          type: integer
          title: Setupfee
          description: Setup fee for the membership in cents
          default: 0
        freezeFee:
          type: integer
          title: Freezefee
          description: Fee to freeze the membership in cents
          default: 0
        applySurcharge:
          type: boolean
          title: Applysurcharge
          description: Whether to apply credit card surcharge to membership charges
          default: false
        minimumBillingCycles:
          type: integer
          title: Minimumbillingcycles
          description: Minimum number of billing cycles required
          default: 0
        billingFrequency:
          $ref: '#/components/schemas/MembershipFrequency'
          description: Billing frequency for the membership
          default: MONTHLY
        benefitType:
          $ref: '#/components/schemas/MembershipBenefitType'
          description: >-
            What the cycle billing creates: PREPAYMENT_DISCOUNT,
            PATIENT_CREDIT_GRANT, or NONE
          default: PREPAYMENT_DISCOUNT
        recognitionMode:
          $ref: '#/components/schemas/MembershipRecognitionMode'
          description: >-
            How cycle revenue is recognized: PER_REDEMPTION, STRAIGHT_LINE,
            CASH, or AS_CONSUMED. Defaults to CASH (whole cycle recognized at
            billing); other modes are an explicit opt-in.
          default: CASH
        expectedUsesPerCycle:
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
          title: Expectedusespercycle
          description: >-
            PER_REDEMPTION only: how many redemptions a typical member makes per
            cycle, used as the recognition divisor. Leave blank when the
            redemption limit (quantity) already reflects expected usage; set it
            when the limit is a high cap (e.g. 100) rather than a typical count.
        textColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Textcolor
          description: Text color for the membership
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the membership is archived
          default: false
        commissionable:
          type: boolean
          title: Commissionable
          description: Whether this membership is eligible for commissions
          default: true
        hiddenInPatientPortal:
          type: boolean
          title: Hiddeninpatientportal
          description: Whether this membership is hidden from the patient portal
          default: false
        ruleSetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Rulesetid
          description: ID of the rule set for the membership
        formId:
          anyOf:
            - type: string
            - type: 'null'
          title: Formid
          description: ID of the form associated with this membership
        form:
          anyOf:
            - $ref: '#/components/schemas/MembershipFormTiny'
            - type: 'null'
          description: Form associated with this membership
        merchantAccountId:
          anyOf:
            - type: string
            - type: 'null'
          title: Merchantaccountid
          description: Bank account (merchant account) that membership deposits go to
        depositStrategy:
          $ref: '#/components/schemas/MembershipDepositStrategy'
          description: >-
            How to pick the merchant account at billing time. MEMBERSHIP_ACCOUNT
            always routes to merchant_account_id. LOCATION_ACCOUNT routes to the
            sold-at location's merchant account (falling back to
            merchant_account_id when the location has none).
          default: MEMBERSHIP_ACCOUNT
        feeSchedule:
          anyOf:
            - items:
                $ref: '#/components/schemas/MembershipFeeScheduleEntry'
              type: array
            - type: 'null'
          title: Feeschedule
          description: Cycle-specific price overrides
        tags:
          items:
            $ref: '#/components/schemas/ItemTagSummary'
          type: array
          title: Tags
          description: Tags assigned to this membership
        discountTemplates:
          anyOf:
            - items:
                $ref: '#/components/schemas/DiscountTemplate'
              type: array
            - type: 'null'
          title: Discounttemplates
          description: Discount templates for the membership
        memberCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Membercount
          description: Number of active members
          default: 0
        totalRevenue:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalrevenue
          description: Total revenue from this membership, in cents
          default: 0
        accountingBasis:
          anyOf:
            - $ref: '#/components/schemas/AccountingBasis'
            - type: 'null'
          description: >-
            Basis the total_revenue reflects: ACCRUAL = recognized revenue
            (earned as benefits are delivered), CASH = billed revenue (collected
            at cycle billing). Set only on responses that compute total_revenue;
            null otherwise. Lets the FE label what it shows.
      type: object
      required:
        - name
        - price
      title: MembershipDetail
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MembershipFrequency:
      type: string
      enum:
        - DAILY
        - WEEKLY
        - BIWEEKLY
        - MONTHLY
        - EVERY_FOUR_WEEKS
        - EVERY_SIX_WEEKS
        - EVERY_TEN_WEEKS
        - EVERY_TWELVE_WEEKS
        - QUARTERLY
        - EVERY_FOUR_MONTHS
        - SEMI_ANNUALLY
        - YEARLY
      title: MembershipFrequency
    MembershipBenefitType:
      type: string
      enum:
        - PREPAYMENT_DISCOUNT
        - PATIENT_CREDIT_GRANT
        - NONE
      title: MembershipBenefitType
      description: |-
        What a membership's cycle billing creates (the product mechanic).

        Orthogonal to MembershipRecognitionMode (the accounting choice).
    MembershipRecognitionMode:
      type: string
      enum:
        - PER_REDEMPTION
        - STRAIGHT_LINE
        - CASH
        - AS_CONSUMED
      title: MembershipRecognitionMode
      description: |-
        How a membership's cycle revenue is recognized (the accounting choice).

        Orthogonal to MembershipBenefitType (the product mechanic).
    MembershipFormTiny:
      properties:
        name:
          type: string
          title: Name
        pathName:
          type: string
          title: Pathname
      type: object
      required:
        - name
        - pathName
      title: MembershipFormTiny
    MembershipDepositStrategy:
      type: string
      enum:
        - MEMBERSHIP_ACCOUNT
        - LOCATION_ACCOUNT
      title: MembershipDepositStrategy
      description: |-
        Which merchant account a membership's cycle billing routes to.

        Resolution precedence at billing time:
          member.merchant_account_id (override)
            ?? location.merchant_account_id (if strategy == LOCATION_ACCOUNT)
            ?? membership.merchant_account_id
    MembershipFeeScheduleEntry:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the fee schedule entry
        membershipId:
          type: string
          title: Membershipid
          description: ID of the membership
          default: ''
        cycleNumber:
          type: integer
          minimum: 1
          title: Cyclenumber
          description: Billing cycle number (1-indexed)
        price:
          type: integer
          minimum: 0
          title: Price
          description: Price in cents for this cycle
      type: object
      required:
        - cycleNumber
        - price
      title: MembershipFeeScheduleEntry
    ItemTagSummary:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
      type: object
      required:
        - id
        - name
      title: ItemTagSummary
    DiscountTemplate:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the discount template
        createdByItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyitemid
          description: ID of the item (membership or package) that creates this discount
        discountChoiceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Discountchoiceid
          description: ID of the discount choice group
        itemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Itemid
          description: ID of the specific item for this discount
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: Category name for items in this discount (references category.name)
        itemType:
          anyOf:
            - $ref: '#/components/schemas/ItemType'
            - type: 'null'
          description: Type of item this discount applies to (PRODUCT, SERVICE, etc.)
        type:
          anyOf:
            - $ref: '#/components/schemas/DiscountType'
            - type: 'null'
          description: Type of discount template
        percentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Percentage
          description: Discount percentage (0-100)
        amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Amount
          description: Discount amount in cents
        quantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Quantity
          description: Quantity for this discount (null = unlimited)
        expiryTimeDays:
          anyOf:
            - type: integer
            - type: 'null'
          title: Expirytimedays
          description: Days until discounts expire after issuance (null = never expires)
        renewalCycleInterval:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Renewalcycleinterval
          description: >-
            Number of billing cycles between re-issuances. null = every billing
            cycle.
        isStackable:
          type: boolean
          title: Isstackable
          description: Whether this discount can be combined with other discounts
          default: true
        isPrepayment:
          type: boolean
          title: Isprepayment
          description: Whether this is a prepayment (commissions on full price)
          default: false
        group:
          anyOf:
            - type: string
            - type: 'null'
          title: Group
          description: Group name for discount choices (resolved to discount_choice_id)
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the discount is archived
          default: false
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: When the template was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: When the template was last updated
      type: object
      title: DiscountTemplate
      description: >-
        Schema for discount templates.

        These define the rules for creating discounts from memberships or
        packages.
    AccountingBasis:
      type: string
      enum:
        - CASH
        - ACCRUAL
      title: AccountingBasis
      description: Revenue recognition basis for analytics dashboards.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ItemType:
      type: string
      enum:
        - ITEM
        - SERVICE
        - PRODUCT
        - PACKAGE
        - MEMBERSHIP
        - MEDICATION
        - SERVICE_FEE
        - GIFT_CARD
      title: ItemType
    DiscountType:
      type: string
      enum:
        - GLOBAL
        - CUSTOM
        - MEMBERSHIP
        - PACKAGE
        - SAVED_ITEM
        - PROMOTION
      title: DiscountType

````