Skip to main content
GET
/
customers
/
{customerID}
/
users
/
{userID}
Get Customer User By ID
curl --request GET \
  --url https://api.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID}', 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.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

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

curl_close($curl);

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

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

func main() {

	url := "https://api.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.joinworth.com/auth/api/v1/customers/{customerID}/users/{userID}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "Success",
  "data": {
    "id": "94520740-d63c-4e02-85ca-c4e138801e73",
    "first_name": "Sandbox",
    "last_name": "CRO",
    "email": "dummy.customer.user@email.com",
    "mobile": null,
    "is_email_verified": false,
    "is_first_login": true,
    "created_at": "2024-02-12T14:16:49.053328",
    "created_by": "b03d6f6a-063b-4e71-8195-9f6f590a6257",
    "updated_at": "2024-02-12T14:16:49.053328",
    "updated_by": "b03d6f6a-063b-4e71-8195-9f6f590a6257",
    "status": "ACTIVE",
    "company_details": {
      "id": "2e6438cb-ec3f-4e94-b5c9-8c058d2efaf1",
      "name": "Sandbox",
      "contact_number": null,
      "is_active": true,
      "created_at": "2024-02-12T09:26:48.247698",
      "created_by": "9e18e65b-8ab5-48fd-87ad-3b586146a00f",
      "updated_at": "2024-02-12T09:26:48.247698",
      "updated_by": "9e18e65b-8ab5-48fd-87ad-3b586146a00f"
    },
    "subrole": {
      "id": "f1fa445c-743b-4a0e-ad54-bb9294c41005",
      "code": "cro",
      "label": "CRO",
      "role_id": 2,
      "display_name": "CRO"
    }
  }
}
{
  "message": "Error occurred",
  "errorCode": "ERR_INTERNAL_SERVER"
}
{
  "message": "Unauthorized",
  "errorCode": "ERR_UNAUTHORIZED"
}
{
  "message": "Forbidden",
  "errorCode": "ERR_FORBIDDEN"
}
{
  "status": "fail",
  "message": "Customer user Not Found",
  "errorCode": "NOT_FOUND",
  "data": {
    "errorName": "CustomersApiError"
  }
}
{
  "message": "Internal Server Error",
  "errorCode": "ERR_INTERNAL_SERVER"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

customerID
string<uuid>
required
userID
string<uuid>
required

Response

OK

status
string
message
string
data
object