Skip to content

User - MAC Binding

Base URL: https://your-domain.com

Admin endpoints for managing MAC address bindings for subscribers. All endpoints require admin/staff authentication.


Fetch All MAC Bindings

Retrieve all MAC address bindings.

PropertyValue
EndpointFetch All MAC Bindings
MethodGET
URL/api/v1/mac-binding
AuthenticationBearer Token

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer your-auth-tokenYes

Success Response (200 OK):

json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "subscriber_id": 1,
            "subscriber_name": "John Doe",
            "mac_address": "AA:BB:CC:DD:EE:FF",
            "created_at": "2024-01-15 10:30:00"
        }
    ]
}

Fetch Subscriber MAC

Retrieve MAC binding for a specific subscriber.

PropertyValue
EndpointFetch Subscriber MAC
MethodGET
URL/api/v1/mac-binding/{id}
AuthenticationBearer Token

Success Response (200 OK):

json
{
    "success": true,
    "data": {
        "subscriber_id": 1,
        "subscriber_name": "John Doe",
        "mac_address": "AA:BB:CC:DD:EE:FF"
    }
}

Bind MAC

Bind a MAC address to a subscriber.

PropertyValue
EndpointBind MAC
MethodPOST
URL/api/v1/mac-binding/bind
AuthenticationBearer Token

Request Body:

json
{
    "isp_id": 1,
    "branch_id": 1,
    "user_id": 1,
    "subscriber_id": 1,
    "mac_address": "AA:BB:CC:DD:EE:FF"
}
ParameterTypeRequiredDescription
subscriber_idintegerYesSubscriber ID
mac_addressstringYesMAC address to bind

Success Response (200 OK):

json
{
    "success": true,
    "message": "MAC address bound successfully"
}

Unbind MAC

Remove MAC binding from a subscriber.

PropertyValue
EndpointUnbind MAC
MethodPOST
URL/api/v1/mac-binding/unbind
AuthenticationBearer Token

Request Body:

json
{
    "isp_id": 1,
    "branch_id": 1,
    "user_id": 1,
    "subscriber_id": 1
}

Success Response (200 OK):

json
{
    "success": true,
    "message": "MAC address unbound successfully"
}

www.onezeroart.com