cPanel/Market
cPanel module

Market

19 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Market", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

cancel_pending_ssl_certificate GET#

Delete an order

This function cancels an order and removes the polling for a pending certificate.

order_item_idstringRequired
The ID of the ordered item to cancel.
providerstringRequired
The cPanel Market provider's name.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

created_timeinteger
When the system created the order.
csrstring
The text of the Certificate Request (CSR).
domainsarray<string>
A list of domains on the certificate.
expiredinteger
Whether the system has deleted the item from the pending queue. 1 - Deleted. 0 - Not deleted.
One of: 0 1
first_poll_timeinteger
The first time that the system polled the provider for the certificate.
last_poll_timeinteger
The last time that the system polled the provider for the certificate.
last_status_codestring
The last status code of the order. CertificateNotFound - The system cannot locate the specified certificate. RequiresApproval - The specified certificate requires approval. OrderCanceled - The system cancelled the order of the specified certificate. OrderItemCanceled - The system cancelled the order item of the specified certificate.
One of: CertificateNotFound RequiresApproval OrderCanceled OrderItemCanceled
order_idstring
The ID of the order.
order_item_idstring
The ID of the ordered item.
product_idstring
The product's ID.
providerstring
The cPanel Market provider's name.
statusstring
The status of the order. confirmed - Payment confirmed. unconfirmed - Payment not confirmed.
One of: confirmed unconfirmed
support_uristring
The URI of the cPanel Market Provider's support site.
vhost_namesarray<string>
A list of virtual host names.

create_shopping_cart GET#

Create shopping cart

This function creates a shopping cart with which the system sends an order to the cPanel Store. Typically, the system will send shopping cart orders for SSL certificates to UAPI’s Market::request_ssl_certificates function.

access_tokenstringRequired
The access token to connect to the provider.
itemarray<any>Required
The items to add to the shopping cart. Note: The value is a JSON string. This object has one required key, product_id, which is a string. The other keys/values in this object vary depending on the provider.
providerstringRequired
The cPanel Market provider’s name.
url_after_checkoutstringRequired
The location to which the provider directs the user after the checkout process is complete.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

checkout_urlstring
The location of the provider’s check out page.
order_idstring
The order’s ID.
order_itemsarray<object>
An array of objects that contain information about Items in the shopping cart. The function returns these values in the order in which you called them. This array of objects returns values that vary between providers.

create_shopping_cart_non_ssl GET#

Create shopping cart for non-SSL products

This function creates a shopping cart for non-SSL products. It validates the access token, retrieves product information, creates a shopping cart with the provider, and returns the order details and checkout URL.

access_tokenstringRequired
The access token obtained during login to the cPanel Market provider.
product_namestringRequired
The name of the product to purchase.
url_after_checkoutstringRequired
The URL to which the provider redirects the user after the checkout process is complete.
domainstringOptional
The domain associated with the product purchase. This parameter is optional.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

checkout_urlstring
The URL of the provider's checkout page.
order_idstring
The order ID assigned by the provider.
order_items_refarray<object>
An array of objects that contain information about the items in the shopping cart. The values returned vary between providers.

get_all_products GET#

Return provider's available products

This function lists all products available through all enabled cPanel Market providers.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

Payload varies by call.

get_build_cart_url GET#

Build cart URL for a product

This function builds the URL for the shopping cart page for the specified product. The system saves session data and constructs a full cPanel URL pointing to the product purchase page.

product_namestringRequired
The name of the product for which to build the cart URL.
domainstringOptional
The domain associated with the product purchase. This parameter is optional.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

urlstring
The full cPanel URL for the product purchase cart page, including the security token.

get_certificate_status_details GET#

Return provider's SSL certificate request status

This function returns the status of an SSL certificate request. The returns include actionable URLs for users to expedite the validation process, if applicable.

Important:

Because this function returns data from a dynamic source, the returns in each object can vary.

order_item_idintegerRequired
The order ID that the cPanel Market provider assigned.
providerstringRequired
The cPanel Market provider's name.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

