Page tree
Skip to end of metadata
Go to start of metadata

 

Description

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

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Market/cancel_pending_ssl_certificate?provider=cPStore&order_item_id=8675309

Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Cancel certificate order and stop polling.
$ohnoesdoesnotwant = $cpanel->uapi(
    'Market', 'cancel_pending_ssl_certificate',
    array(
        'provider'        => 'cPStore',
        'order_item_id'   => '8675309'
  )
);

Note:

For more information, read our Guide to the LiveAPI System.

 

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Cancel certificate order and stop polling
my $ohnoesdoesnotwant = $cpliveapi->uapi(
    'Market', 'cancel_pending_ssl_certificate',
    {
        'provider'         => 'cPStore',
        'order_item_id'    => '8675309'
  }
);

Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Template Toolkit
<!-- Cancel certificate order and stop polling -->
[% execute('Market', 'cancel_pending_ssl_certificate', { provider => 'cPStore','order_item_id'=>'8675309' } ) %]

Note:

For more information, read our Guide to Template Toolkit documentation. 

 

 Command Line
uapi --user=username Market cancel_pending_ssl_certificate provider=cPStore order_item_id=8675309

Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (JSON)
{    
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  
      "transformed":1
   },
   "data":[  
      {  
         "domains":[  
            "example1.com",
            "example2.com"
         ],
         "created_time":"1458061262",
         "csr":"-----BEGIN CERTIFICATE REQUEST-----\nMIIC0TCCAbkCAQAwGzEZMBcGA1UEAxMQY29icmFzc2x0ZXN0Lm9yZzCCASIwDQYJ\nKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKsZWNkF8hjUjoCDNNSkXO0CTp/z/0pu\niFiDMzdFAa6mg5wr97EwRBCniSvJEJ1rdQ0Sus2AAK9hg7TeZAWbFf97r7mS0chm\nr27Ht9qfit3r0EJLYcjRjnZ/wj21ZhsdjQIjjTRiI1TvXtOQRAQpWNsGxK7QV3Q3\nnjkSM/gTpteHuC3JAQxbpv72B+IjiyzUZr8DOUOoB94IO5iP27UXnkSbExInDvqu\nK43zVGYNU0Zev20A6SBWU3BALjWXHlYjwbC109FxOWNssHTg3xvePsBxzk6BFDcT\nS/QAS0tFYPfHZKmCBg6irBGFOdTjSDVmFk8zAoFYibev0juRJCMn2XsCAwEAAaBx\nMG8GCSqGSIb3DQEJDjFiMGAwXgYDVR0RAQH/BFQwUoIQY29icmFzc2x0ZXN0Lm9y\nZ4IUd3d3LmNvYnJhc3NsdGVzdC5vcmeCEWNwYW5lbHNzbHRlc3Qub3JnghV3d3cu\nY3BhbmVsc3NsdGVzdC5vcmcwDQYJKoZIhvcNAQELBQADggEBAG0l4aChMO1rSmgR\nSF5qlKu785n5YS5rTE9ev+OFu0952DvjVAB0R8y5+TZSXfg+9CH7pa2VDosAEYF4\nyjUJOuiwwVEUD/9Qhrls/2xT8KKk0QSxuWmOgP2YQy/QRH+W7ykoigtiWdXEIUuF\niJmeavS8JOYt560366V3dw7YT+QstUHQ7UlGEFDeWQI3osUN1wDrtW5qcaq09Q/G\nTcphzXrRkL5lRjKXKLIcY/HVYzOnoEX30ALX2I3bJ9s4IMRfpnhTqLmWalcr+4vq\nvqVnlB0B/nXf/qaB/xvxmEtSGx/GZ/8Gsrf5PB7GhRuStUtJoXcLuADK0bgug3X2\nGxEruS4=\n-----END CERTIFICATE REQUEST-----\n",
         "first_poll_time":1458061262,
         "last_poll_time":1458061262,
         "support_uri":"http://support.example.com",
         "order_id":1392472,
         "order_item_id":10427508,
         "product_id":143,
         "provider":"cPStore",
         "status":"confirmed",
         "vhost_names":[  
            "abcde.com"
         ],
         "last_status_code": "CertificateNotFound",
         "expired": 0
      }
   ]
}

Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
providerstring

Required

The cPanel Market provider's name.

A valid string.

cPStore
order_item_idstring

Required

The ID of the ordered item to cancel.

A valid string.8675309

 

Returns

