Replacement
The following request shows how to replace a user. Notice that compared with the request to create a user the unique user identifier is required in this request.
POST https://<base-address>/scim/Users/{user-id}
2Content-Type: application/json
3
4{
5    "schemas": [
6        "urn:ietf:params:scim:schemas:core:2.0:User",
7        "urn:ietf:params:scim:schemas:extension:puzzel:2.0:User"
8    ],
9    "id": "<user-id>",
10    "userName": "bea.oproblem@example.com",
11    "active": true,
12    "displayName": "Bea O’Problem",
13    "externalId": "e5c2ce33-b081-4a73-9dbc-2a669e7948ad",
14    "name": {
15        "formatted": "Bea O’Problem",
16        "familyName": "O'Problem",
17        "givenName": "Bea"
18    },
19    "emails": [
20        {
21            "Primary": true,
22            "type": "work",
23            "value": "bea.oproblem@example.com"
24        }
25    ],
26    "preferredLanguage": "no-nb",
27    "urn:ietf:params:scim:schemas:extension:puzzel:2.0:User": {
28        "customerId":"<customer-id>",
29        "contactCentreSolutions":[
30            {
31                "value": "<solution-id>",
32                "type": "main",
33                "primary": "true",
34                "customerId": "<customer-id>",
35                "platform": "PCC",
36                "userName": "bea",
37                "userGroupName": "Agents",
38                "createUserGroupIfNotExists": true
39            }
40        ]
41    }
42}
Patching - change primary solution
Below is an example to change the primary contact centre solution for a user to the solution with type “main”.
PATCH https://<base-address>/scim/Users/{user-id}
2Content-Type: application/json
3
4{
5    "schemas": [
6        "urn:ietf:params:scim:api:messages:2.0:PatchOp",
7        "urn:ietf:params:scim:schemas:extension:puzzel:2.0:User"
8    ],
9    "Operations": [
10        {
11            "op": "replace",
12            "path": "urn:ietf:params:scim:schemas:extension:puzzel:2.0:User.contactCentreSolutions[platform eq \"PCC\" and type eq \"main\"].primary",
13            "value": true
14        }
15    ]
16}
Patching - change username
The following request shows how to change the user name for a user and change the customer id to 13000.
PATCH https://<base-address>/scim/Users/{user-id}
2Content-Type: application/json
3
4{
5    "schemas": [
6        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
7    ],
8    "Operations": [
9        {
10            "op": "replace",
11            "path": "userName",
12            "value": "bea@oproblem.invalid"
13        },
14        {
15            "op": "replace",
16            "path": "title",
17            "value": "Director"
18        }
19    ]
20}