Skip to main content
PUT
/
inventory
/
memberships
/
bulk
Bulk Update Memberships
curl --request PUT \
  --url https://api.decodahealth.com/inventory/memberships/bulk \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "price": 123
  }
]
'
[
  {
    "name": "<string>",
    "price": 123,
    "id": "<string>",
    "externalId": "<string>",
    "description": "<string>",
    "globalDiscountPercentage": 0,
    "patientCreditAmount": 0,
    "patientCreditFrequency": "MONTHLY",
    "patientCreditExpiryDays": 123,
    "maxRenewals": 0,
    "autoRenew": true,
    "setupFee": 0,
    "freezeFee": 0,
    "minimumBillingCycles": 0,
    "billingFrequency": "MONTHLY",
    "textColor": "<string>",
    "isArchived": false,
    "ruleSetId": "<string>",
    "merchantAccountId": "<string>",
    "feeSchedule": [
      {
        "cycleNumber": 2,
        "price": 1,
        "id": "<string>",
        "membershipId": ""
      }
    ],
    "discounts": [
      {
        "membershipId": "<string>",
        "id": "<string>",
        "externalId": "<string>",
        "itemId": "<string>",
        "itemCategory": "<string>",
        "isPhysical": true,
        "discountPercentage": 123,
        "discountAmount": 123,
        "creditAmount": 123,
        "quantity": 123,
        "rollover": false,
        "rolloverExpiryDays": 123,
        "neverExpire": false,
        "group": "<string>",
        "isArchived": false
      }
    ],
    "memberCount": 0,
    "totalRevenue": 0
  }
]

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json
id
string
required
name
string | null
description
string | null
price
integer | null

Response

Successful Response

name
string
required

Name of the membership

price
integer
required

Price of the membership in cents

id
string

Unique identifier for the membership

externalId
string | null

External system identifier for the membership

description
string | null

Optional description of the membership

globalDiscountPercentage
number | null
default:0

Global discount percentage for all items

patientCreditAmount
integer
default:0

Amount of patient credit in cents

patientCreditFrequency
enum<string>
default:MONTHLY

Frequency of patient credit

Available options:
DAILY,
WEEKLY,
BIWEEKLY,
MONTHLY,
QUARTERLY,
SEMI_ANNUALLY,
YEARLY
patientCreditExpiryDays
integer | null

Days until patient credit expires

maxRenewals
integer | null
default:0

Maximum number of renewals (null means unlimited)

autoRenew
boolean
default:true

Whether the membership auto-renews

setupFee
integer
default:0

Setup fee for the membership in cents

freezeFee
integer
default:0

Fee to freeze the membership in cents

minimumBillingCycles
integer
default:0

Minimum number of billing cycles required

billingFrequency
enum<string>
default:MONTHLY

Billing frequency for the membership

Available options:
DAILY,
WEEKLY,
BIWEEKLY,
MONTHLY,
QUARTERLY,
SEMI_ANNUALLY,
YEARLY
textColor
string | null

Text color for the membership

isArchived
boolean
default:false

Whether the membership is archived

ruleSetId
string | null

ID of the rule set for the membership

merchantAccountId
string | null

Bank account (merchant account) that membership deposits go to

feeSchedule
MembershipFeeScheduleEntry · object[] | null

Cycle-specific price overrides

discounts
MembershipDiscount · object[] | null

Optional discounts for the membership

memberCount
integer | null
default:0

Number of active members

totalRevenue
integer | null
default:0

Total revenue from this membership