Disable-Request
STAGING_URL: https://switchapi3.azurewebsites.net
LIVE_URL: https://switchapi.azurewebsites.netCreate 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
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token
Request Body
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
status
string
Status filter. Could be either pending, approved or declined
Headers
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
request_id
string
The id of the request
Headers
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
request_id
string
The id of the request
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format for Authorization is Bearer token
Request Body
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
request_id
string
The id of the request.
Headers
SWI-CS
string
Payload checksum
SWI-CID
string
Client ID
Authorization
string
Format is Bearer token
Request Body
comment
string
Super-admin comment
Last updated
Was this helpful?