POST api/licenses/add
Create new License
Request Information
URI Parameters
None.
Body Parameters
LicenseRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Name | string |
None. |
|
| StartDate | date |
None. |
|
| EndDate | date |
None. |
|
| TargetUserGroupId | globally unique identifier |
None. |
|
| SeatUserGroupIds | Collection of globally unique identifier |
None. |
|
| OwnerId | globally unique identifier |
None. |
|
| LicenseType | integer |
None. |
|
| AccessType | integer |
None. |
|
| AvailableSeats | integer |
None. |
|
| Isbns | Collection of string |
None. |
|
| ContactPersonName | string |
None. |
|
| ContactPhone | string |
None. |
|
| ContactEmail | string |
None. |
|
| CommentText | string |
None. |
|
| Buffer | integer |
None. |
|
| Grade | string |
None. |
|
| LicenseCategoryId | globally unique identifier |
None. |
|
| AllowableUserRoles | Collection of globally unique identifier |
None. |
|
| PrivilegedUserRoles | Collection of globally unique identifier |
None. |
Request Formats
application/json, text/json
Sample:
{
"Name": "sample string 1",
"StartDate": "2025-12-29T11:17:17.3290908+00:00",
"EndDate": "2025-12-29T11:17:17.3290908+00:00",
"TargetUserGroupId": "187d6bf5-2e85-46e9-8937-6a1d64279933",
"SeatUserGroupIds": [
"a66ee95b-2a06-4e20-8df6-7a42690c0e95",
"dadd98a3-75bc-4c1e-b310-2c085ebd1b69"
],
"OwnerId": "8c280b6b-d11d-4c32-97b0-b38c365589ba",
"LicenseType": 4,
"AccessType": 5,
"AvailableSeats": 6,
"Isbns": [
"sample string 1",
"sample string 2"
],
"ContactPersonName": "sample string 7",
"ContactPhone": "sample string 8",
"ContactEmail": "sample string 9",
"CommentText": "sample string 10",
"Buffer": 1,
"Grade": "sample string 11",
"LicenseCategoryId": "a089fd0a-3ad0-4acd-b938-21b030334ea4",
"AllowableUserRoles": [
"0ee0448d-911f-4eb1-ae0c-dd179cb1d11a",
"a38be460-ecf6-4833-afbb-25175170bdc0"
],
"PrivilegedUserRoles": [
"ec443ae1-3009-4f61-933d-5f5e21cc5db0",
"c7d3a31c-c4d9-471f-adac-09f4409ee1db"
]
}
application/xml, text/xml
Sample:
<LicenseRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Alice.Dto.Requests">
<AccessType>5</AccessType>
<AllowableUserRoles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>0ee0448d-911f-4eb1-ae0c-dd179cb1d11a</d2p1:guid>
<d2p1:guid>a38be460-ecf6-4833-afbb-25175170bdc0</d2p1:guid>
</AllowableUserRoles>
<AvailableSeats>6</AvailableSeats>
<Buffer>1</Buffer>
<CommentText>sample string 10</CommentText>
<ContactEmail>sample string 9</ContactEmail>
<ContactPersonName>sample string 7</ContactPersonName>
<ContactPhone>sample string 8</ContactPhone>
<EndDate>2025-12-29T11:17:17.3290908+00:00</EndDate>
<Grade>sample string 11</Grade>
<Isbns xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</Isbns>
<LicenseCategoryId>a089fd0a-3ad0-4acd-b938-21b030334ea4</LicenseCategoryId>
<LicenseType>4</LicenseType>
<Name>sample string 1</Name>
<OwnerId>8c280b6b-d11d-4c32-97b0-b38c365589ba</OwnerId>
<PrivilegedUserRoles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>ec443ae1-3009-4f61-933d-5f5e21cc5db0</d2p1:guid>
<d2p1:guid>c7d3a31c-c4d9-471f-adac-09f4409ee1db</d2p1:guid>
</PrivilegedUserRoles>
<SeatUserGroupIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>a66ee95b-2a06-4e20-8df6-7a42690c0e95</d2p1:guid>
<d2p1:guid>dadd98a3-75bc-4c1e-b310-2c085ebd1b69</d2p1:guid>
</SeatUserGroupIds>
<StartDate>2025-12-29T11:17:17.3290908+00:00</StartDate>
<TargetUserGroupId>187d6bf5-2e85-46e9-8937-6a1d64279933</TargetUserGroupId>
</LicenseRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ValidationResult| Name | Description | Type | Additional information |
|---|---|---|---|
| IsValid | boolean |
None. |
|
| Errors | Collection of ValidationFailure |
None. |
Response Formats
application/json, text/json
Sample:
{
"errors": []
}
application/xml, text/xml
Sample:
<ValidationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FluentValidation.Results"> <errors /> </ValidationResult>