# Models

## The AccessControlMetadataQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"AccessControlMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Access control document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the access control was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the access control was last modified.","format":"date-time"}},"description":"Access control metadata."}}}}
```

## The AccessControlQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"AccessControlQueryDocument":{"type":"object","description":"Definition of access control","properties":{"id":{"type":"string","description":"Assignment unique identifier generated when the assignment is created."},"roleId":{"type":"string","description":"Role unique identifier associated with this access control."},"resourceId":{"type":"string","description":"Resource unique identifier associated with this access control."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource name in the form of a map of translations."},"role":{"$ref":"#/components/schemas/RoleQueryDocument"},"resource":{"$ref":"#/components/schemas/ResourceQueryDocument"},"metadata":{"$ref":"#/components/schemas/AccessControlMetadataQueryDocument"},"scopes":{"type":"array","description":"A list of resolved scopes for a particular access control.","items":{"type":"string"}},"restrictionAware":{"type":"boolean","description":"Determines whether this access control generates scopes with restriction suffixes when assigned to a group that has restrictions defined. When `true`, the generated scopes will include restrictions (e.g. order.`order_manage--DE`) based on the group's restrictions list. When `false`, scopes are generated without restriction suffixes regardless of the group's restrictions."}}},"RoleQueryDocument":{"type":"object","description":"Role definition associated with this access control.","properties":{"id":{"type":"string","description":"Role unique identifier generated when the role is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role description in the form of a map of translations."},"permissions":{"type":"array","description":"Permissions unique identifier list declared for this role.","items":{"$ref":"#/components/schemas/RolePermissionsDocument"}},"metadata":{"$ref":"#/components/schemas/RolesMetadata"}}},"RolePermissionsDocument":{"type":"object","description":"Role permissions list.","title":"","properties":{"applicablePermissionResources":{"type":"array","description":"Allows you to allowlist resources that the permission is applicable to. Can only contain resources specified in the permission document under `applicableResources`.\n","items":{"type":"string"}},"id":{"type":"string","description":"Reference to the permission document with specific resources defined."}},"required":["id"]},"RolesMetadata":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Role document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the role was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the role was last modified.","format":"date-time"}}},"ResourceQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Resource unique identifier generated when the resource is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource description in the form of a map of translations."},"code":{"type":"string","description":"Resource unique code identifier."},"metadata":{"$ref":"#/components/schemas/ResourcesMetadataQueryDocument"}},"description":"Resource definition associated with this access control."},"ResourcesMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Resource document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the resource was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the resource was last modified.","format":"date-time"}},"description":"Resource metadata."},"AccessControlMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Access control document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the access control was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the access control was last modified.","format":"date-time"}},"description":"Access control metadata."}}}}
```

