POST api/AdminServices/CreateAccessCode
Creates one or more Access Codes from an active order according to set criteria. Depricated, should upgrade to CreateComboAccessCode as soon as possible.
Request Information
URI Parameters
None.
Body Parameters
CreateAccessCodePostName | Description | Type | Additional information |
---|---|---|---|
ProductCategories |
Determines which products are added to the new Access Codes. View the Certifications ENUM table for more information. |
Collection of string |
None. |
LicenseId |
The GMetrix License ID to be used for Access Code creation. For example, if you are using the Web Services license the ID would be 137. |
integer |
None. |
orderId |
if license ID is left null, order ID can be used instead. if license id and order id are both sent, order id is ignored |
integer |
None. |
CustomerId |
The Customer ID for the Testing Center you wish to create the Access Codes for. The Testing Center must have an active license which matches the LicenseId for the codes to be created. |
string |
None. |
NumberOfCodesToCreate |
The number of Access Codes you wish to create. |
integer |
None. |
Identifier |
The Identifier you wish to assign to the created Access Codes. This must be an alphanumeric string between 1 and 8 characters. No special characters allowed. |
string |
None. |
IsSingleApplication |
Determines if the Access Codes created are Single Application (true) or Full Suite (false) codes. If set to true, the student's code will be associated with the first product they select upon redemption. |
boolean |
None. |
AdvancedSettings |
Optional settings for specific access code settings |
string |
None. |
Key |
Key to Access API provided by GMetrix |
string |
None. |
Request Formats
application/json, text/json
{ "ProductCategories": [ "sample string 1", "sample string 2" ], "LicenseId": 1, "orderId": 2, "CustomerId": "sample string 3", "NumberOfCodesToCreate": 4, "Identifier": "sample string 5", "IsSingleApplication": true, "AdvancedSettings": "sample string 7", "Key": "sample string 8" }
application/xml, text/xml
<CreateAccessCodePost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ManagementServicesApi.Models"> <Key>sample string 8</Key> <AdvancedSettings>sample string 7</AdvancedSettings> <CustomerId>sample string 3</CustomerId> <Identifier>sample string 5</Identifier> <IsSingleApplication>true</IsSingleApplication> <LicenseId>1</LicenseId> <NumberOfCodesToCreate>4</NumberOfCodesToCreate> <orderId>2</orderId> <ProductCategories xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </ProductCategories> </CreateAccessCodePost>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
CreateAccessCodeSuccessName | Description | Type | Additional information |
---|---|---|---|
TransactionId | integer |
None. |
|
AccessCodes | Collection of string |
None. |
|
Successful | boolean |
None. |
|
MsgSuccess | string |
None. |
Response Formats
application/json, text/json
{ "TransactionId": 1, "AccessCodes": [ "sample string 1", "sample string 2" ], "Successful": true, "MsgSuccess": "sample string 3" }
application/xml, text/xml
<CreateAccessCodeSuccess xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ManagementServices.Repositories.Response"> <MsgSuccess>sample string 3</MsgSuccess> <Successful>true</Successful> <AccessCodes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </AccessCodes> <TransactionId>1</TransactionId> </CreateAccessCodeSuccess>