Global Users

Global user refers to a user account or profile that has access to all functionalities, features, or resources within the system.

In Su, Global users:

  1. Are defined as users who can access all the properties and can view details of properties as per their convenience.

  2. Allow partner to create multiple users for a property to access Su extranet.

  3. Assign specific properties to the user.

Endpoint

POST

https://connect-sandbox.su-api.com/SUAPI/jservice/users

Attributes

Name string (Required)

This field specifies the name of the user.


Email email (Required)

This field specifies the email id of the user.

Valid email address required as reset link is triggered to registered email address.


Phone array (Required)

This field is an array which has multiple fields such as CountryCode and PhoneNumber.


CountryCode string (Required)

Country code of the user’s phone number.


PhoneNumber string (Required)

Phone number of user.


Status string (Required)

Status of the user whether it’s active or inactive.

Active status indicates user can access extranet. Inactive remove user's access to SU extranet.


Type string (Required)

Type of the user.

There are two types of users:

  • Global

  • Chain


Properties string (Required)

Specifies property(s) to be assigned/linked to global user.

Add the property id as the value in the request.

Sample Request

{
  "Name": "Noah Brown",
  "Email": "admin@examplehotel.co.nz",
  "Phone": {
    "CountryCode": "+64",
    "PhoneNumber": "211234567"
  },
  "Status": "Active",
  "Type": "Global",
  "Properties": [
    "Property ABC",
    "Test Property"
  ]
}

Response

Sample Success Response

{
  "Status": "Success"
}

Error

This error will occur when 'type' of user is not specified in the request.

Sample Error Response (990)

{
  "Status": "Fail",
  "Errors": {
    "Code": "990",
    "ShortText": "User type must be either 'Global' or 'Chain'"
  }
}

Error

This error will occur when 'property name' field does not contain any valid property name or is empty in the request.

Sample Error Response (992)

{
  "Status": "Fail",
  "Errors": {
    "Code": "992",
    "ShortText": "Please provide valid property ids"
  }
}

Error

This error will occur when valid Email-ID is not passed in the request.

Sample Error Response (989)

{
  "Status": "Fail",
  "Errors": {
    "Code": "989",
    "ShortText": "Enter valid email"
  }
}

Error

This error will occur when valid country code is not passed or if the field is empty in the request.

Sample Error Response (991)

{
  "Status": "Fail",
  "Errors": {
    "Code": "991",
    "ShortText": "Enter valid countrycode"
  }
}

Error

This error will occur when valid phone/contact number is not passed or if the field is empty in the request.

Sample Error Response (988)

{
  "Status": "Fail",
  "Errors": {
    "Code": "988",
    "ShortText": "Enter valid phone number"
  }
}

Last updated

Was this helpful?