Disable-Request

STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.net

Create Disable-Request

POST https://switchapi3.azurewebsites.net/admin/disable_requests

Creates a request to disable a 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

integer

The id of the user to be disabled.

reason

string

Reason for requesting for user disablement

{
  "message": "Disable-request created successfully",
  "data": {
    "status": "pending",
    "id": "52",
    "reason": "Very suspicious user",
    "super_admin_comment": null,
    "user": {
      "first_name": "Demilade",
      "last_name": "Omitiran",
      "email": "omitirand@gmail.com",
      "is_verified": false,
      "switch_id": 100199,
      "image_selfie_url": "+2348184392899_image_selfie_url_Screenshot 2019-05-07 at 4.00.10 PM.png"
    },
    "created_by": {
      "id": "11",
      "email": "cs@switch.ng"
    }
  }
}

Get Disable-Request list

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

Retrieves the list of disable-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 for Authorization is Bearer token

Get Disable-Request info

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

Retrieves the info of a disable-request.

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 for Authorization is Bearer token

Approve Request

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

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

Path Parameters

Name
Type
Description

request_id

string

The id of the request

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

comment

string

Super-admin comment

Decline Request

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

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

Path Parameters

Name
Type
Description

request_id

string

The id of the request.

Headers

Name
Type
Description

SWI-CS

string

Payload checksum

SWI-CID

string

Client ID

Authorization

string

Format is Bearer token

Request Body

Name
Type
Description

comment

string

Super-admin comment

Last updated

Was this helpful?