POST /api/login/validateRegistrationCode

Validates the registration code that was issued to a new user as a result of the Site Admin adding the user.

Authorization Roles/Permissions: No permissions required; however, to run the operation successfully, the user must be the authorized user to whom the registration code was issued.

This topic includes the following sections:

HTTP Method

POST

URL

https://{hostname}/api/login/validateRegistrationCode

Sample Request

The example below shows a request to complete the registration process with the registration code.

Sample Request URL

https://{hostname}/api/login/validateRegistrationCode

Sample request headers

POST http://{hostname}/api/login/validateRegistrationCode HTTP/1.0
Host: {hostname}
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

Sample request body

registrationCode=jqD3KMG6cbNIMMg7tT_7RSXvv-wnkNM0sV3tHAUzRXJy80WeYn1NGPrQ1
08sDUxyFfW91_g9IHXloVyX-Ggu7PxcLpgWo62m0mZ8Rqx37boW1fNqLlhxdIg119I

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json
Content-Type application/x-www-form-urlencoded

Request Parameters

Parameter Parm Type Data Type Required Description
registrationCode Form string Required

The registration code issued to the user when the Site Admin added the user.

To add the user via the API (Site Admin only), see POST /api/users. The registration code is issued as a result of this operation.

Response

If successful, this operation returns HTTP status code 200, with details of the user profile.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-cache
Expires: Wed, 21 Jan 2015 16:10:23 GMT

Sample response body

{
  "UserID" : "86a1bb98-9f17-4791-904b-bbf93e22db98.acmepaymentscorp",
  "Email" : "jane.mead@acmepaymentscorp.com",
  "ProfileName" : "JaneMead"
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json

Response Body

Name Type Description
User User

Contains information about a platform user.

The response includes a small subset of the full User object; UserID, Email, and ProfileName. Since this operation is part of adding a new user, and is validating the registration code prior to additional steps, some of the information in the User object has not yet been collected.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
500 An error occurred processing the call.

More information about Akana API Platform API error messages.