Request
Endpoint: !initCustomerSession
https://secure.trust-provider.com/products/!initCustomerSession
|
To access the Validation Manager page for the order, construct the URL using the values returned by the where:
|
Use the POST method for this endpoint.
Submit parameters in the x-www-form-urlencoded format.
Request parameters
The following table displays the required, optional, and conditional parameters.
| Parameter | Requirement | Type | Max.Length | Description |
|---|---|---|---|---|
|
required |
string |
64 chars |
Your account username. This value is case sensitive. |
|
required |
string |
128 chars |
Your account password. This value is case sensitive. |
|
required |
string |
64 chars |
The order number of a certificate which the Validation Manager page is requested for. |
|
optional |
char |
1 char |
Specifies the format of the response. The possible values are:
|
Sample request
curl --location 'https://secure.trust-provider.com/products/!initCustomerSession' \
--data-urlencode 'loginName=login_name' \
--data-urlencode 'loginPassword=login_password' \
--data-urlencode 'orderNumber=order_number'
Response
The request is successful when the server returns a response with the status code equals 0.
Any status code less than 0 indicates an error condition.
|
The list of codes and their descriptions can be found in Error codes. |
The MIME type will be text/plain, if the responseFormat=0 (by default).
The response consists of two or more lines.
The first line is an errorCode.
If errorCode is less than 0, the second line displays the errorMessage, describing the error.
If errorCode=0, the response consists of three lines:
-
line 1 —
errorCode. -
line 2 —
SID— Identifier of a created session handle (type=string, max size=16 chars). -
line 3 —
orderNumber— Order number of a certificate which the Validation Manager page is made available for. If the given order (request parameterorderNumber) has replacements, the most recent replacement of the order number will be returned.
The MIME type will be application/x-www-form-urlencoded, if the responseFormat=1.
Response parameters
The following table displays the content that can appear in the response.
| Parameter | Description |
|---|---|
|
A numeric code that identifies the type of error. The parameter is an integer. Always present in the response. For more information, see Error codes. |
|
A description of the error. The parameter is a string. For more information, see Error codes. This parameter is not present when |
|
Session handle. This parameter is only present when |
|
The order number of a certificate which the Validation Manager page is made available for. If the given order (request parameter This parameter is only present when |
Error codes
The following table outlines error responses returned by the initCustomerSession API endpoint.
Each error response consists of an errorCode and an errorMessage indicating why the request failed.
| Error Code | Error Message | Description |
|---|---|---|
|
|
The request must use |
|
|
The provided argument is not recognized. |
|
|
The required argument is missing from the request. |
|
|
The argument value does not meet validation requirements. |
|
|
An unknown error occurred. |
|
|
The user doesn’t have the permission to perform the specified action. |
|
|
The request method should be |
|
|
Indicates that the maximum number of API calls has been reached. |