Skip to main content

GET /api/v1/internet-plans/

Lists all internet plans configured in the WispHub system. This endpoint returns plans of different types including PPPOE, Simple Queue, and PCQ.
This query is cached internally to improve performance and avoid redundant continuous calls to the external API.

Authentication

No authentication required for this endpoint.

Response Body

The response follows the standard BackendResponse wrapper format:
ok
boolean
required
Indicates if the request was successful
type
string
required
Response type: success, error, or info
action
string
required
Action identifier for this operation:
  • internet_plans_listed - Plans were successfully retrieved
  • internet_plan_not_found - No plans found in the system
data
array
Array of internet plan objects. null when no plans are found.
message
string
Optional message with additional information
meta
object
Optional metadata object

Example Request

curl -X GET https://api.yourdomain.com/api/v1/internet-plans/

Example Response

{
  "ok": true,
  "type": "success",
  "action": "internet_plans_listed",
  "data": [
    {
      "plan_id": 1,
      "name": "Plan Basico 10MB",
      "type": "PPPOE"
    },
    {
      "plan_id": 2,
      "name": "Plan Premium 50MB",
      "type": "SIMPLE QUEUE"
    },
    {
      "plan_id": 3,
      "name": "Plan Empresarial 100MB",
      "type": "PCQ"
    }
  ],
  "message": null,
  "meta": null
}

Plan Types

The WispHub system supports three types of internet plans:
Point-to-Point Protocol over Ethernet plans. These plans support full detail retrieval including speeds and pricing information.
MikroTik Simple Queue based plans. These plans support full detail retrieval including speeds and pricing information.
Per Connection Queue plans. Note that WispHub does not expose a detail endpoint for this plan type, so only basic information is available.

Response Actions

internet_plans_listed
action
Returned when plans are successfully retrieved from the system
internet_plan_not_found
action
Returned when no plans exist in the system

Implementation Notes

The endpoint uses internal caching to improve performance. The plan list is cached to avoid making redundant calls to the WispHub external API. This means the data may be slightly delayed but provides significantly better performance for frequently accessed data.