Get user

api-docs Redoc document (api spec)

Get user by ID or email

get
Authorizations
Path parameters
id_or_emailstringRequired

ID or email of the user to retrieve

Responses
200
Successful response
application/json
get
GET /api/user/{id_or_email} HTTP/1.1
Host: url to be defined
Authorization: YOUR_API_KEY
Accept: */*
{
  "error": {
    "code": "040",
    "message": "User not found"
  },
  "data": {
    "user": {
      "_id": "MMGqKihnmmqyTgAy",
      "email": "[email protected]",
      "wallet": "CBVE3R2ZV2UWTEXROOVT5GKWOQ5HULDPMEUJWCSA5JEWVTISCNHU3KJHWU",
      "user_role": "admin",
      "user_company": "63c04c071ad80d5322929cb1",
      "user_company_txn": "63c04c071ad80d5322929cb1"
    }
  }
}

This API endpoint allows you to retrieve a user's information by either their ID or email. You can make a GET request to "/api/user/{id_or_email}" where "id_or_email" is the user's ID or email you want to retrieve information for.

Security: The API requires an API key to access this endpoint, which can be a "normal", "partner", or "admin" key.

Request Parameters:

  • "id_or_email": Required. This parameter should be the user's ID or email.

Response:

  • On success, a 200 response with a JSON body is returned with the user information. The JSON body will include an error object with a code and message, and a data object with the user information.

  • On failure, a 404 response will be returned if the user cannot be found.

Note: The schema for the user information returned in the JSON response is described in the "properties" field of the "data" object in the response.

Last updated