Your first request

Sending a "Who Am I" request

A good place to start getting familiar with our API is by sending a request to the Who am I endpoint.

A successful request to this endpoint returns information about the user whose credentials have been used to authenticate the request, including the following:

  • First Name
  • Last Name
  • Username
  • A list of merchants to which the user has access rights

To send a whoAmI request, do the following:

  1. Generate your basic authentication for the API user by doing the following:

    a. Open a Unix prompt, such as Cygwin (on Windows) or Terminal (on Mac OS X).

    b. Type the following, replacing "username" and "password" with your own authentication for the sandbox environment:

    echo -n username:password | base64

    c. Copy the result and paste to a text editor for later use.

  2. Send a GET request to the Who am I endpoint. The example below uses cURL for sending the request.

    Example Request
    curl -X GET \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
    Example 200 Response
      "apiKey": "v3:9876543210",
      "dateCreated": "2018-09-27T14:27:39.626Z",
      "accountId": "1234-5678-90",
      "lastName": "Doe",
      "dateLastModified": "2019-03-08T00:58:27.893Z",
      "userName": "[email protected]",
      "firstName": "John",
      "enabled": true,
      "cognitoSub": "g52679a2-tan5-4a56-b6gc-2592aedd373e",
      "isEnabledForVTerm": false,
      "role": "A",
      "subtypeId": "USER#[email protected]",
      "phone": "15555555555",
      "isApiUser": true,
      "accessRights": {
        "merchantIds": {
          "100039": "A"
        "role": "A"