Request
Endpoint: CollectMC
https://secure.trust-provider.com/products/download/CollectMC
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 |
integer |
The order number of the account. |
|
|
optional |
integer |
Specifies the format of the returned certificate data. The allowed values are:
|
|
|
optional |
integer |
Specifies the encoding of the returned certificate data. The allowed values are:
|
Sample request
curl --location 'https://secure.trust-provider.com/products/download/CollectMC' \
--data-urlencode 'loginName=login_name' \
--data-urlencode 'loginPassword=login_password' \
--data-urlencode 'orderNumber=order_number' \
--data-urlencode 'RESPONSETYPE=2' \
--data-urlencode 'RESPONSEENCODING=1'
Response
The request is successful when the server returns a response with the status code >= 0:
-
2— Certificates attached. -
1— Certificates available. -
0— Being processed by Sectigo.
Any status code less than 0 indicates an error condition.
|
The list of codes and their descriptions can be found in Error codes. |
The response format depends on the value of the responseEncoding parameter in the request.
If responseEncoding=1, the certificate(s) are available and no error occurred, the output will consist simply of the requested binary structure.
If responseEncoding=0, the output will be formatted like one of the following:
-
If the status code is greater than
0, the output will be displayed as the value ofresponseMimeTypeortext/plain. -
If the status code is less than or equal to
0, the output will be displayed astext/plain.
If the status code is less than 0, the response contains a textual representation of the error message.
If the status code equals 2, the response contains the encoded certificate(s):
----- BEGIN CERTIFICATE -----
Encoded Root Certificate
----- END CERTIFICATE -----
----- BEGIN CERTIFICATE -----
Encoded Intermediate Certificate
----- END CERTIFICATE -----
----- BEGIN CERTIFICATE -----
Encoded End Entity Certificate
---- END CERTIFICATE -----
Sample success response
-----BEGIN PKCS7-----
MIIbWQYJKoZIhvcNAQcCoIIbSjCCG0YCAQExDTALBglghkgBZQMEAgEwDwYJKoZI
hvcNAQcBoAIEAKCCGHEwggzyMIILWqADAgECAhBLVWcU36fkE8Hi/55APse9MA0G
...
Hi4ZaP9ok+JrTdy01WOmCnuAIaOUdM+w3wb+DSNLh9MoqqeM2mBZdC7EGthYeg+O
RhZWrKZng/nCi4Pt0PQrKEFNaMdscl+0rnrQA+U6llop7fmztjhKtOwDR6bQ
-----END PKCS7-----
Error codes
The following table outlines error responses returned by the CollectMC 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 provided value for the 'xxxx' argument is invalid. |
|
|
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 is in the rejected state. |
|
|
The requested certificate is in the revoked state. |
|
|
The payment for the order is still pending. |
|
|
The user does not have the permission to perform the specified action. |
|
|
An error occurred while attempting to collect the certificate. |