# SCIM User type examples

## Operations

This page shows the operations that can be performed for the user type object

### List all

##### Request

```MarkDown
GET https://<your-domain>/soffid/webservice/scim2/v1/UserType
```

##### Response 200 OK

```JSON
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 3,
    "startIndex": 1,
    "Resources": [
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/UserType/29",
                "resourceType": "UserType"
            },
            "unmanaged": false,
            "schemas": [
                "urn:soffid:com.soffid.iam.api.UserType"
            ],
            "name": "S",
            "description": "SSO account (USE IT)",
            "id": 29
        },
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/UserType/31",
                "resourceType": "UserType"
            },
            "unmanaged": false,
            "schemas": [
                "urn:soffid:com.soffid.iam.api.UserType"
            ],
            "name": "E",
            "description": "External user",
            "id": 31
        },
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/UserType/33",
                "resourceType": "UserType"
            },
            "unmanaged": false,
            "schemas": [
                "urn:soffid:com.soffid.iam.api.UserType"
            ],
            "name": "I",
            "description": "Internal user",
            "id": 33
        }
    ]
}
```

### List by filter

List all user types with a filter expression.

<p class="callout info">It is allowed to use pagination and sort the information, for more information visit the [Sorting](https://bookstack.soffid.com/link/116#bkmrk-sorting) and [Pagination](https://bookstack.soffid.com/link/116#bkmrk-pagination) information.</p>

##### Request

```MarkDown
GET https://<your-domain>/soffid/webservice/scim2/v1/UserType?filter=description co sso
```

##### Response 200 OK

```JSON
{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 1,
    "startIndex": 1,
    "Resources": [
        {
            "meta": {
                "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/UserType/29",
                "resourceType": "UserType"
            },
            "unmanaged": false,
            "schemas": [
                "urn:soffid:com.soffid.iam.api.UserType"
            ],
            "name": "S",
            "description": "SSO account (USE IT)",
            "id": 29
        }
    ]
}
```

### Query by id

Query a user type by its id (primary key).

##### Request

```MarkDown
GET https://<your-domain>/soffid/webservice/scim2/v1/UserType/33
```

##### Response 200 OK

```JSON
{
    "meta": {
        "location": "http://soffid.pat.lab:8080/soffid/webservice/scim2/v1/UserType/33",
        "resourceType": "UserType"
    },
    "unmanaged": false,
    "schemas": [
        "urn:soffid:com.soffid.iam.api.UserType"
    ],
    "name": "I",
    "description": "Internal user",
    "id": 33
}
```

### Create

#### Request

```XML
POST https://<your-domain>/soffid/webservice/scim2/v1/UserType
```

**JSON**

```JSON
{
    "schemas": [
        "urn:soffid:com.soffid.iam.iga.api.UserType"
    ],
    "name": "O",
    "description": "Other user",
    "managed": false
}
```

##### Response 201 Created

```JSON
{
  "updatedBy": "admin",
  "createdBy": "admin",
  "managed": false,
  "meta": {
    "location": "https://console.soffid4.local:8443/soffid/webservice/scim2/v1/UserType/24555",
    "resourceType": "UserType"
  },
  "schemas": [
    "urn:soffid:com.soffid.iam.iga.api.UserType"
  ],
  "name": "O",
  "description": "Other user",
  "id": 24555,
  "updatedOn": "2026-03-06 08:53:08.447",
  "createdOn": "2026-03-06 08:53:08.447"
}
```

### Update partial

Only attributes with changes will be updated, the other will maintain the same value.

##### Request

```
PATCH https://<your-domain>/soffid/webservice/scim2/v1/UserType/24555
```

**JSON**

```JSON
{
    "schemas": [
        "urn:soffid:com.soffid.iam.iga.api.UserType"
    ],
    "Operations": [
        {
            "op": "replace",
            "path": "name",
            "value": "OT"
        }
    ]
}
```

##### Response 200 OK

```JSON
{
  "updatedBy": "admin",
  "createdBy": "admin",
  "managed": false,
  "meta": {
    "location": "https://console.soffid4.local:8443/soffid/webservice/scim2/v1/UserType/24555",
    "resourceType": "UserType"
  },
  "schemas": [
    "urn:soffid:com.soffid.iam.iga.api.UserType"
  ],
  "name": "OT",
  "description": "Other user",
  "id": 24555,
  "updatedOn": "2026-03-06 08:56:26.711",
  "createdOn": "2026-03-06 08:53:08"
}
```

### Update all

This operation replaces all values in the roole.

- Note that the attribute id is required to confirm that the resource "...UserType/&lt;id&gt;" is the same that the JSON user type.
- Note that all the attributes not included in the request will be cleared in the user type and their data will be lost.
- Note that not all the attributes are updatable, for example, tag meta, avoid these tags. For more information see [Resource data model page](https://bookstack.soffid.com/books/scim/chapter/resource-data-model-schema)

##### Request

```XML
PUT https://<your-domain>/soffid/webservice/scim2/v1/UserType/1976718
```

**JSON**

```JSON
{
    "schemas": [
        "urn:soffid:com.soffid.iam.base.api.UserType"
    ],
    "id": 24555,
    "name": "OY"
}
```

##### Response 200 OK

```JSON
{
  "updatedBy": "admin",
  "managed": true,
  "meta": {
    "location": "https://console.soffid4.local:8443/soffid/webservice/scim2/v1/UserType/24555",
    "resourceType": "UserType"
  },
  "schemas": [
    "urn:soffid:com.soffid.iam.iga.api.UserType"
  ],
  "name": "OY",
  "id": 24555,
  "updatedOn": "2026-03-06 08:57:31.781"
}
```

### Delete

<p class="callout warning">Please note after this delete, the user type has to be created again to use it in the next examples.</p>

##### Request

```MarkDown
DELETE https://<your-omain>/soffid/webservice/scim2/v1/UserType/24555
```

##### Response 204 No Content

```
204 No Content
```

### Error response

<p class="callout info">For more information about error response visit [https://bookstack.soffid.com/link/116#bkmrk-error-response](https://bookstack.soffid.com/link/116#bkmrk-error-response)</p>