## The TemplateQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"TemplateQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Role template unique identifier generated when the role template is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role template name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role template description in the form of a map of translations."},"accessControls":{"type":"array","description":"Access controls unique identifiers associated with this role template.","items":{"type":"string"}},"accessControlsDocuments":{"type":"array","description":"Expanded Access controls documents","items":{"$ref":"#/components/schemas/AccessControlQueryDocument"}}},"description":"Definition of role template"},"AccessControlQueryDocument":{"type":"object","description":"Definition of access control","properties":{"id":{"type":"string","description":"Assignment unique identifier generated when the assignment is created."},"roleId":{"type":"string","description":"Role unique identifier associated with this access control."},"resourceId":{"type":"string","description":"Resource unique identifier associated with this access control."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource name in the form of a map of translations."},"role":{"$ref":"#/components/schemas/RoleQueryDocument"},"resource":{"$ref":"#/components/schemas/ResourceQueryDocument"},"metadata":{"$ref":"#/components/schemas/AccessControlMetadataQueryDocument"},"scopes":{"type":"array","description":"A list of resolved scopes for a particular access control.","items":{"type":"string"}},"restrictionAware":{"type":"boolean","description":"Determines whether this access control generates scopes with restriction suffixes when assigned to a group that has restrictions defined. When `true`, the generated scopes will include restrictions (e.g. order.`order_manage--DE`) based on the group's restrictions list. When `false`, scopes are generated without restriction suffixes regardless of the group's restrictions."}}},"RoleQueryDocument":{"type":"object","description":"Role definition associated with this access control.","properties":{"id":{"type":"string","description":"Role unique identifier generated when the role is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role description in the form of a map of translations."},"permissions":{"type":"array","description":"Permissions unique identifier list declared for this role.","items":{"$ref":"#/components/schemas/RolePermissionsDocument"}},"metadata":{"$ref":"#/components/schemas/RolesMetadata"}}},"RolePermissionsDocument":{"type":"object","description":"Role permissions list.","title":"","properties":{"applicablePermissionResources":{"type":"array","description":"Allows you to allowlist resources that the permission is applicable to. Can only contain resources specified in the permission document under `applicableResources`.\n","items":{"type":"string"}},"id":{"type":"string","description":"Reference to the permission document with specific resources defined."}},"required":["id"]},"RolesMetadata":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Role document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the role was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the role was last modified.","format":"date-time"}}},"ResourceQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Resource unique identifier generated when the resource is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource description in the form of a map of translations."},"code":{"type":"string","description":"Resource unique code identifier."},"metadata":{"$ref":"#/components/schemas/ResourcesMetadataQueryDocument"}},"description":"Resource definition associated with this access control."},"ResourcesMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Resource document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the resource was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the resource was last modified.","format":"date-time"}},"description":"Resource metadata."},"AccessControlMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Access control document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the access control was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the access control was last modified.","format":"date-time"}},"description":"Access control metadata."}}}}
```

## The AssignmentCreateRequest object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"AssignmentCreateRequest":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier generated when the user is created. Might be customer ID or Management Dashboard user ID."},"userType":{"type":"string","enum":["CUSTOMER","EMPLOYEE"],"default":"EMPLOYEE","description":"Assignment type, possible values: CUSTOMER, EMPLOYEE"}},"required":["userId"]}}}}
```

## The AssignmentIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"AssignmentIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of generated document."}}}}}}
```

## The AssignmentQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"AssignmentQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Assignment unique identifier generated when the assignment is created."},"groupId":{"type":"string","description":"User unique identifiers associated with this assignment."},"userId":{"type":"string","description":"Group unique identifiers associated with this assignment."},"userType":{"type":"string","description":"User type that may be one of: 'CUSTOMER', 'EMPLOYEE'"}},"description":"Definition of assignments"}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"resourceId":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}}}}}
```

## The GroupCreateRequest object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"GroupCreateRequest":{"type":"object","properties":{"id":{"type":"string","description":"Custom group's identifier. If not provided, it is automatically generated"},"vendorId":{"type":"string","description":"An identifier of a vendor to whom the group belongs. Can only be set during creation and is immutable thereafter. A group with vendorId can only be assigned to users of type `EMPLOYEE`","readOnly":true},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group description in the form of a map of translations."},"mixins":{"type":"object","additionalProperties":true,"description":"Custom group attributes that need to be included directly in the `mixins` object."},"accessControls":{"type":"array","description":"Access control unique identifiers associated with this group. Required to perform the request.","nullable":true,"items":{"type":"string"}},"userType":{"type":"string","description":"The type of the group. Possible values: 'CUSTOMER', 'EMPLOYEE'. Default value 'EMPLOYEE' if not provided.","default":"EMPLOYEE","enum":["CUSTOMER","EMPLOYEE"],"nullable":true},"templates":{"type":"array","description":"Template unique identifier associated with this group. Required to perform the request.","nullable":true,"items":{"type":"string"}},"b2b":{"type":"object","description":"Additional properties for B2B.","properties":{"legalEntityId":{"type":"string","description":"Identifier of the assigned legal entity."}}},"restrictions":{"$ref":"#/components/schemas/Restrictions"}},"required":["name"]},"Restrictions":{"type":"array","items":{"type":"string","description":"Limits the visibility of the permission-aware entities for the user. \n\n**Purpose**: \nRestricts entity visibility based on scope permissions. Only users with matching restriction scopes can access entity with a specific restriction value.\n\n**Validation**: \nThe value must exist in the tenant's configured list of valid restrictions.\n**Site Synchronization**: \nWhen enabled via tenant configuration (`enableSyncBetweenRestrictionsAndSiteCodes` property), this field must match with the existing sites.\n"}}}}}
```

## The GroupUpdateRequest object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"GroupUpdateRequest":{"type":"object","properties":{"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group description in the form of a map of translations."},"mixins":{"type":"object","additionalProperties":true,"description":"Custom group attributes that need to be included directly in the `mixins` object."},"accessControls":{"type":"array","description":"Access control unique identifiers associated with this group. Required to perform the request.","nullable":true,"items":{"type":"string"}},"userType":{"type":"string","description":"The type of the group. Possible values: 'CUSTOMER', 'EMPLOYEE'. Default value 'EMPLOYEE' if not provided","default":"EMPLOYEE","enum":["CUSTOMER","EMPLOYEE"],"nullable":true},"templates":{"type":"array","description":"Template unique identifier associated with this group. Required to perform the request.","nullable":true,"items":{"type":"string"}},"b2b":{"type":"object","description":"additional properties for B2B","properties":{"legalEntityId":{"type":"string","description":"identifier of the assigned legal entity"}}},"restrictions":{"$ref":"#/components/schemas/Restrictions"},"metadata":{"type":"object","properties":{"version":{"type":"integer","format":"int32","description":"Version of the entity, If provided optimistic locking is enabled and its version must match the version of the document in the database."}},"description":"Metadata of the updated group."}},"required":["name"]},"Restrictions":{"type":"array","items":{"type":"string","description":"Limits the visibility of the permission-aware entities for the user. \n\n**Purpose**: \nRestricts entity visibility based on scope permissions. Only users with matching restriction scopes can access entity with a specific restriction value.\n\n**Validation**: \nThe value must exist in the tenant's configured list of valid restrictions.\n**Site Synchronization**: \nWhen enabled via tenant configuration (`enableSyncBetweenRestrictionsAndSiteCodes` property), this field must match with the existing sites.\n"}}}}}
```

