API Reference - Membership Plans

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108102

← Back to API Reference | Getting Started

Membership Plans

Membership Plans define the subscription tiers available on your directory site. Each plan controls pricing, profile capabilities, content limits, display options, and the member experience from signup through active membership.

Model name in URL: subscription_types — DB table: subscription_types

The Membership Plan Object

FieldTypeDescription
subscription_idintegerUnique plan ID (primary key, read-only)
subscription_namestringDisplay name for this membership plan required on create
subscription_typestringPlan category; typically member for paid/free plans required on create
monthly_amountdecimalMonthly billing price (EG 19.99); null if not offered
yearly_amountdecimalAnnual billing price; null if not offered
profile_typestringProfile classification; common values: paid, free, claim required on create
profile_photointegerWhether members can upload a profile photo: 1 yes, 0 no
photo_limitintegerMaximum number of photos members on this plan can upload
style_limitintegerNumber of custom style options available to members
service_limitstringMaximum number of services/items members can list; 0 for unlimited
website_linkintegerWhether members can display a website link: 1 yes, 0 no
social_linkintegerWhether members can display social media links: 1 yes, 0 no
seal_linkintegerWhether members can display a trust seal/badge link: 1 yes, 0 no
show_aboutintegerWhether the About section is shown on the profile: 1 yes, 0 no
show_experienceintegerWhether the Experience section is shown: 1 yes, 0 no
show_educationintegerWhether the Education section is shown: 1 yes, 0 no
show_backgroundintegerWhether the Background section is shown: 1 yes, 0 no
show_affiliationsintegerWhether the Affiliations section is shown: 1 yes, 0 no
show_publicationsintegerWhether the Publications section is shown: 1 yes, 0 no
show_awardsintegerWhether the Awards section is shown: 1 yes, 0 no
show_sloganintegerWhether the Slogan/Tagline field is shown: 1 yes, 0 no
show_sofwareintegerWhether the Software/Tools section is shown: 1 yes, 0 no
sub_activeintegerWhether this plan is active and available for signup: 1 active, 0 inactive
lead_pricedecimalPrice charged per lead delivered to members on this plan; null to disable lead pricing
location_limitstringMaximum number of service area locations; 0 for unlimited
show_phoneintegerWhether the phone number is displayed on the profile: 1 yes, 0 no
index_ruleintegerSearch engine indexing rule for member profiles on this plan
nofollow_linksintegerWhether outbound links from member profiles use nofollow: 1 yes, 0 no
payment_defaultstringDefault billing cycle pre-selected at checkout; typically yearly or monthly
menu_namestringLabel used for this plan in navigation menus; blank uses subscription_name
profile_layoutstringProfile page layout template ID for members on this plan
searchableintegerWhether members on this plan appear in directory search results: 1 yes, 0 no
search_priorityintegerSort order priority in search results; lower numbers appear first
about_formstringForm slug used for the About/bio section of the member profile
listing_details_formstringForm slug used for the Listing Details section of the member profile
contact_details_formstringForm slug used for the Contact Details section of the member profile
receive_messagesintegerMaximum number of messages members can receive; 0 for unlimited
location_settingsstringComma-separated location granularity options available to members (EG State,County,City,Zip)
data_settingsstringComma-separated list of post type IDs available to members on this plan
data_settings_readstringComma-separated list of post type IDs members can read (view) on this plan
login_redirectstringURL path members are redirected to after login (EG /account/home)
initial_amountdecimalOne-time setup or initiation fee charged at signup; null if not applicable
page_headerstringWidget name or ID to render as the page header on member profile pages
page_footerstringWidget name or ID to render as the page footer on member profile pages
display_adsintegerWhether ads are displayed on member profile pages: 1 yes, 0 no
category_badgestringBadge label displayed in category/search listings for members on this plan
profile_badgestringBadge label displayed on the member profile page for this plan
subscription_filenamestringImage filename associated with this plan (EG a plan icon or badge graphic)
signup_sidebarstringWidget name displayed in the sidebar during the signup flow for this plan
profile_sidebarstringWidget name displayed in the sidebar on member profile pages
signup_email_templatestringEmail template slug sent to new members when they sign up for this plan
upgrade_email_templatestringEmail template slug sent to members when they upgrade to this plan
email_memberintegerWhether to send the signup confirmation email to the new member: 1 yes, 0 no
signup_promotion_widgetstringWidget name or ID displayed as a promotion during signup for this plan
revision_timestamptimestampTimestamp of the last modification to this plan record (auto-managed)
search_membership_permissionsstringComma-separated list of membership types that can view members on this plan in search results
upgradable_membershipstringComma-separated list of plan IDs members can upgrade to from this plan
hide_specialtiesintegerWhether the specialties/skills section is hidden for members on this plan: 1 hidden, 0 visible

List Membership Plans