actionUrlsobject
An object that contains actionable URLs.
evClickThroughStatusstring
A URL that a user can use to expedite the validation process for Extended Validation (EV) certificates.
ovCallbackStatusstring
A URL that a user can use to expedite the validation process for Organization Validated (OV) certificates.
domain_detailsobject
An object that contains information about the domain.
domainstring
The Fully Qualified Domain Name (FQDN) that the function queries.
statusstring
The status of the domain's certificate. VALIDATED - The domain has been validated. NOTVALIDATED - The domain has not been validated. * AWAITINGBRAND - The domain has not been validated, and is awaiting brand approval.
One of: VALIDATED NOTVALIDATED AWAITINGBRAND
status_detailsobject
An object that contains specific information about the validation process.
brandValStatusstring
Whether the brand validation status has completed. not applicable - This is not applicable for the certificate. not-completed - The certificate's brand validation is not complete. completed - The certificate's brand validation is complete. in-progress - The certificate's brand validation is in progress.
One of: not applicable not-completed completed in-progress
certificateStatusstring
Whether the provider has issued the SSL certificate. not applicable - This is not applicable for the certificate. not-completed - The certificate's issue is not completed. completed - The provider has issued the certificate. in-progress - The certificate's issue is in progress.
One of: not applicable not-completed completed in-progress
csrStatusstring
Whether the certificate signing request (CSR) has completed. not applicable - This is not applicable for the certificate. not-completed - The CSR for the certificate is not complete. completed - The CSR for the certificate is complete. in-progress - The CSR for the certificate is in progress.
One of: not applicable not-completed completed in-progress
dcvStatusstring
Whether Domain Control Validation (DCV) has completed. not applicable - This is not applicable for the certificate. not-completed - The DCV for the certificate is not complete. completed - The DCV for the certificate is complete. in-progress - The DCV for the certificate is in progress.
One of: not applicable not-completed completed in-progress
evClickThroughStatusstring
Whether every requirement for the EV certificate has completed. not applicable - This is not applicable for the certificate. not-completed - The EV certificate's requirements check is not complete. completed - The EV certificate's requirements check is complete. in-progress - The EV certificate's requirements check is in progress. For more information, read Sectigo's What is required for validation? documentation.
One of: not applicable not-completed completed in-progress
freeDVUPStatusstring
Whether every requirement for the Domain Validated (DV) certificate has completed. not applicable - This is not applicable for the certificate. not-completed - The DV certificate's requirements check is not complete. completed - The DV certificate's requirements check is complete. in-progress - The DV certificate's requirements check is in progress.
One of: not applicable not-completed completed in-progress
organizationValidationStatusstring
Whether every requirement for the OV certificate has completed. not applicable - This is not applicable for the certificate. not-completed - The OV certificate's requirements check is not complete. completed - The OV certificate's requirements check is complete. in-progress - The OV certificate's requirements check is in progress.
One of: not applicable not-completed completed in-progress
ovCallbackStatusstring
Whether the Certificate Authority (CA) has verified the organization's validity via a phone call. not applicable - This is not applicable for the certificate. not-completed - The CA has not verified the organization's validity via phone. completed - The CA has verified the organization's validity via phone. in-progress - The CA's verification of the organization's validity via phone is in progress.
One of: not applicable not-completed completed in-progress
validationStatusstring
Whether the validation process has completed. not applicable - This is not applicable for the certificate. not-completed - The certificate's validation is not complete. completed - The certificate's validation is complete. in-progress - The certificate's validation is in progress.
One of: not applicable not-completed completed in-progress

get_completion_url GET#

Get product purchase completion URL

This function builds the full cPanel URL for the product purchase completion page. The URL includes the security token and points to the completion page for the specified product.

product_namestringRequired
The name of the product for which to retrieve the completion URL.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

completion_urlstring
The full cPanel URL for the product purchase completion page, including the security token.

get_license_info GET#

Retrieve license information for a domain

This function retrieves license information for the specified domain from the cPanel Store and saves it to the current session.

domainstringOptional
The domain for which to retrieve license information. This parameter is optional.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

This function does not return data.

get_login_url GET#

Return provider's login URL

This function retrieves the login URL for the cPanel Market provider.

providerstringRequired
The cPanel Market provider's name.
url_after_loginstringRequired
Where the cPanel Market provider redirects the user's browser after they log in.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

The URL to which to redirect the browser after login.

get_pending_ssl_certificates GET#

Return provider's pending SSL certificates

This function lists all pending SSL certificates from a cPanel Market provider for which the system currently polls.

providerstringRequired
The cPanel Market provider's name.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

