Skip to content

Get Available Plans

Endpoint

GET /api/v1/subscriber/getAvailablePlans

This endpoint retrieves the list of available plans for the authenticated subscriber.


Authorization

  • Type: Bearer Token
  • Header:
    Authorization: Bearer <your_token_here>
    

Query Parameters

Parameter Type Required Description
filter string No Filter by services (optional).
sort_by string No Sort by price or speed (optional).
sort string No Sort order: asc or desc (optional).

Example Request

curl -X GET "https://yourispcrmdomain/api/v1/subscriber/getAvailablePlans?sort_by=price&sort=asc" \
-H "Authorization: Bearer YOURAPITOKENHERE"

Response

Success Response (200 OK)

{
  "success": true,
  "data": [
    {
      "plan_id": 1,
      "name": "Basic Plan",
      "price": 20.00,
      "speed": "50Mbps",
      "description": "Affordable plan for casual browsing"
    },
    {
      "plan_id": 2,
      "name": "Premium Plan",
      "price": 50.00,
      "speed": "200Mbps",
      "description": "High-speed plan for heavy users"
    }
  ]
}

Explanation: - success - Indicates if the request was successful. - data - An array of available plans: - plan_id - Unique ID of the plan. - name - Name of the plan. - price - Monthly cost of the plan. - speed - Internet speed offered. - description - Brief description of the plan.


Error Responses

404 Not Found

{
  "success": false,
  "message": "No available plans found"
}

Explanation: - This error occurs if no plans are available for the subscriber.


Example Response

{
  "success": true,
  "data": [
    {
      "plan_id": 1,
      "name": "Basic Plan",
      "price": 20.00,
      "speed": "50Mbps",
      "description": "Affordable plan for casual browsing"
    },
    {
      "plan_id": 2,
      "name": "Premium Plan",
      "price": 50.00,
      "speed": "200Mbps",
      "description": "High-speed plan for heavy users"
    }
  ]
}

For further assistance, contact our support team at support@netgroot.com.