curl -X POST "https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get" \
--header "Authorization: Bearer your-jwt-token" \
--header "Content-Type: application/json" \
--header "Accept-Language: en" \
-d '{
"userId": 8,
"merchantAccountNumber": 35253486
}'import requests
url = "https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get"
payload = {
"userId": "8",
"merchantAccountNumber": 35253486
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '8', merchantAccountNumber: 35253486})
};
fetch('https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get', 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://api.onekhusa.com/sandbox/v1/security/merchantUsers/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '8',
'merchantAccountNumber' => 35253486
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.onekhusa.com/sandbox/v1/security/merchantUsers/get"
payload := strings.NewReader("{\n \"userId\": \"8\",\n \"merchantAccountNumber\": 35253486\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"8\",\n \"merchantAccountNumber\": 35253486\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"8\",\n \"merchantAccountNumber\": 35253486\n}"
response = http.request(request)
puts response.read_body{
"userId": "user-id-123",
"firstName": "John",
"lastName": "Phiri",
"emailAddress": "john.phiri@onekhusa.com",
"phoneNumber": "0881234567",
"isEmailConfirmed": true,
"roleName": "Merchant Administrator",
"statusCode": "A",
"statusName": "Active",
"capturedBy": "admin@onekhusa.com",
"dateCaptured": "2025-11-13T07:11:09.746Z",
"modifiedBy": "admin@onekhusa.com",
"dateModified": "2025-11-13T07:11:09.746Z"
}Get User
This endpoint retrieves account details of a specific user.
curl -X POST "https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get" \
--header "Authorization: Bearer your-jwt-token" \
--header "Content-Type: application/json" \
--header "Accept-Language: en" \
-d '{
"userId": 8,
"merchantAccountNumber": 35253486
}'import requests
url = "https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get"
payload = {
"userId": "8",
"merchantAccountNumber": 35253486
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '8', merchantAccountNumber: 35253486})
};
fetch('https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get', 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://api.onekhusa.com/sandbox/v1/security/merchantUsers/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '8',
'merchantAccountNumber' => 35253486
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.onekhusa.com/sandbox/v1/security/merchantUsers/get"
payload := strings.NewReader("{\n \"userId\": \"8\",\n \"merchantAccountNumber\": 35253486\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"8\",\n \"merchantAccountNumber\": 35253486\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onekhusa.com/sandbox/v1/security/merchantUsers/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"8\",\n \"merchantAccountNumber\": 35253486\n}"
response = http.request(request)
puts response.read_body{
"userId": "user-id-123",
"firstName": "John",
"lastName": "Phiri",
"emailAddress": "john.phiri@onekhusa.com",
"phoneNumber": "0881234567",
"isEmailConfirmed": true,
"roleName": "Merchant Administrator",
"statusCode": "A",
"statusName": "Active",
"capturedBy": "admin@onekhusa.com",
"dateCaptured": "2025-11-13T07:11:09.746Z",
"modifiedBy": "admin@onekhusa.com",
"dateModified": "2025-11-13T07:11:09.746Z"
}Authorizations
Bearer authentication header of the form Bearer Token, Where accessToken is the access token used to authenticate the request.
Headers
Preferred language for the response
Body
Response
Success - Merchant user details retrieved
The unique identifier of the user
"user-id-123"
The first name of the user
"John"
The last name of the user
"Phiri"
The email address of the user
"john.phiri@onekhusa.com"
The phone number of the user. May be an empty string if not set
"1234567890"
Indicates whether the user's email address has been confirmed
true
The human-readable description of the user's role
"Merchant Administrator"
The status code of the merchant user account (e.g., "A" for Active, "I" for Inactive, "C" for Closed)
"A"
The human-readable status name of the merchant user account
"Active"
The email of the user who created this merchant user association
"user@onekhusa.com"
The date and time when the merchant user association was created in UTC format
"2025-11-01T10:30:00.000Z"
The email of the user who last modified the merchant user. May be null or empty if never modified
"user@onekhusa.com"
The date and time when the merchant user was last modified in UTC format. May be null if never modified
"2025-11-03T09:15:00.000Z"