简体   繁体   中英

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

In the DocuSign Admin API updateUsers request (s. link), the site_ID field is a mandatory field. Unfortunately, I couldn't find any documentation on this field anywhere. Can someone answer the meaning of the field and what values it can take?

https://developers.docusign.com/docs/admin-api/reference/usermanagement/esignusermanagement/updateuser/

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM