Reselling SSL certificates
This article contains API requests that allow you to work with certificates at https://api.ispmanager.com
Available actions:
API address of ispmanager billing system: https://api.ispmanager.com.
Authorization in the system is performed using the parameter authinfo, which takes the value authinfo=EMAIL:PASSWORD, where:
EMAIL — user's email address in the billing system https://api.ispmanager.com;
PASSWORD — user’s password.
Ordering SSL certificate
Ordering SSL-certificate consists of 2 steps:
Getting the secret key
To get the secret key, send the following request:
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.order.csr&sok=ok&snext=ok&crt_type=generate&field_country=COUNTRY&period=12&pricelist=PRICELIST&CN=DOMAIN&ST=REGION&L=CITY&O=ORGANIZATION&OU=ORG_UNIT&emailAddress=EMAIL
The order is made using the certificate.order.csr function, which has parameters:
authinfo – billing access data in EMAIL:PASSWORD format;
field_country – country code (182 - Russia);
period – period in months (12 or 24);
pricelist – tariff plan ID (see Table of certificate ID's );
CN – domain;
ST – region;
L – city;
O – organization;
OU – department (optional);
emailAddress – e-mail (optional).
If the response is successful, the model.csr and model.key fields will contain the request and the key, which must be saved for future use.
Ordering SSL certificate
To order an SSL certificate, you need to send the following request:
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.order.param&sok=ok&skipbasket=on&crt_type=generate&field_country=COUNTRY&period=12&pricelist=PRICELIST&CN=DOMAIN&ST=REGION&L=CITY&O=ORGANIZATION&OU=ORG_UNIT&emailAddress=EMAIL&adm_fname=NAME&adm_lname=LASTNAME&adm_jtitle=POSITION&adm_email=EMAIL&adm_phone=PHONE&tech_fname=NAME&tech_lname=LASTNAME&tech_jtitle=POSITION&tech_email=EMAIL&tech_phone=PHONE&approver_email_1=EMAIL&csr=CSR&key=KEY
The order is executed using the certificate.order.param function, which contains the following parameters:
authinfo – billing access data in EMAIL:PASSWORD format;
skipbasket – when passing the value on, adding to cart will be skipped, and the payment will be immediately debited from the personal account;
field_country – country code (182 - Russia);
period – period in months(12 или 24);
pricelist – tariff plan ID (see Table of certificate ID's);
CN – domain;
ST – region;
L – city;
O – organization;
OU – department (optional);
emailAddress – e-mail (optional);
adm_fname – the administrative contact name;
adm_lname – the administrative contact last name;
adm_jtitle – the administrative contact position;
adm_email – the administrative contact e-mail;
adm_phone – the administrative contact phone number;
tech_fname – the technical contact name;
tech_lname – the technical contact last name;
tech_jtitle – the technical contact position;
tech_email – the technical contact e-mail;
tech_phone – the technical contact phone number;
approver_email_1 – the email address for certificate confirmation; this e-mail must be one of the following, where DOMAIN - the domain, sent in the CN parameter:
admin@DOMAIN;
administrator@DOMAIN;
hostmaster@DOMAIN;
postmaster@DOMAIN;
webmaster@DOMAIN;
csr - the csr key received when getting a secret key;
key - the key received when getting a secret key.
Ordering SSL certificate with an existing CSR
To order an SSL certificate, you need to send the following request:
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.order.param&sok=ok&skipbasket=on&crt_type=manual&period=12&pricelist=PRICELIST&adm_fname=NAME&adm_lname=LASTNAME&adm_jtitle=POSITION&adm_email=EMAIL&adm_phone=PHONE&tech_fname=NAME&tech_lname=LASTNAME&tech_jtitle=POSITION&tech_email=EMAIL&tech_phone=PHONE&approver_email_1=EMAIL&csr=CSR
The order is executed using the certificate.order.param function, which contains the following parameters:
authinfo – billing access data in EMAIL:PASSWORD format;
skipbasket – when passing the value on, adding to cart will be skipped, and the payment will be immediately debited from the personal account;
period – period in months (12 or 24);
pricelist – tariff plan (see Table of certificate ID's);
adm_fname – the administrative contact name;
adm_lname – the administrative contact last name;
adm_jtitle – the administrative contact position;
adm_email – the administrative contact e-mail;
adm_phone – the administrative contact phone number;
tech_fname – the technical contact name;
tech_lname – the technical contact last name;
tech_jtitle – the technical contact position;
tech_email – the technical contact e-mail;
tech_phone – the technical contact phone number;
approver_email_1 –the email address for certificate confirmation; this e-mail must be one of the following, where DOMAIN - the domain, sent in the CN parameter:
admin@DOMAIN;
administrator@DOMAIN;
hostmaster@DOMAIN;
postmaster@DOMAIN;
webmaster@DOMAIN;
csr - csr key.
Issue of an existing certificate
The existing SSL certificate issue is performed with the certificate.file function. ORDER_ID is the certificate ID.
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&func=certificate.file&elid=ORDER_ID&type=crt
Reissuing certificate
The SSL certificate reissue is performed with the certificate.reissue function. The elid parameter defines the certificate to be reissued
Reissuing based on previous data:
To reissue an SSL certificate, you need to send a request:
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.reissue.step2&elid={ID сертификата}&crt_type=oldrequest&approver_method=auth_email&sok=ok&approver_email_1={email подтверждения основного домена}&approver_email_{i}={email подтверждения дополнительного домена}
To reissue an SSL certificate with a new CSR, you need to send a request:
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.reissue.step2&elid={ID сертификата}&crt_type=manual&approver_method=auth_email&sok=ok&csr={urlencoded CSR}&approver_email_1={email подтверждения основного домена}&approver_email_{i}={email подтверждения дополнительного домена}
To reissue an SSL certificate indicating new domains, you need to send a request:
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.reissue.step2&elid={ID сертификата}&crt_type=altname&approver_method=auth_email&sok=ok&altname={urlencoded список дополнительных доменов через пробел}&approver_email_1={email подтверждения основного домена}&approver_email_{i}={email подтверждения дополнительного домена}
Deleting certificate
The certificate is deleted using the certificate.delete. function. The elid parameter specifies the certificate to be deleted.
To delete an SSL certificate, you need to send the following request:
https://api.ispmanager.com/manager/billmgr?authinfo=USER:PASSWD&out=xml&func=certificate.delete&elid=<license code>&sok=ok
Getting a list of countries with digital codes
It is possible to find out the current list of countries with their corresponding identifiers using the certificate.order.csr. function.
https://api.ispmanager.com/billmgr?authinfo=EMAIL:PASSWORD&out=bjson&func=certificate.order.csr&period=12&pricelist=PRICELIST
A successful response will contain:
k – country ID;
v – country name.