Skip to content

5. Add users to your company

The term company can used to represent a TMC or a partner organization. As an administrator, use the create user API to onboard users to your company (can be used for both the TMC and organization).

Here's a sample request from the create user API endpoint:

{
  "persona": "EMPLOYEE",
  "personalInfo": {
    "title": "MS",
    "gender": "FEMALE",
    "name": {
      "given": "Rachel",
      "middle": "Anne",
      "family1": "Torres"
    },
    "dob": {
      "iso8601": "1988-03-22"
    },
    "email": "rachel.torres@example.com",
    "addresses": [
      {
        "addressLines": ["450 Lexington Avenue"],
        "locality": "New York",
        "administrativeArea": "NY",
        "postalCode": "10017",
        "regionCode": "US",
        "isDefault": true
      }
    ],
    "emergencyContact": {
      "name": "Marco Torres",
      "relation": "SPOUSE",
      "phoneNumbers": [
        {
          "type": "MOBILE",
          "countryCode": 1,
          "isoCountryCode": "US",
          "nationalNumber": 2125550187
        }
      ]
    }
  },
  "businessInfo": {
    "email": "rachel.torres@acmecorp.com",
    "employeeId": "EMP-20391",
    "workerType": "EMPLOYEE",
    "organizationRef": {
      "id": "a3f8c1d2-7b45-4e29-9f61-8c3d2e1a5b74"
    },
    "legalEntityRef": {
      "id": "d7e2b309-1c84-4f73-a562-3e9f1d8c7a20"
    }
  }
}

When creating a user:

  • The persona, name, legalEntityRef.id, and organizationRef.id are mandatory fields. You can always update the other profile parameters later.
  • We recommend providing the businessInfo.email as it acts as a primary identifier when searching for users within the platform using find user API.

Response:

{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Upon completion of this step, you will have:

  • Added test travelers to your company whose profiles can be used to make air bookings via the Spotnana platform (in the sandbox environment).