ReturnTypeDescriptionPossible valuesExample
 hashA hash of order information.This hash includes the   created_time , csr , first_poll_time , last_poll_time , support_url, order_id , order_item_id , product_id , provider , status, last_status_code, and expired returns, and the domains and vhost_names arrays. 

domains

array

A list of domains on the certificate.

The function returns this value in the unnamed hash.

An array of valid domain names.
example1.com,example2.com

created_time

string

When the system created the order.

The function returns this value in the unnamed hash.

A date in Unix time format.
1458061262
              

csr

string

The text of the Certificate Request (CSR).

The function returns this value in the unnamed hash.

A certificate request file in Base64 PEM format.
 Click to view...
-----BEGIN CERTIFICATE REQUEST-----\nMIIC0TCCAbkCAQAwGzEZMBcGA1UEAxMQY29icmFzc2x0ZXN0Lm9yZzCCASIwDQYJ\nKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKsZWNkF8hjUjoCDNNSkXO0CTp/z/0pu\niFiDMzdFAa6mg5wr97EwRBCniSvJEJ1rdQ0Sus2AAK9hg7TeZAWbFf97r7mS0chm\nr27Ht9qfit3r0EJLYcjRjnZ/wj21ZhsdjQIjjTRiI1TvXtOQRAQpWNsGxK7QV3Q3\nnjkSM/gTpteHuC3JAQxbpv72B+IjiyzUZr8DOUOoB94IO5iP27UXnkSbExInDvqu\nK43zVGYNU0Zev20A6SBWU3BALjWXHlYjwbC109FxOWNssHTg3xvePsBxzk6BFDcT\nS/QAS0tFYPfHZKmCBg6irBGFOdTjSDVmFk8zAoFYibev0juRJCMn2XsCAwEAAaBx\nMG8GCSqGSIb3DQEJDjFiMGAwXgYDVR0RAQH/BFQwUoIQY29icmFzc2x0ZXN0Lm9y\nZ4IUd3d3LmNvYnJhc3NsdGVzdC5vcmeCEWNwYW5lbHNzbHRlc3Qub3JnghV3d3cu\nY3BhbmVsc3NsdGVzdC5vcmcwDQYJKoZIhvcNAQELBQADggEBAG0l4aChMO1rSmgR\nSF5qlKu785n5YS5rTE9ev+OFu0952DvjVAB0R8y5+TZSXfg+9CH7pa2VDosAEYF4\nyjUJOuiwwVEUD/9Qhrls/2xT8KKk0QSxuWmOgP2YQy/QRH+W7ykoigtiWdXEIUuF\niJmeavS8JOYt560366V3dw7YT+QstUHQ7UlGEFDeWQI3osUN1wDrtW5qcaq09Q/G\nTcphzXrRkL5lRjKXKLIcY/HVYzOnoEX30ALX2I3bJ9s4IMRfpnhTqLmWalcr+4vq\nvqVnlB0B/nXf/qaB/xvxmEtSGx/GZ/8Gsrf5PB7GhRuStUtJoXcLuADK0bgug3X2\nGxEruS4=\n-----END CERTIFICATE REQUEST-----\n

first_poll_time

string

The first time that the system polled the provider for the certificate.

The function returns this value in the unnamed hash.

A date in Unix time format.1458061262

last_poll_time

string

The last time that the system polled the provider for the certificate.

The function returns this value in the unnamed hash.

A date in Unix time format.1458061262

support_uri

string

The URI of the cPanel Market Provider's support site.

The function returns this value in the unnamed hash.

A valid URI.http://support.example.com/

order_id

string

The ID of the order.

The function returns this value in the unnamed hash.

A valid string.
1392472

order_item_id

string

The ID of the ordered item.

The function returns this value in the unnamed hash.

A valid string.
10427508

product_id

string

The product's ID.

The function returns this value in the unnamed hash.

A valid string.
143

provider

string

The cPanel Market provider's name.

The function returns this value in the unnamed hash.

A valid string.
cPStore

status

string

The status of the order.

The function returns this value in the unnamed hash.

  • confirmed — Payment confirmed.
  • unconfirmed — Payment not confirmed.
confirmed
              

vhost_names

array

A list of virtual host names.

The function returns this value in the unnamed hash.

An array of valid virtual host names.
abcde.com

last_status_code

string

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.
CertificateNotFound

expired

Boolean

Whether the system has deleted the item from the pending queue.

The function returns the value in the unnamed hash.

  • 1 — Deleted.
  • 0Not deleted.
0