Request
Endpoint: !AutoReplaceMC
https://secure.trust-provider.com/products/!AutoReplaceMC
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 |
The order number of a certificate to replace, ordered previously using AutoApplyOrder. |
|||
|
optional |
string |
32767 chars |
The comma-separated or whitespace-separated list of domain names. Commas and/or whitespace may need to be manually URL-encoded (for example, |
||
|
optional |
string |
32767 chars |
The Base64-encoded certificate signing request, with or without the If this parameter is omitted, the CSR from the original order will be used instead. For more information, see CSR parameter structure. |
||
|
optional |
string |
32767 chars |
The Base64 URL-encoded trademark logo. |
||
|
optional |
string |
2 chars |
(VMC only) The country name in ISO 3166 two-character country code. |
||
|
optional |
string |
255 chars |
(VMC only) A |
||
|
optional |
string |
255 chars |
(VMC only) The registration number issued by the trademark office, which is used by the Certificate Authority (CA) to verify the mark. |
||
|
optional |
string |
255 chars |
(CMC only) One of the domain names listed in |
||
|
optional |
string |
64 chars |
The organization name. |
||
|
optional |
string |
64 chars |
The organizational unit name. |
||
|
optional |
string |
40 chars |
The organization post office box. |
||
|
optional |
string |
128 chars |
The street address where the organization operates. |
||
|
optional |
string |
128 chars |
The second part of the company’s street address (if necessary). |
||
|
optional |
string |
128 chars |
The third part of the company’s street address (if necessary). |
||
|
optional |
string |
128 chars |
The city in which the organization operates. |
||
|
optional |
string |
128 chars |
The state or province in which the organization operates. |
||
|
optional |
string |
128 chars |
The company’s postal code. |
||
|
optional |
string |
2 chars |
The company’s country name. |
||
|
optional |
string |
20 chars |
A unique nine-digit identifier for businesses, provided by the company Dun & Bradstreet. |
||
|
optional |
string |
64 chars |
The company registration number. |
||
|
optional |
string |
128 chars |
The jurisdiction of the city in which the organization operates. |
||
|
optional |
string |
128 chars |
The jurisdiction of the state or province in which the organization operates. |
||
|
optional |
string |
2 chars |
The jurisdiction of the country in which the company operates. |
||
|
optional |
string |
64 chars |
An optional name under which the organization operates that is different from its legal name. This is a so-called DBA (doing business as) name for the company (if any). |
||
|
optional |
string |
10 chars |
The date of incorporation ( |
||
|
conditional |
string |
32767 chars |
The list of DCV email addresses. A comma or white-space-separated list of DCV email addresses to be used to perform Domain Control Validation for each domain in this certificate. The order in which these email addresses are listed must be exactly the same as the order of the domain names in the certificate request.
For more information, see the preceding Alternative DCV mechanisms are now available. For more information, see Domain Control Validation. You can pass the following values for each domain:
You can use one of the following magic tokens if all the domains in the order are to be set to the same alternative DCV method:
The magic token must be the only value passed to the parameter for it to work. If this parameter is specified, |
||
|
conditional |
string |
32767 chars |
The list of validation tokens. The comma or white-space-separated list of DCV email addresses to be used to perform Domain Control Validation for each domain in this certificate.
The order in which these email addresses are listed must be exactly the same as the order of the domain names in the certificate request.
For more information, see the preceding Alternative DCV mechanisms are now available. For more information, see Domain Control Validation. The allowed values for each domain:
The allowed magic tokens if all the domains in the order are to be set to the same alternative DCV method:
The magic token must be the only value passed to the parameter for it to work. If this parameter is specified, |
||
|
optional |
char |
64 chars |
The identifier for the order. This identifier can be returned by some of our other APIs to aid in integration with partner systems.
If a |
||
|
optional |
char |
1 char |
Specifies whether to check uniqueness of the The allowed values are:
|
||
|
optional |
char |
1 char |
Specifies the response format. The allowed values are:
If omitted, the value defaults to |
||
|
optional |
string |
64 chars |
The applicant representative’s name which is used for a callback. This parameter is required when Sectigo performs the organizational callback. |
||
|
optional |
string |
64 chars |
The applicant representative’s surname which is used for a callback. This parameter is required when Sectigo performs the organizational callback. |
||
|
optional |
string |
255 chars |
The applicant representative’s email address which is used for a callback. This parameter is required when Sectigo performs the organizational callback. |
||
|
optional |
string |
32 chars |
The applicant representative’s phone number which is used for a callback. This parameter is required when Sectigo performs the organizational callback. |
||
|
optional |
string |
64 chars |
The applicant representative’s title which is used for a callback. |
||
|
optional |
string |
32 chars |
The applicant representative’s fax number which is used for a callback. |
||
|
optional |
string |
255 chars |
The applicant representative’s organization name.
|
||
|
conditional |
string |
64 chars |
The applicant representative’s organizational unit name. If |
||
|
conditional |
string |
128 chars |
The applicant representative’s street address. If |
||
|
conditional |
string |
128 chars |
The second part of the applicant representative’s street address (if necessary). If |
||
|
conditional |
string |
128 chars |
The third part of the applicant representative’s street address (if necessary). If |
||
|
conditional |
string |
128 chars |
The applicant representative’s post office box. If |
||
|
conditional |
string |
128 chars |
The city in which the applicant representative operates. If |
||
|
conditional |
string |
128 chars |
The applicant representative’s state or province. If |
||
|
conditional |
string |
40 chars |
The applicant representative’s postal code. If |
||
|
conditional |
string |
2 chars |
The applicant representative’s country code. This parameter must be an ISO 3166 two-character country code. If |
||
|
optional |
char |
1 char |
Specifies whether to show the certificate state. The allowed values are:
|
||
|
optional |
char |
1 char |
Specifies whether to ignore the late organizational details changes. The allowed values are:
If omitted, the value defaults to |
||
|
optional |
char |
1 char |
Specifies whether to update the The allowed values are:
If omitted, the value defaults to |
||
|
optional |
char |
1 char |
Specifies whether to show the validity period of the certificate. The possible values are:
If omitted, the value defaults to |
||
|
optional |
char |
1 char |
Specifies whether to show the replaced order number. The allowed values are:
If omitted, the value defaults to |
||
|
optional |
string |
1 char |
Indicates whether the logo and certificates are hosted on the CA or not. The allowed options are:
If omitted, the value defaults to |
Sample request
curl --location 'https://secure.trust-provider.com/products/!AutoReplaceMC' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'loginName=login_name' \
--data-urlencode 'loginPassword=login_password' \
--data-urlencode 'ordernumber=order_number' \
--data-urlencode 'isCustomerValidated=N' \
--data-urlencode 'domainNames=domain_names' \
--data-urlencode '[email protected]' \
--data-urlencode '[email protected]' \
--data-urlencode 'csr=-----BEGIN CERTIFICATE REQUEST-----
MIIbWQYJKoZIhvcNAQcCoIIbSjCCG0YCAQExDTALBglghkgBZQMEAgEwDwYJKoZI
hvcNAQcBoAIEAKCCGHEwggzyMIILWqADAgECAhBLVWcU36fkE8Hi/55APse9MA0G
...
Hi4ZaP9ok+JrTdy01WOmCnuAIaOUdM+w3wb+DSNLh9MoqqeM2mBZdC7EGthYeg+O
RhZWrKZng/nCi4Pt0PQrKEFNaMdscl+0rnrQA+U6llop7fmztjhKtOwDR6bQ
-----END CERTIFICATE REQUEST-----' \
--data-urlencode 'markLogo=mark_logo` \
--data-urlencode 'UpdateOrgDetails=Y'
Response
The request is successful when the server returns a response with the status code = 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 for responseFormat=0 (by default).
The first line of the response represents a status code.
If the status code is less than 0, the second line contains an error message describing the error.
If the status code equals 0, the response can contain the following lines which provide:
-
The certificate state if
showCertificateState=Y. The certificate state is the status of the certificate generated by this replacement. -
The amount debited if
showTotalCost=Y. The possible value is99999990.00. -
The product term start timestamp and product term end timestamp with a space between the dates. The product term timestamps are returned if
showValidityPeriod=Y. It is expressed as a UNIX time value.
1052870400 1084406400
-
The replacement order number — The order number generated by this replacement. The replacement order number is returned if
showReplacedOrderNumber=Y.
The MIME type will be application/x-www-form-urlencoded for responseFormat=1.
Response parameters
The response can contain the following parameters:
| Parameter | Possible Value |
|---|---|
|
A numeric code that identifies the type of error. Always present in the response. For more information, see Error codes. |
|
A description of the error. This parameter is absent when |
|
The status of the SSL certificate generated by this replacement. This parameter is only present when |
|
The timestamp when the product term has started. It is expressed as a UNIX time value. This parameter is only present when |
|
The timestamp when the product term will end. It is expressed as a UNIX time value. This parameter is only present when |
|
The product duration in days. This parameter is only present when |
|
The order number generated by this replacement. This parameter is only present when |
Error codes
The following table outlines error responses returned by the AutoReplaceMC 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 HTTPS protocol. |
|
|
The provided argument is not recognised. |
|
|
The required argument is missing from the request. |
|
|
The argument value does not meet validation requirements. |
|
|
The specified country code is not valid according to the ISO-3166 standard. |
|
|
An unknown error occurred. |
|
|
Authentication has failed due to one of the specified reasons. Verify your login credentials or check account restrictions. |
|
|
The request method should be |
|
|
The requested certificate has expired and cannot be processed. |
|
|
The user does not have permission to use a voucher with the specified context. |
|
|
The user doesn’t have the permission to perform the specified action. |
|
|
An internal error occurred while decoding the CSR. |
|
|
No price information available for the specified item. |
|
|
The order replacement failed due to a general error. |
|
|
The specified parameter is not valid for this product type. |
|
|
The CSR contains domain names not listed in the domainNames parameter. |
|
|
The CSR contains domain names not listed in the certificate’s domain names. |