## The GroupIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"GroupIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the generated document."}}}}}}
```

## The UserIdResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"UserIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the generated/updated user."}}}}}}
```

## The GroupsMetadataQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"GroupsMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Group document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the group was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the group was last modified.","format":"date-time"}},"description":"Group metadata."}}}}
```

## The GroupsQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"GroupsQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier generated when the group is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group description in the form of a map of translations."},"vendorId":{"type":"string","description":"An identifier of a vendor to whom the group belongs. Can only be set during creation and is immutable thereafter. A group with vendorId can only be assigned to users of type `EMPLOYEE`","readOnly":true},"accessControls":{"type":"array","description":"Access control unique identifiers associated with this group.","items":{"type":"string"}},"templates":{"type":"array","description":"Template unique identifiers associated with this group.","items":{"type":"string"}},"code":{"type":"string"},"userType":{"type":"string","description":"The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type."},"b2b":{"type":"object","description":"additional properties for B2B","properties":{"legalEntityId":{"type":"string","description":"identifier of the assigned legal entity"}}},"restrictions":{"$ref":"#/components/schemas/Restrictions"},"mixins":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom group attributes that need to be included directly in the `mixins` object."},"metadata":{"$ref":"#/components/schemas/GroupsMetadataQueryDocument"}},"description":"Definition of groups"},"Restrictions":{"type":"array","items":{"type":"string","description":"Limits the visibility of the permission-aware entities for the user. \n\n**Purpose**: \nRestricts entity visibility based on scope permissions. Only users with matching restriction scopes can access entity with a specific restriction value.\n\n**Validation**: \nThe value must exist in the tenant's configured list of valid restrictions.\n**Site Synchronization**: \nWhen enabled via tenant configuration (`enableSyncBetweenRestrictionsAndSiteCodes` property), this field must match with the existing sites.\n"}},"GroupsMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Group document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the group was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the group was last modified.","format":"date-time"}},"description":"Group metadata."}}}}
```

## The Restrictions object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"Restrictions":{"type":"array","items":{"type":"string","description":"Limits the visibility of the permission-aware entities for the user. \n\n**Purpose**: \nRestricts entity visibility based on scope permissions. Only users with matching restriction scopes can access entity with a specific restriction value.\n\n**Validation**: \nThe value must exist in the tenant's configured list of valid restrictions.\n**Site Synchronization**: \nWhen enabled via tenant configuration (`enableSyncBetweenRestrictionsAndSiteCodes` property), this field must match with the existing sites.\n"}}}}}
```

## The PermissionQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"PermissionQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Permission unique identifier generated when the permission is created."},"code":{"type":"string","description":"Permission code identifier used for scopes mapping."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized permission name in the form of a map of codes."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized permission description in the form of a map of translations."},"applicableResources":{"type":"array","description":"Applicable domains list declared for this permission.","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/PermissionsMetadataQueryDocument"}},"description":"Definition of permissions"},"PermissionsMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Permission document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the permission was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the permission was last modified.","format":"date-time"}},"description":"Permission metadata."}}}}
```

