Skip to content

addSSLOrder

Vladislavs Dovoreckis edited this page Oct 23, 2019 · 16 revisions

URL: /orders/add_ssl_order/
Request type: POST

Overview

AddSSLOrder allows the creation of New SSL Order. Includes submission of information like: CSR code, validation method, Technical/Administrative contact details and Organization details.

Our system sends two (2) automatical emails once addSSLOrder method used:

  1. New Order Notification email will be sent to Account Owner E-mail, not the end-customer
  2. Generated PDF invoice

❗You can disable any notifications from Account Settings

Request parameters:

  • product_id - Required. product ID, can be taken from 🔗getAllProducts method
  • period - Required. Use months, example: 12/24
  • csr - Required. Can be generated using 🔗generateCSR
  • server_count - Required. Server Licenses, for Unlimited pass “-1”
  • approver_email - Required. DCV approver email for the primary domain, can be taken from the list provided by 🔗getDomainEmail methods. This parameter must be used only if dcv_method pameter value is 'email'.
  • approver_emails - A comma separated list of domain control validation e-mail addresses. One and only one e-mail must be provided for each additional domain provided in dns_names parameter. DCV e-mail address for the primary domain must not be included to the list. This parameter must be used only if dcv_method prameter value is 'email'.
    • 04.02.2018. approver_emails now accept http, https, dns, my@email.com. This params must be set only if certificate vendor is Comodo.
  • webserver_type - Required. Webserver type, can be taken from 🔗getWebservers method
  • dns_names – Required for SAN/UCC/Multi-Domain SSL, for the rest of products this parameter must not be provided. A comma separated list of additional domain names. The list must not contain the primary domain.
  • admin_firstname - Required.
  • admin_lastname - Required.
  • admin_organization - required for OV/EV SSL certificates
  • admin_addressline1 - required for OV/EV SSL certificates
  • admin_phone - Required.
  • admin_title - Required.
  • admin_email - Required.
  • admin_city - required for OV SSL certificates
  • admin_country - required for OV SSL certificates
  • admin_fax - required for OV SSL certificates
  • admin_postalcode - required for OV/EV SSL certificates
  • admin_region - required for OV/EV SSL certificates
  • dcv_method – Required. Value of this specifies DCV method to be used. Possible values:
    • For Comodo: 'email', 'http', 'https', 'dns';
    • For GeoTrust/Thawte/Symantec/RapidSSL: 'email'
  • tech_firstname - Required .
  • tech_lastname - Required .
  • tech_organization - required for OV SSL certificates
  • tech_addressline1 - required for OV/EV SSL certificates
  • tech_phone - Required.
  • tech_title - Required.
  • tech_email - Required.
  • tech_city - required for OV/EV SSL certificates
  • tech_country - required for OV/EV SSL certificates
  • tech_postalcode - required for OV/EV SSL certificates
  • tech_region - required for OV/EV SSL certificates
  • org_name - required for OV/EV SSL certificates
  • org_division - required for OV/EV SSL certificates
  • org_duns, DUNS number
  • org_addressline1 - required for OV/EV SSL certificates
  • org_city - required for OV/EV SSL certificates
  • org_country - required for OV/EV SSL certificates
  • org_phone - required for OV/EV SSL certificates
  • org_postalcode - required for OV/EV SSL certificates
  • org_region - required for OV SSL certificates
  • signature_hash – hashing algorythm ('SHA2')

Note: Quantity of items in the approver_emails list must be always equal to quantity of items in the dns_names list.

Response

If no errors in request following parameters will be returned:

  • order_id - unique order ID
  • invoice_id - unique invoice ID
  • order_status - order status
  • success - success code (true)
  • order_amount - order amount
  • currency - order currency
  • tax - order tax if applicable
  • tax_rate - order tax rate if applicable
{
  "approver_method": {
    "http": {
      "link": "http:\/\/demo.gogetssl.com\/.well-known\/pki-validation\/37D0C93EE263FF9EEEA799215A9C3225.txt",
      "filename": "37D0C93EE263FF9EEEA799215A9C3225.txt",
      "content": "D30C576BF9EB30A75211CB799848EE5CABFCE3D8EE13212A57C9B7E42EF9BAA2\r\nCOMODOCA.COM\r\nt0827792001533920169"
     }
  },
  "order_id": 783956,
  "invoice_id": 574941,
  "order_status": "active",
  "success": true,
  "order_amount": 0,
  "currency": "EUR",
  "tax": "0.00",
  "tax_rate": "21%"
}

Example code (Single domain SSL)

<?php

$CSR = "-----BEGIN CERTIFICATE REQUEST-----
CSR CODE GOES HERE...
-----END CERTIFICATE REQUEST-----";

$request = [
	"product_id" => 66,
	"period" => 3,
	"csr" => $CSR,
	"server_count" => -1,
	"webserver_type" => -1,

	// CommonName - Domain Control Validation
	"dcv_method" => "email",
	"approver_email" => "admin@gogetssl.com",

	// Administrative Person info
	'admin_title' => "Mr.",
	'admin_firstname' => "John",
	'admin_lastname' => "Smith",
	'admin_phone' => "+37166164222",
	'admin_email' => "admin@gogetssl.com",

	// Technical Person info
	'tech_title' => "Mr.",
	'tech_firstname' => "John",
	'tech_lastname' => "Smith",
	'tech_phone' => "+37166164222",
	'tech_email' => "admin@gogetssl.com",
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://my.gogetssl.com/api/orders/add_ssl_order?auth_key=YOUR_AUTH_HASH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($ch);

Example code (Multi-domain SSL)

<?php

$CSR = "-----BEGIN CERTIFICATE REQUEST-----
CSR CODE GOES HERE...
-----END CERTIFICATE REQUEST-----";

$request = [
	"product_id" => 68,
	"period" => 3,
	"csr" => $CSR,
	"server_count" => -1,
	"webserver_type" => -1,

	// CommonName - Domain Control Validation
	"dcv_method" => "email",
	"approver_email" => "admin@gogetssl.com",

	// SAN - Domain names (coma separated string)
	"dns_names"       => implode(",", ["www.gogetssl.com",   "my.gogetssl.com", "support.gogetssl.com"]),
	// SAN - Domain validation methods (coma separated string)
	"approver_emails" => implode(",", ["admin@gogetssl.com", "dns",             "http"]),

	// Administrative Person info
	'admin_title' => "Mr.",
	'admin_firstname' => "John",
	'admin_lastname' => "Smith",
	'admin_phone' => "+37166164222",
	'admin_email' => "admin@gogetssl.com",

	// Technical Person info
	'tech_title' => "Mr.",
	'tech_firstname' => "John",
	'tech_lastname' => "Smith",
	'tech_phone' => "+37166164222",
	'tech_email' => "admin@gogetssl.com",
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://my.gogetssl.com/api/orders/add_ssl_order?auth_key=YOUR_AUTH_HASH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($ch);
Clone this wiki locally