Skip to main content
PUT
/
adminPortal
/
terminateUser
terminateUser
curl --request PUT \
  --url https://sandbox.rollfi.xyz/adminPortal/terminateUser \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "method": "terminateUser",
  "user": {
    "userId": "f9b2507d-c757-4c9a-9e96-0002299fa2f7",
    "companyId": "eb869cf0-af11-4bdb-853c-fd2616bc91f2",
    "exitDate": "2023-09-09",
    "personalEmail": "mm@aa.ll",
    "finalPayCheckType": "They have already been paid",
    "terminationChoice": "No - This user did not choose to leave",
    "dismissalType": "Layoff",
    "severance": true,
    "severancePaymentType": "Yes, it will be a one time severance payment",
    "severancePaymentFrequency": "Weekly, every Friday",
    "firstSeverancePayDate": "2023-09-09",
    "lastSeverancePayDate": "2023-12-12",
    "severanceAmount": 2333,
    "additionalNotes": "terminated due to recession"
  }
}
'
import requests

url = "https://sandbox.rollfi.xyz/adminPortal/terminateUser"

payload = {
"method": "terminateUser",
"user": {
"userId": "f9b2507d-c757-4c9a-9e96-0002299fa2f7",
"companyId": "eb869cf0-af11-4bdb-853c-fd2616bc91f2",
"exitDate": "2023-09-09",
"personalEmail": "mm@aa.ll",
"finalPayCheckType": "They have already been paid",
"terminationChoice": "No - This user did not choose to leave",
"dismissalType": "Layoff",
"severance": True,
"severancePaymentType": "Yes, it will be a one time severance payment",
"severancePaymentFrequency": "Weekly, every Friday",
"firstSeverancePayDate": "2023-09-09",
"lastSeverancePayDate": "2023-12-12",
"severanceAmount": 2333,
"additionalNotes": "terminated due to recession"
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'terminateUser',
user: {
userId: 'f9b2507d-c757-4c9a-9e96-0002299fa2f7',
companyId: 'eb869cf0-af11-4bdb-853c-fd2616bc91f2',
exitDate: '2023-09-09',
personalEmail: 'mm@aa.ll',
finalPayCheckType: 'They have already been paid',
terminationChoice: 'No - This user did not choose to leave',
dismissalType: 'Layoff',
severance: true,
severancePaymentType: 'Yes, it will be a one time severance payment',
severancePaymentFrequency: 'Weekly, every Friday',
firstSeverancePayDate: '2023-09-09',
lastSeverancePayDate: '2023-12-12',
severanceAmount: 2333,
additionalNotes: 'terminated due to recession'
}
})
};

fetch('https://sandbox.rollfi.xyz/adminPortal/terminateUser', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rollfi.xyz/adminPortal/terminateUser",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'terminateUser',
'user' => [
'userId' => 'f9b2507d-c757-4c9a-9e96-0002299fa2f7',
'companyId' => 'eb869cf0-af11-4bdb-853c-fd2616bc91f2',
'exitDate' => '2023-09-09',
'personalEmail' => 'mm@aa.ll',
'finalPayCheckType' => 'They have already been paid',
'terminationChoice' => 'No - This user did not choose to leave',
'dismissalType' => 'Layoff',
'severance' => true,
'severancePaymentType' => 'Yes, it will be a one time severance payment',
'severancePaymentFrequency' => 'Weekly, every Friday',
'firstSeverancePayDate' => '2023-09-09',
'lastSeverancePayDate' => '2023-12-12',
'severanceAmount' => 2333,
'additionalNotes' => 'terminated due to recession'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sandbox.rollfi.xyz/adminPortal/terminateUser"

payload := strings.NewReader("{\n \"method\": \"terminateUser\",\n \"user\": {\n \"userId\": \"f9b2507d-c757-4c9a-9e96-0002299fa2f7\",\n \"companyId\": \"eb869cf0-af11-4bdb-853c-fd2616bc91f2\",\n \"exitDate\": \"2023-09-09\",\n \"personalEmail\": \"mm@aa.ll\",\n \"finalPayCheckType\": \"They have already been paid\",\n \"terminationChoice\": \"No - This user did not choose to leave\",\n \"dismissalType\": \"Layoff\",\n \"severance\": true,\n \"severancePaymentType\": \"Yes, it will be a one time severance payment\",\n \"severancePaymentFrequency\": \"Weekly, every Friday\",\n \"firstSeverancePayDate\": \"2023-09-09\",\n \"lastSeverancePayDate\": \"2023-12-12\",\n \"severanceAmount\": 2333,\n \"additionalNotes\": \"terminated due to recession\"\n }\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://sandbox.rollfi.xyz/adminPortal/terminateUser")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"terminateUser\",\n \"user\": {\n \"userId\": \"f9b2507d-c757-4c9a-9e96-0002299fa2f7\",\n \"companyId\": \"eb869cf0-af11-4bdb-853c-fd2616bc91f2\",\n \"exitDate\": \"2023-09-09\",\n \"personalEmail\": \"mm@aa.ll\",\n \"finalPayCheckType\": \"They have already been paid\",\n \"terminationChoice\": \"No - This user did not choose to leave\",\n \"dismissalType\": \"Layoff\",\n \"severance\": true,\n \"severancePaymentType\": \"Yes, it will be a one time severance payment\",\n \"severancePaymentFrequency\": \"Weekly, every Friday\",\n \"firstSeverancePayDate\": \"2023-09-09\",\n \"lastSeverancePayDate\": \"2023-12-12\",\n \"severanceAmount\": 2333,\n \"additionalNotes\": \"terminated due to recession\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.rollfi.xyz/adminPortal/terminateUser")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"terminateUser\",\n \"user\": {\n \"userId\": \"f9b2507d-c757-4c9a-9e96-0002299fa2f7\",\n \"companyId\": \"eb869cf0-af11-4bdb-853c-fd2616bc91f2\",\n \"exitDate\": \"2023-09-09\",\n \"personalEmail\": \"mm@aa.ll\",\n \"finalPayCheckType\": \"They have already been paid\",\n \"terminationChoice\": \"No - This user did not choose to leave\",\n \"dismissalType\": \"Layoff\",\n \"severance\": true,\n \"severancePaymentType\": \"Yes, it will be a one time severance payment\",\n \"severancePaymentFrequency\": \"Weekly, every Friday\",\n \"firstSeverancePayDate\": \"2023-09-09\",\n \"lastSeverancePayDate\": \"2023-12-12\",\n \"severanceAmount\": 2333,\n \"additionalNotes\": \"terminated due to recession\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "user": {
    "userId": "f9b2507d-c757-4c9a-9e96-0002299fa2f7",
    "status": "Inactive",
    "message": "The User has been terminated successfully."
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
method
string
required
Example:

"terminateUser"

user
object
required

Response

user
object
required