## The PermissionsMetadataQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"PermissionsMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Permission document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the permission was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the permission was last modified.","format":"date-time"}},"description":"Permission metadata."}}}}
```

## The ResourceQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"ResourceQueryDocument":{"type":"object","properties":{"id":{"type":"string","description":"Resource unique identifier generated when the resource is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized resource description in the form of a map of translations."},"code":{"type":"string","description":"Resource unique code identifier."},"metadata":{"$ref":"#/components/schemas/ResourcesMetadataQueryDocument"}},"description":"Resource definition associated with this access control."},"ResourcesMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Resource document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the resource was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the resource was last modified.","format":"date-time"}},"description":"Resource metadata."}}}}
```

## The ResourcesMetadataQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"ResourcesMetadataQueryDocument":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Resource document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the resource was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the resource was last modified.","format":"date-time"}},"description":"Resource metadata."}}}}
```

## The RolePermissionsDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"RolePermissionsDocument":{"type":"object","description":"Role permissions list.","title":"","properties":{"applicablePermissionResources":{"type":"array","description":"Allows you to allowlist resources that the permission is applicable to. Can only contain resources specified in the permission document under `applicableResources`.\n","items":{"type":"string"}},"id":{"type":"string","description":"Reference to the permission document with specific resources defined."}},"required":["id"]}}}}
```

## The RoleQueryDocument object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"RoleQueryDocument":{"type":"object","description":"Role definition associated with this access control.","properties":{"id":{"type":"string","description":"Role unique identifier generated when the role is created."},"name":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized role description in the form of a map of translations."},"permissions":{"type":"array","description":"Permissions unique identifier list declared for this role.","items":{"$ref":"#/components/schemas/RolePermissionsDocument"}},"metadata":{"$ref":"#/components/schemas/RolesMetadata"}}},"RolePermissionsDocument":{"type":"object","description":"Role permissions list.","title":"","properties":{"applicablePermissionResources":{"type":"array","description":"Allows you to allowlist resources that the permission is applicable to. Can only contain resources specified in the permission document under `applicableResources`.\n","items":{"type":"string"}},"id":{"type":"string","description":"Reference to the permission document with specific resources defined."}},"required":["id"]},"RolesMetadata":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Role document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the role was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the role was last modified.","format":"date-time"}}}}}}
```

## The RolesMetadata object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"RolesMetadata":{"required":["createdAt","version"],"type":"object","properties":{"version":{"type":"integer","description":"Role document version.","format":"int32"},"createdAt":{"type":"string","description":"Timestamp indicating when the role was created.","format":"date-time"},"modifiedAt":{"type":"string","description":"Timestamp indicating when the role was last modified.","format":"date-time"}}}}}}
```

## The UserScopesResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"UserScopesResponse":{"type":"object","properties":{"userId":{"type":"string","description":"User unique identifier."},"scopes":{"type":"string","description":"User scopes."},"vendorId":{"type":"string","description":"An identifier of a vendor to whom the user belongs. Calculated based on groups assignment","readOnly":true}},"description":"Definition of user scopes"}}}}
```

## The UserResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"UserResponse":{"type":"object","description":"User response schema","properties":{"id":{"type":"string","description":"User unique identifier generated when the group is created."},"firstName":{"type":"string","description":"User first name."},"lastName":{"type":"string","description":"User last name."},"backofficeUserNumber":{"type":"string","description":"For a new user, the value is the same as Id. For an existing user, the value is an internal number. This field should be used when retrieving user details and for user update and deletion."},"preferredSite":{"type":"string","description":"User preferred site"},"preferredCurrency":{"type":"string","description":"User preferred currency"},"preferredLanguage":{"type":"string","description":"User preferred language"},"department":{"type":"string","description":"User department"},"validFrom":{"type":"string","description":"Account creation date"},"isAccountLocked":{"type":"boolean","description":"Indicates whether user is able to log in to Management Dashboard."},"contactEmail":{"type":"string","description":"User contact email"},"status":{"type":"string","description":"Indicates user status. May be 'Active' or 'Provisioned' in case user does not confirm their email."},"groupIds":{"type":"array","description":"Group ids where user is assigned to.","items":{"type":"string"}},"groups":{"type":"array","description":"Group extended definition, may be fetched when `extend` param is used","items":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier generated when the group is created."},"name":{"additionalProperties":{"type":"string"},"description":"Localized group name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group description in the form of a map of translations."},"code":{"type":"string","description":"Internal code of a group."},"userType":{"type":"string","description":"The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type."}}}}},"required":["id","firstName","lastName","backofficeUserNumber","preferredSite","preferredCurrency","preferredLanguage","department","validFrom","isAccountLocked","contactEmail","status","groupIds"]}}}}
```