created_timeinteger
When the system placed the order.
csrstring
The certificate signing request's (CSR) text. A CSR file in Base64 PEM format.
domainsarray<string>
The domains on the certificate.
expiredinteger
Whether the pending queue item has been deleted. 1 - Deleted. 0 - Not deleted.
One of: 0 1
first_poll_timeinteger
The first time that the system polled the provider for the certificate.
identity_verificationobject
hash that contains information to verify an OV or EV certificate request. Notes: The function returns this hash for OV or EV certificate requests. This hash includes returns that vary between certificate providers. The output example demonstrates what the cPStore returns for an OV certificate.
last_poll_timeinteger
The last time that the system polled the provider for the certificate.
last_status_codestring
The last status code of the order. The function returns the value in the unnamed hash. CertificateNotFound - The system cannot locate the specified certificate. RequiresApproval - The specified certificate requires approval. OrderCanceled - The system canceled the order of the specified certificate. OrderItemCanceled - The system canceled the order item of the specified certificate.
One of: CertificateNotFound RequiresApproval OrderCanceled OrderItemCanceled
order_idstring
The ID of the order.
order_item_idstring
The ID of the ordered item.
product_idstring
The product's ID.
providerstring
The cPanel Market provider's name.
statusstring
The status of the order. confirmed - Payment confirmed. unconfirmed - Payment not confirmed.
support_uristring
The URI of the cPanel Market Provider's support site.
vhost_namesarray<string>
The virtual host domains on the certificate.

get_product_info GET#

Retrieve product information

This function retrieves product information for the specified product name, including the product ID, redirect path, and redirect URLs for successful and failed purchases.

product_namestringRequired
The name of the product for which to retrieve information.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

product_idstring
The product's identifier in the cPanel Store.
redirect_pathstring
The cPanel path to redirect to after a purchase attempt.
redirect_url_failurestring
The full cPanel URL to redirect to after a failed purchase, including the security token and relevant query string parameters.
redirect_url_successstring
The full cPanel URL to redirect to after a successful purchase, including the security token and relevant query string parameters.

get_provider_specific_dcv_constraints GET#

Return provider's DCV filename requirements

This function returns the provider's filename requirements for Domain Control Validation (DCV) checks.

providerstringRequired
The cPanel Market provider's name.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

dcv_file_allowed_charactersarray<array<any>>
An array that lists the characters which the provider allows in the DCV check file's filename.
dcv_file_extensionstring
The DCV check file extension that the provider requires.
dcv_file_random_character_countinteger
The number of characters that the provider allows in the DCV check file's filename.
dcv_file_relative_pathstring
The path to the DCV check file, relative to the domain's document root directory.
dcv_max_redirectsinteger
The maximum number of HTTP redirects the provider allows.
dcv_user_agent_stringstring
The user agent string that the system will use for the imitated local DCV check.

get_providers_list GET#

Return enabled providers

This function lists the names of enabled cPanel Market providers.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

display_namestring
The cPanel Market provider's display name.
namestring
The cPanel Market provider's name.

get_ssl_certificate_if_available GET#

Return provider's available SSL certificates

This function retrieves SSL certificates when they are available from the cPanel Market provider.

order_item_idstringRequired
The order item for which to poll.
providerstringRequired
The cPanel Market provider's name.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

certificate_pemstring
The certificate's text. null - The certificate is not available. A certificate file in Base64 PEM format.
encrypted_action_urlsobject
An object that contains encrypted URLs a user must click to complete their SSL certificate order. Note: This return may also contain additional key values. For more information, read Sectigo's documentation.
evClickThroughStatusstring
A URL the user must click to electronically sign an agreement for their Extended Validation (EV) certificate. An encrypted URL. null - No action required.
ovCallbackStatusstring
URL the user must click to verify their identity by phone to complete their Organization Validation (OV) certificate order. An encrypted URL. null - No action required.
status_codestring
The status code of the certificate.
status_messagestring
An error message from the certificate provider. For example, why a certificate authority rejected an SSL certificate. Note: If no error message exists, this will return an empty string.

process_ssl_pending_queue GET#

Start processing pending queue's SSL certificates

This function manually processes the cPanel Market's SSL certificate request pending queue.

No parameters.

Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:

