Updated getOrdersStatus (markdown)

master
smashing-kenny 2019-12-03 16:04:23 +02:00
parent 209cb7976b
commit 84caa18b74
1 changed files with 21 additions and 162 deletions

@ -2,186 +2,45 @@ URL: /orders/statuses/<br/>
Request type: POST Request type: POST
### Overview ### 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. The getOrdersStatus returns short information for the order matching “order_id” parameter.
Our system sends two (2) automatical emails once addSSLOrder method used: ### Request parameters
1. New Order Notification email will be sent to Account Owner E-mail, not the end-customer * certificate_id
2. Generated PDF invoice
:exclamation:You can disable any notifications from Account Settings
### Request parameters:
* product_id - Required. product ID, can be taken from :link:[getAllProducts](https://github.com/gogetssl/api/wiki/getAllProducts) method
* period - Required. Use months, example: 12/24
* csr - Required. Can be generated using :link:[generateCSR](https://github.com/gogetssl/api/wiki/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 :link:[getDomainEmail](https://github.com/gogetssl/api/wiki/getDomainEmails) 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 :link:[getWebservers](https://github.com/gogetssl/api/wiki/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_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 ### Response
If no errors in request following parameters will be returned: If no errors in request following parameters will be returned:
* order_id - unique order ID * success - true
* invoice_id - unique invoice ID * time_stamp - server timestamp
* order_status - order status * certificates - array of certificates
* success - success code (true) ** certificate_id - unique certificate ID
* order_amount - order amount ** status - certificate status (active, cancelled, expired, incomplete, new_order, unpaid, pending, processing, reissue, rejected,)
* currency - order currency
* tax - order tax if applicable
* tax_rate - order tax rate if applicable
```json
### Example response
```JSON
{ {
"approver_method": { "certificates":[
"http": { {"certificate_id":"1","status":"processing"},
"link": "http:\/\/demo.gogetssl.com\/.well-known\/pki-validation\/37D0C93EE263FF9EEEA799215A9C3225.txt", {"certificate_id":"2","status":"active"},
"filename": "37D0C93EE263FF9EEEA799215A9C3225.txt", {"certificate_id":"3","status":"processing"}
"content": "D30C576BF9EB30A75211CB799848EE5CABFCE3D8EE13212A57C9B7E42EF9BAA2\r\nCOMODOCA.COM\r\nt0827792001533920169" ],
} "success":true,
}, "time_stamp":1575381687
"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) ### Example code
```PHP ```PHP
<?php
$CSR = "-----BEGIN CERTIFICATE REQUEST-----
CSR CODE GOES HERE...
-----END CERTIFICATE REQUEST-----";
$request = [ $request = [
"product_id" => 66, "cids" => "CERTIFICATE_IDENTIFIERS, CERTIFICATE_IDENTIFIERS, CERTIFICATE_IDENTIFIERS...",
"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(); $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_URL, "https://my.gogetssl.com/api/orders/statuses/?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
<?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_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POST, 1);