Enable-Request

STAGING_URL: https://switch-api-staging.herokuapp.com
LIVE_URL: https://switchapi.azurewebsites.net

Create Enable-Request

POST https://switchapi3.azurewebsites.net/admin/enable_requests/:user_id

Creates a request to enable a disabled user. This endpoint can only be used by customer_success admins

Headers

Name
Type
Description

SWI-CS

string

Payload checksum

SWI-CID

string

Client ID

Authorization

string

Format for Authorization is Bearer token

Request Body

Name
Type
Description

user_id

string

The id of the user to be disabled.

reason

string

Reason for requesting user's enablement

{
  "message": "Enable-request created successfully",
  "data": {
    "status": "pending",
    "id": "21",
    "reason": "User no longer suspicious",
    "super_admin_comment": null,
    "user": {
      "first_name": "Testing",
      "last_name": "Andrew",
      "email": "testingandrew@gmail.com",
      "is_verified": false,
      "switch_id": 100125,
      "image_selfie_url": null
    },
    "created_by": {
      "id": "11",
      "email": "cs@switch.ng"
    }
  }
}

Get Enable-Request list

GET https://switchapi3.azurewebsites.net/admin/enable_requests

Retrieves the list of enable-requests.

Query Parameters

Name
Type
Description

status

string

Status filter. Could be either pending, approved or declined

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Get Enable-Request info

GET https://switchapi3.azurewebsites.net/admin/enable_requests/:request_id

Retrieves the info of an enable-request by id.

Path Parameters

Name
Type
Description

request_id

string

The id of the request

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Approve Request

POST https://switchapi3.azurewebsites.net/admin/enable_requests/approve/:request_id

This endpoint allows a super-admin to approve a request.

Path Parameters

Name
Type
Description

request_id

string

The request id

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Decline Request

POST https://switchapi3.azurewebsites.net/admin/enable_requests/decline/:request_id

This endpoint allows a super-admin to decline a request.

Path Parameters

Name
Type
Description

request_id

string

The request id

Headers

Name
Type
Description

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Last updated

Was this helpful?