Code Signing
Endpoint: !AutoApplyOrder
https://secure.trust-provider.com/products/!AutoApplyOrder
Use the POST method for this endpoint.
Submit parameters in the x-www-form-urlencoded format.
Request parameters
| Parameter | Requirement | Type | Max.Length | Description | ||
|---|---|---|---|---|---|---|
|
required |
string |
64 chars |
Your account username. |
||
|
required |
string |
128 chars |
Your account password. |
||
|
required |
string |
64 chars |
Specifies a comma-separated string of integers for a product code. The following product IDs are used:
Add these values to EV or OV Code Signing include the eToken and eToken shipping for a token-based certificate, separated by a comma, such as:
|
||
|
required |
integer |
The validity period, in days. For Code Signing certificate products the allowed values are:
|
|||
|
required |
char |
1 char |
Specifies whether the customer will validate the customer’s documents. The allowed values are:
|
||
|
required |
string |
255 chars |
The applicant representative’s email address which is used for organizational callback by Sectigo. |
||
|
optional |
char |
1 char |
Specifies who will verify the applicant representative’s contact details before the callback is performed. The allowed values are:
|
||
|
optional |
string |
255 chars |
The contact email address. If specified, this email address will be the only email address that Sectigo’s validation department will correspond with during the processing of this order. |
||
|
optional |
string |
255 chars |
The email address of the Subject Alternative Names (SAN). If specified, this email address will be included in the SAN field of the resulting certificate. |
||
|
conditional |
string |
64 chars |
Specifies the organization name. If an organization name is specified here and This parameter is not required if there is an organization name in the CSR.
Otherwise, |
||
|
optional |
string |
64 chars |
(Private certificates only) The organizational department name. If an organizational unit name is specified here and in the CSR, |
||
|
conditional |
string |
128 chars |
The street address where the organization operates. If a street address is specified here and in the CSR, If there is a street address in the CSR, |
||
|
conditional |
string |
128 chars |
The city in which the organization operates. Providing it in any product request that requires organization validation can help speed up the validation process.
If a locality name is specified here and in the CSR, If there is a locality name in the CSR, |
||
|
conditional |
string |
128 chars |
The state or province in which the organization operates. If a state or province name is specified here and in the CSR, If there is a state or province name in the CSR, |
||
|
conditional |
string |
40 chars |
The company’s postal code. If a postal code is specified here and in the CSR, If there is a postal code in the CSR, |
||
|
conditional |
string |
2 chars |
An ISO 3166 two-character country code. If a country name is specified here and If there is a country name in the CSR, |
||
|
optional |
string |
64 chars |
The registration number of the organization provided for validation purposes. |
||
|
optional |
string |
64 chars |
(OV/EV certificates only) The applicant representative’s job title which is used for the organizational callback by Sectigo. Required when Sectigo will perform the organizational callback. |
||
|
optional |
string |
64 chars |
The applicant representative’s name which is used for the organizational callback by Sectigo. Required when Sectigo will perform the organizational callback. |
||
|
optional |
string |
64 chars |
The applicant representative’s last name which is used for the organizational callback by Sectigo. Required when Sectigo will perform the organizational callback. |
||
|
required |
string |
32767 chars |
The Base64-encoded certificate signing request (CSR), with or without the For more information, see CSR parameter structure. |
||
|
optional |
string |
32767 chars |
Proof that the keypair has been generated and stored in secure hardware. The value should be a base64-encoded HSM-specific attestation package/blob. Required for both OV and EV Code Signing certificate when |
||
|
optional |
string |
20 chars |
The hardware type used to generate the keypair in a non-exportable format, CSR and key attestation. The allowed values are:
Required for both OV and EV Code Signing certificate when |
||
|
optional |
char |
1 char |
Specifies which values to use if there are duplicates. For example, if a postal code is specified in both the CSR and as a separate variable. The allowed values are:
If omitted, the value defaults to |
||
|
optional |
char |
1 char |
Indicates whether you wish to get a certificate installed on a token. The allowed values are:
If omitted, the value defaults to |
||
|
conditional |
integer |
Specifies the shipping option. The allowed values are:
Required when |
|||
|
conditional |
string |
128 chars |
The street address where the organization operates for shipping purposes. If no parameters for shipping address are provided, the shipping address defaults to the organization address. Required when |
||
|
conditional |
string |
128 chars |
The city in which the organization operates for shipping purposes. If no parameters for shipping address are provided, the shipping address defaults to the organization address. Required when |
||
|
conditional |
string |
128 chars |
The state or province in which the organization operates for shipping purposes. If no parameters for shipping address are provided, the shipping address defaults to the organization address. Required when |
||
|
conditional |
string |
40 chars |
The organization’s postal code for shipping purposes. If no parameters for shipping address are provided, the shipping address defaults to the organization address. Required when |
||
|
conditional |
string |
2 chars |
An ISO 3166 two-character country code. If no parameters for shipping address are provided, the shipping address defaults to the organization address. Required when |
||
|
conditional |
string |
64 chars |
The name of a natural person who should be specified as a contact person in the courier shipping document. Required when |
||
|
conditional |
string |
64 chars |
The surname of a natural person who should be specified as a contact person in the courier shipping document. Required when |
||
|
conditional |
string |
255 chars |
The email address of a natural person who should be specified as a contact person in the courier shipping document. Required when |
||
|
conditional |
string |
32 chars |
The contact phone number of a natural person who should be specified as a contact person in the courier shipping document. Required when |
||
|
optional |
string |
1024 chars |
The |
||
|
optional |
integer |
Use a particular CA certificate and key. If specified, the This functionality is only available by special agreement with Sectigo. |
|||
|
optional |
string |
255 chars |
The cryptographic service provider. If omitted, the value defaults to 'Microsoft Enhanced Cryptographic Provider v1.0'. |
||
|
optional |
string |
128 chars |
(EV Code Signing with product ID = |
||
|
optional |
string |
128 chars |
(EV Code Signing with product ID = |
||
|
required |
string |
2 chars |
(EV Code Signing with product ID = |
||
|
optional |
string |
64 chars |
(OV/EV Code Signing only) The title of a natural person who is either the applicant, employed by the applicant, or an authorized agent who has authority on behalf of the applicant to sign subscriber agreements. This parameter is optional and may be omitted if the Applicant Representative and the Signer are the same individual.
|
||
|
optional |
string |
64 chars |
(OV/EV Code Signing only) The first name of a natural person who is either the applicant, employed by the applicant, or an authorized agent who has authority on behalf of the applicant to sign subscriber agreements. This parameter is optional and may be omitted if the Applicant Representative and the Signer are the same individual.
|
||
|
optional |
string |
64 chars |
(OV/EV Code Signing only) The surname of a natural person who is either the applicant, employed by the applicant, or an authorized agent who has authority on behalf of the applicant to sign subscriber agreements. This parameter is optional and may be omitted if the Applicant Representative and the Signer are the same individual.
|
||
|
optional |
string |
255 chars |
(OV/EV Code Signing only) The email address of a natural person who is either the applicant, employed by the applicant, or an authorized agent who has authority on behalf of the applicant to sign subscriber agreements. This parameter is optional and may be omitted if the Applicant Representative and the Signer are the same individual.
|
||
|
optional |
string |
32 chars |
(OV/EV Code Signing only) The phone number of a natural person who is either the applicant, employed by the applicant, or an authorized agent who has authority on behalf of the applicant to sign subscriber agreements. This parameter is optional and may be omitted if the Applicant Representative and the Signer are the same individual.
|
||
|
optional |
string |
2 chars |
The language name, specified using ISO639-1 two-character language code. If omitted, the default language is English. An account can contain multiple email templates in different languages for callback, Enterprise Authentication for the instant issuance, or the missing shipping details request. You may specify exactly one of the following values:
If provided, the following parameters override
|
||
|
optional |
integer |
Specifies whether to override Sectigo’s default choice of callback email template to be used to validate this certificate. An account can contain multiple callback email templates. Contact Support for the callback template.
Contact your account manager if you would like to set up one or more of your own callback email templates that can be referenced by this parameter. |
|||
|
optional |
integer |
Specifies whether to override Sectigo’s default choice of shipping email template to be used to process the order. An account can contain multiple email templates. Contact Support for the shipping email templates.
Contact your account manager if you would like to set up one or more of your own shipping mail templates that can be referenced by this parameter. |
|||
|
optional |
integer |
Specifies the Subscriber Agreement email template ID to be used for the order.
|
|||
|
optional |
string |
255 chars |
The validation email address. If specified, Sectigo will validate that this is the email address of the end customer. Sectigo will not send any emails to this email address. Instead Sectigo will trust you, the Partner, to forward emails to this end customer as appropriate. |
||
|
optional |
char |
1 char |
Specifies whether this is a test order. The allowed values are:
If omitted, the value defaults to |
||
|
optional |
char |
1 char |
Specifies the response format. The allowed values are:
|
||
|
optional |
char |
1 char |
Specifies whether to include the certificate ID in the response. The allowed values are:
If omitted, the value defaults to |
||
|
optional |
char |
1 char |
Specifies whether to include the certificate state in the response.
|
Sample request
curl --location 'https://secure.trust-provider.com/products/!AutoApplyOrder' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'loginName=custom-webhost-reseller' \
--data-urlencode 'loginPassword=7*a!ktypmv6z' \
--data-urlencode 'days=365' \
--data-urlencode 'product=8' \
--data-urlencode 'isCustomerValidated=N' \
--data-urlencode 'csr=-----BEGIN CERTIFICATE REQUEST-----
MIHlMIGNAgEAMBoxGDAWBgNVBAMMD2VjY3AyNTYteXViaWtleTBZMBMGByqGSM49
...
HSFDCrmSAiB1JLQujdteQXnXoYPhg9RjgmWjisGkBedFZPYaMJi9bg==
-----END CERTIFICATE REQUEST-----' \
--data-urlencode 'organizationName="VABC Company"' \
--data-urlencode 'organizationalUnitName=DELL' \
--data-urlencode 'streetAddress1=Elm Street 12' \
--data-urlencode 'localityName=Los Angeles' \
--data-urlencode 'stateOrProvinceName=California' \
--data-urlencode 'postalCode=77777' \
--data-urlencode 'countryName=US' \
--data-urlencode 'appRepTitle=mr' \
--data-urlencode 'appRepForename=John' \
--data-urlencode 'appRepSurname=Doe' \
--data-urlencode 'responseFormat=1' \
--data-urlencode '[email protected]' \
--data-urlencode '[email protected]' \
--data-urlencode '[email protected]' \
--data-urlencode 'hsmType=YUBIKEY' \
--data-urlencode 'keyAttestation=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNWVENDQVQyZ0F3SUJBZ0lRQVlKUk9qa1dh
MEoveDhWSkV3VmFEakFOQmdrcWhraUc5dzBCQVFzRkFEQWgKTVI4d0hRWURWUVFEREJaWmRXSnBZ
...
cUVzcjFQdDVJZmtZNTh6MzFUdXJpZC84cnJtckJkVHdnd0l4enUwVHprUmdNbHJWOWJ1QysxbVll
CnFraDJpTVNxQUhXajJoYUViaWVleHA4PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=='
Response
The request is successful when the server returns a response with the error code 0.
Any error code less than 0 indicates an error condition, and the error message provides additional details.
Error responses are returned in application/x-www-form-urlencoded format.
Response format 0 (Plain text)
The MIME type will be text/plain for responseFormat=0 (by default).
The first line of the response contains a status code.
Whether 0 or 1 is returned for successful orders depends on how your account is configured with Sectigo.
Usually, you will take payment from your customer and Sectigo will debit your account funds when you place the order.
However, in special circumstances it can be arranged for Sectigo to take payment from your customer on your behalf.
|
If the status code is less than 0, the second line of the response contains an error message describing the error.
If the status code is greater than or equal to 0, the response can contain the following lines which provide:
| Line | Possible Value | Description |
|---|---|---|
Line 1 |
The status of the order. For more information, see Error codes. |
The status code. |
Line 2 |
An integer. |
The second line contains an order number. |
Line 3 |
The amount in your account’s native currency, without a currency symbol. |
|
Line 4 |
The expected delivery time. |
This value can be ignored and has been deprecated for Code Signing. |
Line 5 (if applicable) |
The internal certificate ID of the certificate purchased by this order. |
The certificate ID, up to 16 digits.
Returned if |
Line 5 or 6 (if applicable) |
A unique alphanumeric value up to 20 characters long. |
The certificate state.
Returned if |
Response format 1 (URL-encoded)
Most of Sectigo’s API endpoints use URL-encoded responses.
AutoApplyOrder can return responses in the same format by specifying responseFormat=1 in the request.
The MIME type will be application/x-www-form-urlencoded for responseFormat=1.
The following table displays the various parameters that can appear for responseFormat=1.
| Parameter | Description |
|---|---|
|
A numeric code that identifies the type of error and is always present in the response. For more information, see Error codes. |
|
A description of the error.
|
|
An integer.
This parameter is only present when |
|
The amount in your account’s native currency, without a currency symbol.
This parameter is only present when |
|
This value can be ignored and has been deprecated for Code Signing.
|
|
The internal certificate ID of the certificate purchased by this order.
This parameter is only present when |
|
The status of the certificate purchased by this order.
This parameter is only present when |
Error codes
| Error Code | Error Message | Description |
|---|---|---|
|
|
The request must use HTTPS protocol. |
|
|
The provided argument is not recognized. |
|
|
A required argument is missing from the request. |
|
|
The argument value does not meet validation requirements. |
|
|
The Common Name in the certificate signing request (CSR) must not include a wildcard character. |
|
|
The Common Name in the CSR must include exactly one wildcard character. |
|
|
The specified country code is not valid according to the ISO-3166 standard. |
|
|
The CSR does not include all required fields. |
|
|
The CSR must be encoded in valid Base-64 format. |
|
|
The CSR could not be decoded properly. |
|
|
The CSR’s algorithm is not supported. |
|
|
The signature on the CSR is invalid. |
|
|
The key size in the CSR is not supported. |
|
|
An unknown error occurred. |
|
|
The account does not have sufficient credit. |
|
|
The user does not have permission to access the |
|
|
The request method should be POST. |
|
|
Common Names must not be a fully qualified domain name (FQDN). |
|
|
Common Name must not be an Internet-accessible IP address. |
|
|
Common Name must not be an Internet-accessible IP address. |
|
|
The CSR’s key is on the compromised key list. |
|
|
The specified PlanID for the product could not be found. |
|
|
The specified parameter can only be used with license products. |
|
|
The provided email address is not valid. |
|
|
The order can include only one Web Package product. |
|
|
The specified argument is not applicable for the current order. |
|
|
The order must include the specified item. |
|
|
The user does not have permission for the specified context. |
|
|
The user does not have permission for the specified context. |
|
|
An internal error occurred while decoding the CSR. |
|
|
The Tier1 credit/debit processing encountered an internal error. |
|
|
The Tier1 credit/debit processing encountered an internal error. |
|
|
The Tier1 credit/debit processing encountered an internal error. |
|
|
The specified |
|
|
No price information available for the specified item. |
|
|
The provided item cost is incorrect. |
|
|
The provided item cost is incorrect. |
|
|
The specified product identifier is incorrect. |
|
|
An internal error occurred. |
|
|
Semantic error. TAX is no longer a valid value. Use TIN instead. |
|
|
Semantic error. The format of the provided identifier is incorrect. |
|
|
Semantic error. The country code in the provided identifier is incorrect. |
|
|
An error occurred during key attestation verification for the specified context. |
|
|
The user does not have sufficient privileges to order the specified product type. |
|
|
The specified parameter is not valid for this product type. |