Endpoint: !initCustomerSession

https://secure.trust-provider.com/products/download/!initCustomerSession

The !initCustomerSession API action creates a session, enabling the display of the Validation Manager tool to the end user for the associated certificate order on your side.

Use the POST method for this endpoint.

Submit parameters in the x-www-form-urlencoded format.

The following table lists the required and optional parameters.

Parameter Type Requirement Max. Length Description

loginName

string

required

64 chars

Your account username.

This value is case sensitive.

loginPassword

string

required

128 chars

Your account password.

This value is case sensitive.

orderNumber

string

required

64 chars

The order number for which you want the Validation Manager tool to be displayed.

responseFormat

char

optional

1 char

Specifies the response format.

The possible options are:

  • 0 = Newline-delimited parameters (default)

  • 1 = URL-encoded parameters

Sample request

curl --location --request POST 'https://secure.trust-provider.com/products/!initCustomerSession' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'loginName=yourLoginName' \
--data-urlencode 'loginPassword=yourPassword' \
--data-urlencode 'orderNumber=yourOrderNumber'

Response

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 the errorCode is less than 0, the second line displays the errorMessage, describing the error.

If the 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 Type Description

errorCode

integer

A numeric code that identifies the type of error.

For more information, see Error codes.

errorMessage

string

A description of the error.

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

errorCode=0&SID=aBCDEpZYXWjcmSE