Update a user

Updates attributes for an existing user in Perk, overwriting values for specified attributes. Attributes that are not provided in the request remain unchanged.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Modifies attributes for an existing user in Perk, overwriting values for the attributes you specify. Attributes you don't include in the request stay unchanged.

The PATCH request body follows the SCIM specification.

Perk supports these operations:

  • add
  • remove
  • replace

For array attributes, Perk supports only the eq filter.
For example:

  • "path": 'phoneNumbers[type eq "work"].value'
⚠️

Warning

These required fields must not be null or empty: userName, name.givenName, name.familyName, and active.

Example request bodies:

{
   "schemas":"urn:ietf:params:scim:api:messages:2.0:PatchOp",
   "Operations":[
      {
         "op":"add",
         "path":"manager",
         "value":{
            "value":"1233"
         }
      },
      {
         "op":"add",
         "path":"title",
         "value":"Engineer"
      },
      {
         "op":"remove",
         "path":"phoneNumbers"
      },
      {
         "op":"replace",
         "path":"emergencyContact",
         "value":{
            "name":"Jane Goodie",
            "phone":"+34 9874637"
         }
      }
   ]
}
{
   "schemas":"urn:ietf:params:scim:api:messages:2.0:PatchOp",
   "Operations":[
      {
         "op":"replace",
         "path":"active",
         "value":false
      }
   ]
}
{
   "schemas":"urn:ietf:params:scim:api:messages:2.0:PatchOp",
   "Operations":[
      {
         "op":"replace",
         "path":"company",
         "value":"My New Company Name"
      }
   ]
}
{
   "schemas":"urn:ietf:params:scim:api:messages:2.0:PatchOp",
   "Operations":[
      {
         "op":"replace",
         "path":"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:manager",
         "value":{
            "value":"4567"
         }
      }
   ]
}
{
   "schemas":"urn:ietf:params:scim:api:messages:2.0:PatchOp",
   "Operations":[
      {
         "op":"replace",
         "path":"urn:ietf:params:scim:schemas:extension:travelperk:2.0:User:lineManagerEmail",
         "value":"[email protected]"
      }
   ]
}
{
  "schemas": "urn:ietf:params:scim:api:messages:2.0:PatchOp",
  "Operations": [
    {
      "op": "replace",
      "path": "urn:ietf:params:scim:schemas:extension:expense:2.0:User:policyId",
      "value": "expense-policy-2"
    }
  ]
}
📘

Note

For most attributes, the add operation behaves the same as replace. For the multi-valued invoiceProfiles and approvers fields, add appends a new value to the list. The approvers field is deprecated — use manager (enterprise extension) or lineManagerEmail (Perk extension) instead.


Path Params
int32
required

Unique user identifier. The value is generated by Perk and returned during user creation.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json