API to list plans

Integrating Plans with Your White Label Partner Portal

You can easily create different plans on your white-label partner portal using the API. If you want to display these plans on your website (storefront), you can use the API to fetch all the plans and their details in real-time, allowing you to list them seamlessly on your site.

Steps to Fetch and Display Plans:

Step 1:   
Log in to your partner portal and copy your partner access token.

white_label_partner_api_access_token.png

Step 2:

Trigger the following "Plans API".  
GET

https://partners-api.easysocial.in/api/466d2e086a8f4f24bcb7dca0789fee/plans


Use the generated token and include it in the header while making the API request.

Step 3:   
The API will return a list of all available plans in JSON format.

Example response 

{
  "status": 200,
  "success": true,
  "message": "success",
  "payload": {
    "meta": {
      "total": 10,
      "per_page": 50,
      "current_page": 1,
      "last_page": 1,
      "first_page": 1,
      "first_page_url": "/?page=1",
      "last_page_url": "/?page=1",
      "next_page_url": null,
      "previous_page_url": null
    },
    "data": [
      {
        "id": 78,
        "name": "ts half",
        "slug": "643648",
        "selling_amount": 3000,
        "partner_discount_amount": null,
        "plan_detail": "<ul>\n  <li>12000 included conversations</li>\n  <li>Rs.12 for additional conversations</li>\n  <li>Upto 200 conversations / minute</li>\n  <li>Advanced No-Code chatbot builder</li>\n  <li>Business information database</li>\n  <li>Unlimited contacts</li>\n  <li>Template message approval workflow</li>\n  <li>Broadcast messages via Excel sheets</li>\n  <li>API &amp; Webhook integrations</li>\n  <li>5 team members / agents</li>\n  <li>Usage reports and summary</li>\n  <li>Email / WhatsApp support</li>\n</ul>",
        "plan_type": "half_yearly",
        "validity": 180,
        "linked_plan_id": 3
      }
    ]
  }
}

Step 4:   
You can then render this data on your website or panel. For a polished storefront, convert the JSON data into a well-designed HTML format for easy display.   

NOTE: You will also receive a "plan slug". Each plan has its unique slug which is generated using plans API. This slug acts as an identifier for each plan. You will have to use "plan slug" while creating a plan on behalf of user.