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 initCustomerSession API endpoint:

where:

  • <SID> is the session handle returned in the API response.

  • <orderNumber> is the order number returned in the API response.

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

loginName

required

string

64 chars

Your account username.

This value is case sensitive.

loginPassword

required

string

128 chars

Your account password.

This value is case sensitive.

orderNumber

required

string

64 chars

The order number of a certificate which the Validation Manager page is requested for.

responseFormat

optional

char

1 char

Specifies the format of the response.

The possible values are:

  • 0 — Newline-delimited parameters (default).

  • 1 — URL-encoded parameters.

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 parameter orderNumber) 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

errorCode

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.

errorMessage

A description of the error.

The parameter is a string.

For more information, see Error codes.

This parameter is not present when errorCode=0.

SID

Session handle.

This parameter is only present when errorCode=0.

orderNumber

The order number of a certificate which the Validation Manager page is made available for.

If the given order (request parameter orderNumber) has replacements, the most recent replacement order number will be returned.

This parameter is only present when errorCode=0.

Sample success response

The success response with code 0 , when responseFormat=0.
0
ll**************
1234567890
The success response with code 0 , when responseFormat=1.
errorCode=0&SID=ll**************

Sample error response

-17
Request used GET rather than POST!

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

-1

Request was not made over https!

The request must use HTTPS protocol.

-2

Unrecognized argument!

The provided argument is not recognized.

-3

The 'xxxx' argument is missing!

The required argument is missing from the request.

-4

The value of the 'xxxx' argument is invalid!

The argument value does not meet validation requirements.

-14

An unknown error occurred!

An unknown error occurred.

-16

Permission denied!

The user doesn’t have the permission to perform the specified action.

-17

Request used GET rather than POST!

The request method should be POST.

-42

Call limit reached! Please try again later.

Indicates that the maximum number of API calls has been reached.