Accessing the SCIM API

The base URL for all calls to the SCIM API is https://{yourdomain}.saleshood.com/scim/v2/. All SCIM methods are branches of this base URL.

A SCIM token is required to access the SCIM API. This token can be acquired in your company settings page: https://{yourdomain}.saleshood.com/settings/integrations

User must be a Company Admin role to access token.

SCIM API endpoints

Service Provider Configuration

GET /scim/v2/ServiceProviderConfig

Returns SalesHood’s configuration details for our SCIM API, including which operations are supported.

ResourceTypes

GET /scim/v2/ResourceTypes

Return the types of resources available on SalesHood’s SCIM service. Each resource type defines the endpoints, the core schema URI that defines the resource, and any supported schema extensions.

GET /scim/v2/ResourceTypes/User

Return the User resource type.

Schemas

SalesHood currently supports schemas for users. Querying the schemas will provide the most up-to-date rendering of the supported SCIM attributes.

GET /scim/v2/Schemas

Returns all configuration details

GET /scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User

Returns SalesHood’s configuration details for how users are formatted.

GET /scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:ResourceType

Specifies the schema that describes a SCIM resource type.

GET /scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:Schema

Specifies the schema that describes a SCIM schema.

Users

User attributes

Attributes are the details associated with a user’s account. These are the details that someone would typically set in their profile.

The following tables map SCIM attributes to the profile fields that SalesHood uses:

SalesHood Profile FieldSCIM AttributeRequired
EmailuserNameTrue
ActiveactiveFalse
TitletitleFalse
First Namename['givenName']False
Last Namename['familyName']False
Manager urn:ietf:params:scim:schemas:extension:enterprise:2.0:User['manager']['managerId']
or
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User['manager']['value']
False
Segment urn:ietf:params:scim:schemas:extension:enterprise:2.0:User['department']False

Group


urn:ietf:params:scim:schemas:extension:enterprise:2.0:User['division']

False

User methods

GET /scim/v2/Users

GET /scim/v2/Users/?startIndex=4&count=500 HTTP/1.1
Host: saleshood.saleshood.com
Accept: application/json
Authorization: Bearer QvpuCY1bYYUF5Na5lCrrGrCIDkmh4pXj

GET /scim/v2/Users/:id

Retrieves a single user resource. The value of the :id should be the user’s corresponding SalesHood ID.

GET /scim/v2/Users/709 HTTP/1.1et
Host: saleshood.saleshood.com
Accept: application/json
Authorization: Bearer QvpuCY1bYYUF5Na5lCrrGrCIDkmh4pXj

POST /scim/v2/Users

Creates a user. Must include the userName attribute.

This example request body provides a detailed example of which attributes SalesHood uses


{
  “schemas”: [“urn:scim:schemas:core:2.0”, “urn:scim:schemas:extension:enterprise:2.0”],
  “userName”: “firstname_lastname@email.com”,
  “active”: true,
  “name”: {
    “givenName”: “First”,
    “familyName”: “Last”
  },
  “title”: “Manager”,
  “urn:ietf:params:scim:schemas:extension:enterprise:2.0:User”:{
    “manager”:{
    “managerId”: 1234
    },
  “department”: “My Segment Name”,
  “division”: “My group name”
  }
}

  • managerID: Id of a user who would be manager of the newly created user. This can be retrived by hover over a user’s name in user management page.  The Id of a user can also be found in the URL of a user’s profile page in SalesHood.
  • value:Email of a user who would be manager of the newly created user.

Note: only need to provide either a managerId or a value

  • department: The segment name which the newly created user will be assigned to.
  • division: The group name which the newly created user will be assigned to.  Currently, only one group can be assigned per call.

PATCH /scim/v2/Users/:id

Updates an existing user resource, overwriting values for specified attributes. Attributes that are not provided will remain unchanged.

Disabled users can be re-enabled by sending active attribute equal to true. The value of the :id should be the user’s corresponding SalesHood ID

{
“schemas” : [“urn:ietf:params:scim:schemas:extension:enterprise:2.0:User”],
“Operations”:[
  {
    “op”:”replace”,
    “path”:”title”,
    “value”:”new Title”
  },
  {
    “op”:”replace”,
    “path”:”name.givenName”,
    “value”:”New first name”
  }
  ]
}

PUT /scim/v2/Users/:id

Updates an existing user resource, overwriting all values for a user even if an attribute is empty or not provided.

Deactivated users can be re-enabled by setting the active attribute to true. The value of the :id should be the user’s corresponding SalesHood ID.

{
  "schemas": [
    "urn:scim:schemas:core:2.0"
  ],
  "active": false,
  "userName": "other_username",
  "name": {
    "givenName": "a new first name",
    "familyName": "a new last name"
  },
  "title": "Manager"
}

DELETE /scim/v2/Users/:id

Sets a SalesHood user to deactivated and hides this user from all future requests. The value of the :id should be the user’s corresponding SalesHood ID


DELETE /scim/v2/Users/42 HTTP/1.1
Host: saleshood.saleshood.com
Accept: application/json
Authorization: Bearer QvpuCY1bYYUF5Na5lCrrGrCIDkmh4pXj

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.