GET /api/v2/subscription_types/get

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/subscription_types/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "subscription_id": "1",
      "subscription_name": "Gold Member",
      "subscription_type": "member",
      "monthly_amount": "19.99",
      "yearly_amount": "199.99",
      "profile_type": "paid",
      "profile_photo": "1",
      "photo_limit": "50",
      "style_limit": "5",
      "service_limit": "10",
      "website_link": "1",
      "social_link": "1",
      "seal_link": "1",
      "show_about": "1",
      "show_experience": "1",
      "show_education": "1",
      "show_background": "1",
      "show_affiliations": "1",
      "show_publications": "1",
      "show_awards": "1",
      "show_slogan": "1",
      "show_sofware": "1",
      "sub_active": "1",
      "lead_price": "5.00",
      "location_limit": "10",
      "show_phone": "1",
      "index_rule": "0",
      "nofollow_links": "0",
      "payment_default": "yearly",
      "menu_name": "",
      "profile_layout": "1",
      "searchable": "1",
      "search_priority": "1",
      "about_form": "about",
      "listing_details_form": "member_listing_details",
      "contact_details_form": "member_contact_details",
      "receive_messages": "0",
      "location_settings": "State,County,City,Zip",
      "data_settings": "3,4,2,1,6",
      "data_settings_read": "0",
      "login_redirect": "/account/home",
      "initial_amount": "0.00",
      "page_header": "0",
      "page_footer": "0",
      "display_ads": "0",
      "category_badge": "",
      "profile_badge": "",
      "subscription_filename": null,
      "signup_sidebar": "Paid Signup Sidebar",
      "profile_sidebar": "Member Profile Page",
      "signup_email_template": "welcome-paid-member",
      "upgrade_email_template": "upgrade-response",
      "email_member": "1",
      "signup_promotion_widget": "",
      "revision_timestamp": "2024-06-15 10:30:00",
      "search_membership_permissions": "visitor",
      "upgradable_membership": "",
      "hide_specialties": "0"
    }
  ],
  "total": "3",
  "current_page": 1,
  "total_pages": 1,
  "next_page": ""
}

Retrieve a Membership Plan

GET /api/v2/subscription_types/get/{subscription_id}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/subscription_types/get/1" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "subscription_id": "1",
      "subscription_name": "Gold Member",
      "subscription_type": "member",
      "monthly_amount": "19.99",
      "yearly_amount": "199.99",
      "profile_type": "paid",
      "sub_active": "1",
      "searchable": "1",
      "search_priority": "1",
      "payment_default": "yearly",
      "revision_timestamp": "2024-06-15 10:30:00"
    }
  ],
  "total": "3",
  "current_page": 1,
  "total_pages": 1
}

Create a Membership Plan

POST /api/v2/subscription_types/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/subscription_types/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "subscription_name=Silver+Member" \
  -d "subscription_type=member" \
  -d "profile_type=paid" \
  -d "monthly_amount=9.99" \
  -d "yearly_amount=99.99" \
  -d "sub_active=1" \
  -d "searchable=1" \
  -d "search_priority=2" \
  -d "payment_default=yearly"

Example Response

Copy
{
  "status": "success",
  "message": {
    "subscription_id": "4",
    "subscription_name": "Silver Member",
    "subscription_type": "member",
    "monthly_amount": "9.99",
    "yearly_amount": "99.99",
    "profile_type": "paid",
    "profile_photo": null,
    "photo_limit": null,
    "style_limit": null,
    "service_limit": null,
    "website_link": null,
    "social_link": null,
    "seal_link": null,
    "show_about": null,
    "show_experience": null,
    "show_education": null,
    "show_background": null,
    "show_affiliations": null,
    "show_publications": null,
    "show_awards": null,
    "show_slogan": null,
    "show_sofware": null,
    "sub_active": "1",
    "lead_price": null,
    "location_limit": null,
    "show_phone": null,
    "index_rule": null,
    "nofollow_links": null,
    "payment_default": null,
    "menu_name": null,
    "profile_layout": null,
    "searchable": "1",
    "search_priority": "2",
    "about_form": null,
    "listing_details_form": null,
    "contact_details_form": null,
    "receive_messages": null,
    "location_settings": null,
    "data_settings": null,
    "data_settings_read": null,
    "login_redirect": null,
    "initial_amount": null,
    "page_header": null,
    "page_footer": null,
    "display_ads": null,
    "category_badge": null,
    "profile_badge": null,
    "subscription_filename": null,
    "signup_sidebar": null,
    "profile_sidebar": null,
    "signup_email_template": null,
    "upgrade_email_template": null,
    "email_member": null,
    "signup_promotion_widget": null,
    "revision_timestamp": null,
    "search_membership_permissions": null,
    "upgradable_membership": null,
    "hide_specialties": null
  }
}

Update a Membership Plan

PUT /api/v2/subscription_types/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/subscription_types/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "subscription_id=4" \
  -d "monthly_amount=14.99" \
  -d "yearly_amount=149.99" \
  -d "photo_limit=25"

Example Response

Copy
{
  "status": "success",
  "message": {
    "subscription_id": "4",
    "subscription_name": "Silver Member",
    "subscription_type": "member",
    "monthly_amount": "14.99",
    "yearly_amount": "149.99",
    "profile_type": "paid",
    "photo_limit": "25",
    "sub_active": "1",
    "searchable": "1",
    "search_priority": "2",
    "payment_default": "yearly",
    "revision_timestamp": "2024-07-01 09:15:00"
  }
}

Delete a Membership Plan

DELETE /api/v2/subscription_types/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/subscription_types/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "subscription_id=4"

Example Response

Copy
{
  "status": "success",
  "message": "subscription_types record was deleted"
}