What is the meaning of the site_ID field in the DocuSign Admin API

Viewed 33
2 Answers

in developer env you always put "1" in production:

  • "1" for na1
  • "2" for na2
  • "3" for na3
  • "4" for eu
  • "5" for au
  • "6" for ca
  • "7" for na4

The following code worked for me and it seems to be a more fool-proof way than hard-coded constants to get the SiteId, whatever it may be:

// fetch user's full profile info by email as an example
// only GetUserProfiles will return SiteId required by UpdateUser;
// GetUsers does not return SiteId
var getUsersOptions = new UsersApi.GetUserProfilesOptions
{
    email = person.LoginEmail.ToLower()
};

var users = await usersApi.GetUserProfilesAsync(options.OrganizationId, getUsersOptions);

if (users.Users.Count == 0)
{
    return false;
}

var user = users.Users.Single();

var request = new UpdateUsersRequest
{
    Users = new List<UpdateUserRequest> {
        new UpdateUserRequest {
            // mandatory fields
            Id = user.Id,
            SiteId = user.SiteId,
            
            // all the updated values follow
            // a caveat - it does not have a phone number, you have to use bulk APIs to update that :(


And yeah, it required some serious digging into the nuget SDK to find out because DocuSign documentation is pretty inconsistent at times (UserTitle is being used as job title, APIUserName is actually storing user's ID etc.).

Related