API Module SSL createSslCertRequest

From Openprovider API documentation

Jump to: navigation, search

Contents

Module SSL certificates > Create Order

Module SSL certificates
Command name createSslCertRequest
Use Use this call to order a new SSL certificate
Input
  • productId
  • period
  • csr
  • softwareId (linux or windows)
  • hostNames
  • organizationHandle
  • technicalHandle
  • approverEmail
  • signatureHashAlgorithm (sha1 or sha2 (default) for all certificate types. sha256-ecc-full or sha256-ecc-hybrid for Secure Site Pro and Scure Site Pro with EV certificates.)
  • domainValidationMethods
  • startProvision (0 (order won't be sent to CA, will be in status PAI. To request it use method modifySslCertRequest) or 1 (default, order will be requested in CA))
  • autorenew (on or off (default))
Parameters that must be sent with startProvision = 0
  • domainAmount (amount of domains to buy)
Output
  • id

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('createSslCertRequest')
  ->setAuth(array('username' => 'username', 'password' => 'password'))
  ->setArgs(array(
    'productId' => 5,
    'period' => 2,
    'csr' => '-----BEGIN CERTIFICATE REQUEST-----
MIIBvzCCASgCAQAwfzELMAkGA1UEBhMCTkwxCzAJBgNVBAgTAlpIMQ0wCwYDVQQH
EwRSZGFtMQ8wDQYDVQQKEwZSb29yZGExHDAaBgNVBAMTE8d3dy5zaWVtZW5yb29y
ZGEubmwxJTAjBgkqhkiG9w0BCQEWFnNpZW1lbkBzbWVtZW5yb29yZGEubmwwgZ8w
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKo5t1d4ka11M6NSUca2KBJS8d3a7lPh
7xlMAyNAvI68EQJEbPJ0UPxM9AiIS4HoVzXSGrP7lqwR8mQhM5HZkXAvvKfUnoN9
BD4/k9Z/uErqtED/FQuOknmnHvgvAJewfTaaSN4+tbs1d54Yux9B/XeIhqyiWv9o
cRNh+gBMW8OLAgMBAAGgADANBgkqhkiG9w0BAQQFAAOBgQBFTxJ12R6juNaWQtmm
JMWPrv0MDosDOIBZrCZoyF+VStANG8PoTg1VD7RgG+pZItCcp/X5MrHNsUUnySW5
kUaUx8Z21OOaoYjlHZTUaGfX5VKjjKH3NZ373Xms6Y9PcbX2nhvfo8IFSgnWKXD8
7Vyp67kPlzocoO3rcGd+PmU/aQ==
-----END CERTIFICATE REQUEST-----',
    'softwareId' => 'linux',
    'organizationHandle' => 'GA003358-NL',
    'technicalHandle' => 'GA003358-NL',
    'approverEmail' => 'info@openprovider.nl'
   ));

Raw XML

Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.

<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <createSslCertRequest>
    <productId>5</productId>
    <period>2</period>
    <csr>-----BEGIN CERTIFICATE REQUEST-----
MIIBvzCCASgCAQAwfzELMAkGA1UEBhMCTkwxCzAJBgNVBAgTAlpIMQ0wCwYDVQQH
EwRSZGFtMQ8wDQYDVQQKEwZSb29yZGExHDAaBgNVBAMTE8d3dy5zaWVtZW5yb29y
ZGEubmwxJTAjBgkqhkiG9w0BCQEWFnNpZW1lbkBzbWVtZW5yb29yZGEubmwwgZ8w
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKo5t1d4ka11M6NSUca2KBJS8d3a7lPh
7xlMAyNAvI68EQJEbPJ0UPxM9AiIS4HoVzXSGrP7lqwR8mQhM5HZkXAvvKfUnoN9
BD4/k9Z/uErqtED/FQuOknmnHvgvAJewfTaaSN4+tbs1d54Yux9B/XeIhqyiWv9o
cRNh+gBMW8OLAgMBAAGgADANBgkqhkiG9w0BAQQFAAOBgQBFTxJ12R6juNaWQtmm
JMWPrv0MDosDOIBZrCZoyF+VStANG8PoTg1VD7RgG+pZItCcp/X5MrHNsUUnySW5
kUaUx8Z21OOaoYjlHZTUaGfX5VKjjKH3NZ373Xms6Y9PcbX2nhvfo8IFSgnWKXD8
7Vyp67kPlzocoO3rcGd+PmU/aQ==
-----END CERTIFICATE REQUEST-----</csr>
    <softwareId>linux</softwareId>
    <organizationHandle>GA003358-NL</organizationHandle>
    <technicalHandle>GA003358-NL</technicalHandle>
    <approverEmail>info@openprovider.nl</approverEmail>
  </createSslCertRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    < code>0</code>
    <desc />
    <data>
      <id>2480</id>
    </data>
  </reply>
</openXML>
Views
Personal tools