## The UserExtendedResponse object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"UserExtendedResponse":{"description":"User response schema extended with additional information","allOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"object","properties":{"lastLogin":{"type":"string","description":"Timestamp of account's last login"}}}]},"UserResponse":{"type":"object","description":"User response schema","properties":{"id":{"type":"string","description":"User unique identifier generated when the group is created."},"firstName":{"type":"string","description":"User first name."},"lastName":{"type":"string","description":"User last name."},"backofficeUserNumber":{"type":"string","description":"For a new user, the value is the same as Id. For an existing user, the value is an internal number. This field should be used when retrieving user details and for user update and deletion."},"preferredSite":{"type":"string","description":"User preferred site"},"preferredCurrency":{"type":"string","description":"User preferred currency"},"preferredLanguage":{"type":"string","description":"User preferred language"},"department":{"type":"string","description":"User department"},"validFrom":{"type":"string","description":"Account creation date"},"isAccountLocked":{"type":"boolean","description":"Indicates whether user is able to log in to Management Dashboard."},"contactEmail":{"type":"string","description":"User contact email"},"status":{"type":"string","description":"Indicates user status. May be 'Active' or 'Provisioned' in case user does not confirm their email."},"groupIds":{"type":"array","description":"Group ids where user is assigned to.","items":{"type":"string"}},"groups":{"type":"array","description":"Group extended definition, may be fetched when `extend` param is used","items":{"type":"object","properties":{"id":{"type":"string","description":"Group unique identifier generated when the group is created."},"name":{"additionalProperties":{"type":"string"},"description":"Localized group name in the form of a map of translations."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Localized group description in the form of a map of translations."},"code":{"type":"string","description":"Internal code of a group."},"userType":{"type":"string","description":"The group type determines if the group can consist of users of the `CUSTOMER` or the `EMPLOYEE` type."}}}}},"required":["id","firstName","lastName","backofficeUserNumber","preferredSite","preferredCurrency","preferredLanguage","department","validFrom","isAccountLocked","contactEmail","status","groupIds"]}}}}
```

## The UserUpdateRequest object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"UserUpdateRequest":{"type":"object","description":"User update schema","properties":{"firstName":{"type":"string","description":"User first name."},"lastName":{"type":"string","description":"User last name."},"preferredSite":{"type":"string","description":"User preferred site"},"preferredCurrency":{"type":"string","description":"User preferred currency"},"preferredLanguage":{"type":"string","description":"User preferred language"},"department":{"type":"string","description":"User department"},"backofficeUserNumber":{"type":"string","description":"User backoffice user number. For new users, it is the same as ID. For existing users, it may be different."},"groupIds":{"type":"array","description":"Groups unique identifier attached to this user. Required to perform the request.","items":{"type":"string"}}},"required":["firstName","lastName","preferredSite","preferredCurrency","preferredLanguage","department","backofficeUserNumber","groupIds"]}}}}
```

## The UserCreateRequest object

```json
{"openapi":"3.0.1","info":{"title":"IAM Service","version":"0.0.1"},"components":{"schemas":{"UserCreateRequest":{"type":"object","properties":{"firstName":{"type":"string","description":"User first name."},"lastName":{"type":"string","description":"User last name."},"preferredSite":{"type":"string","description":"User preferred site"},"preferredCurrency":{"type":"string","description":"User preferred currency"},"preferredLanguage":{"type":"string","description":"User preferred language"},"department":{"type":"string","description":"User department"},"contactEmail":{"type":"string","description":"User contact email"},"groupIds":{"type":"array","description":"Unique identifier of a group associated with to this user. Required to perform the request.","items":{"type":"string"}}},"required":["firstName","lastName","preferredSite","preferredCurrency","preferredLanguage","department","contactEmail","groupIds"]}}}}
```