certificate_pemstring
The text of the certificate, if available. * null - The certificate is not available.
created_timeinteger
When the system placed the order.
csrstring
The Certificate Signing Request's (CSR's) text.
deletedinteger
Whether the system has deleted the item from the pending queue. 0 - Deleted. 1 - Not deleted.
One of: 0 1
domainsarray<string>
A list of domains that the certificate request covers.
expiredinteger
Whether the system has deleted the item from the pending queue. 1 - Deleted. 0 - Not deleted.
One of: 0 1
first_poll_timeinteger
The first time that the system polled the provider for the certificate.
installedinteger
Whether the system installed the certificate. 1 - Installed. 0 - Not installed.
One of: 0 1
last_poll_timeinteger
The last time that the system polled the provider for the certificate.
last_status_codestring
The last status code of the order. CertificateNotFound - The system cannot locate the specified certificate. RequiresApproval - The specified certificate requires approval. OrderCanceled - The system canceled the order of the specified certificate. OrderItemCanceled - The system canceled the order item of the specified certificate.
One of: CertificateNotFound RequiresApproval OrderCanceled OrderItemCanceled
last_status_messagestring
An error message from the certificate provider. For example, why a certificate authority rejected an SSL certificate. Note: If no error message exists, this will return an empty string.
order_idstring
A unique identifier for the order.
order_item_idstring
A unique identifier of each item in the order.
product_idstring
An identifier for a given product.
providerstring
The cPanel Market provider's name.
statusstring
The status of the order. confirmed - Payment confirmed. unconfirmed - Payment not confirmed.
One of: confirmed unconfirmed
vhost_namesarray<string>
A list of virtual host names.

request_ssl_certificates GET#

Request SSL certificate order

This function submits a request for a certificate order to the cPanel Market provider.

access_tokenstringRequired
The access token for the session to the cPanel Market provider.
certificatemixedRequired
A JSON-encoded string that contains the details of the certificate. Note: To request multiple certificates, duplicate or increment the parameter name. For example, to request three certificates, use the certificate parameter multiple times or use the certificate-1, certificate-2, and certificate-3 parameters.
providerstringRequired
The cPanel Market provider's name.
identity_verificationmixedOptional
An object containing the required information for an EV or OV certificate. This information depends on the provider of the certificate. Note: The function returns this object for OV or EV certificate requests.
url_after_checkoutstringOptional
The URL to send the browser after the user checks out. Note: This URL does not contain a query string.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

certificatesobject
Information about each certificate in the order.
key_idstring
The private key's ID.
order_item_idinteger
The ID of the ordered item.
checkout_urlstring
The URL that the cPanel Market provider uses to process payment.
order_idinteger
The order ID that the cPanel Market provider assigned.

set_status_of_pending_queue_items GET#

Update status of items in pending queue

This function sets the status of an item or items in the cPanel Market pending queue.

order_item_idstringRequired
The ID of the ordered item. Note: To set the status for multiple items, duplicate or increment the parameter name. For example, to change the status for three certificates, use the order_item_id parameter multiple times or use the order_item_id-1, order_item_id-2, and order_item_id-3 parameters.
providerstringRequired
The cPanel Market provider's name.
statusstringRequired
The new status of the item in the cPanel Market pending queue. * confirmed — The system confirmed payment for the item with the provider.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

error_typestring
The type of error that the function encountered. * EntryDoesNotExist — The returned order_item_ids do not exist in the cPanel Market pending queue for the user.
One of: EntryDoesNotExist
order_item_idsarray<integer>
An array that lists order item IDs which do not exist in the cPanel Market pending queue for the user.

set_url_after_checkout GET#

Update URL after checkout

This function updates the URL to which a provider sends a user after they check out.

access_tokenstringRequired
The access token for the session to the cPanel Market provider.
order_idintegerRequired
The order ID that the cPanel Market provider assigned.
providerstringRequired
The cPanel Market provider's name.
url_after_checkoutstringRequired
The URL to send the browser after the user checks out.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

error_typestring
Any errors that the function encounters.

validate_login_token GET#

Validate login token

This function validates a login token to a cPanel Market provider and returns an access token.

login_tokenstringRequired
The login token for the cPanel Market provider.
providerstringRequired
The name of the cPanel Market provider.
url_after_loginstringRequired
The url_after_login value that you sent to UAPI's Market::get_login_url function.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

access_tokenstring
The access token that returns from the code parameter after you log in.