Your first request

Key concepts covered
  • Understanding Core Functionality
  • Developing Practical Skills
  • Applying Best Practices
  • Troubleshooting Common Issues
  • Integrating Components
  • Lifecycle Management
DifficultyEstimated timePlatformsTechnologies used
Easy difficulty level10 minWindows Apple UnixcUrl
Before getting started with your first request, make sure you understand the following topics from the Quick start section:

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 it 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.

    curl -X GET \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'

        "userName": "[email protected]",
        "accountType": "MERCHANT",
        "enabled": true,
        "firstName": "John",
        "lastName": "Doe",
        "phone": "15555555555",
        "address1": "2147 West Silverlake Drive",
        "address2": "Ste. 42",
        "city": "Scranton",
        "state": "PA",
        "postalCode": "18503",
        "country": "US",
        "businessLegalName": "[Business legal name]",
        "billingContactFullName": "John Doe",
        "billingContactPhone": "15555555555",
        "billingContactEmail": "[email protected]",
        "isApiUser": true,
        "isEnabledAuthorizedStatus": false,
        "isEnabledForCybersourceAccountUpdater": false,
        "isEnabledForAccountUpdater": false,
        "accessRights": {
          "merchantIds": {
            "100039": "A"
          "role": "A"
        "payoutAccessRights": {
          "3927": "A"
        "loginInfo": {
          "count": 5,
          "lastLogin": "2023-05-26T23:12:02.571Z"
        "notifications": {
          "chargebacks": true,
          "largeExports": true,
          "fraud": true,
          "payoutBatches": true
        "role": "string",
        "dateCreated": "2018-09-27T14:27:39.626Z",
        "dateLastModified": "2019-03-08T00:58:27.893Z",
        "accountId": "[account_id]",
        "cognitoSub": "[cognito_sub]",
        "isEnabledForVTerm": true,
        "shouldShowPlatformAgreement": true,
        "shouldShowPricingAgreement": true

See Also

For additional information about users, see the following:

  • Sandbox environments - For information about the Sandbox environment and the features referenced in the "WhoAmI" endpoint response.
  • User roles - For information about the different types of roles referenced in the response.
  • Authentication - For information about the different ways to authenticate with the Nexio APIs.