Trustico Reseller API

Trustico Developers API guide


Introduction


What is the trustico API?

The Trustico® API allows you to integrate your applications with Trustico®’s order management and certificate lifecycle tools to make it easy for your customers to order and manage certificates and website identity products without leaving your site. The Trustico® API uses REST and contains web services for creating new orders and working with existing orders.

Why use it?

The Partner API helps save time and money and reduce errors by eliminating the need to manually enter orders. Its powerful automation lets you handle more orders in less time and enables a quicker turnaround time for authentication, improving customer satisfaction and expediting website protection. Beyond automation, it allows you to build a completely branded environment for a consistent customer experience, extending your brand value.

Because the Trustico® API supports all of products, you can confidently offer customers the right solution for their business and still benefit from everything the Trustico® API has to offer.

To get started

  1. Register for a reseller account and get your API credentials. Once logged in to your reseller portal then go to Manage Account > Account Settings under API Settings tab to find your API credentials.
  2. Download a client library for PHP. It will give you two files 1) trustico_reseller_api.php and 2) client.php. You need to enter your credential details in client.php file and make a call from this file. You will find all method’s example in this file.
  3. Start coding and make your first API call.

REST


What is REST?

REST stands for Representational state transfer which essentially refers to a style of web architecture that has many underlying characteristics and governs the behavior of clients and servers.

What can use a REST API?

REST API lets you interact with Parse from anything that can send an HTTP request

  1. Client-server: The client handles the front end the server handles the backend and both can be replaced independently of each other
  2. Stateless – No client data is stored on the server between requests and session state is stored on the client.
  3. Cacheable – Clients can cache response (just like browsers caching static elements of a web page) to improve performance.

REST API’s in the Real World

  1. The Twitter REST API
  2. Google Translate REST API
  3. Magneto REST API
  4. Flickr REST API
  5. BING Maps REST API (services)

The advantages of REST for development

  1. Separation between the client and the server
  2. Visibility, reliability and scalability
  3. The REST API is always independant on the type of platform or languages

Authentication


OAuth 2.0

OAuth 2.0 is the next evolution of the OAuth protocol which was originally created in late 2006. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices.

What is the use of OAuth?

OAuth is an open standard for authorization, commonly used as a way for Internet users to log into third party websites using their Microsoft, Google, Facebook, Twitter, One Network etc. accounts without exposing their password.

Country Codes


The following table defines supported values for the “AdminCountry” Fields and country code accepted within proivided CSR. If you want Trustico to generte CSR automatically then country code must be a valid ISO2 as mentioned in below table

Country Code Country Name   Country Code Country Name
AD Andorra   LA Lao People’s Democratic Republic
AE United Arab Emirates   LB Lebanon
AF Afghanistan   LC Saint Lucia
AG Antigua and Barbuda   LI Liechtenstein
AI Anguilla   LK Sri Lanka
AL Albania   LR Liberia
AM Armenia   LS Lesotho
AN Netherlands Antilles   LT Lithuania
AO Angola   LU Luxembourg
AQ Antarctica   LV Latvia
AR Argentina   LY Libyan Arab Jamahiriya
AS American Samoa   MA Morocco
AT Austria   MC Monaco
AU Australia   MD Moldova
AW Aruba   ME Montenegro
AX Aland Islands   MF Saint Martin (French part)
AZ Azerbaijan   MG Madagascar
BA Bosnia and Herzegovina   MH Marshall Islands
BB Barbados   MK Macedonia
BD Bangladesh   ML Mali
BE Belgium   MM Myanmar
BF Burkina Faso   MN Mongolia
BG Bulgaria   MO Macao
BH Bahrain   MP Northern Mariana Islands
BI Burundi   MQ Martinique
BJ Benin   MR Mauritania
BL Saint Barthelemy   MS Montserrat
BM Bermuda   MT Malta
BN Brunei Darussalam   MU Mauritius
BO Bolivia   MV Maldives
BQ Bonaire   MW Malawi
BR Brazil   MX Mexico
BS Bahamas   MY Malaysia
BT Bhutan   MZ Mozambique
BV Bouvet Island   NA Namibia
BW Botswana   NC New Caledonia
BY Belarus   NE Niger
BZ Belize   NF Norfolk Island
CA Canada   NG Nigeria
CC Cocos (Keeling) Islands   NI Nicaragua
CD Congo   NL Netherlands
CF Central African Republic   NO Norway
CG Congo   NP Nepal
CH Switzerland   NR Nauru
CI Cote D’Ivoire   NU Niue
CK Cook Islands   NZ New Zealand
CL Chile   OM Oman
CM Cameroon   PA Panama
CN China   PE Peru
CO Colombia   PF French Polynesia
CR Costa Rica   PG Papua New Guinea
CS Serbia and Montenegro   PH Philippines
CU Cuba   PK Pakistan
CV Cape Verde   PL Poland
CW Curacao   PM Saint Pierre and Miquelon
CX Christmas Island   PN Pitcairn
CY Cyprus   PR Puerto Rico
CZ Czech Republic   PS Palestinian Territory
DE Germany   PT Portugal
DJ Djibouti   PW Palau
DK Denmark   PY Paraguay
DM Dominica   QA Qatar
DO Dominican Republic   RE Reunion
DZ Algeria   RO Romania
EC Ecuador   RS Serbia
EE Estonia   RU Russian Federation
EG Egypt   RW Rwanda
EH Western Sahara   SA Saudi Arabia
ER Eritrea   SB Solomon Islands
ES Spain   SC Seychelles
ET Ethiopia   SD Sudan
FI Finland   SE Sweden
FJ Fiji   SG Singapore
FK Falkland Islands (Malvinas)   SH Saint Helena
FM Micronesia   SI Slovenia
FO Faroe Islands   SJ Svalbard and Jan Mayen
FR France   SK Slovakia
GA Gabon   SL Sierra Leone
GB United Kingdom   SM San Marino
GD Grenada   SN Senegal
GE Georgia   SO Somalia
GF French Guiana   SR Suriname
GG Guernsey   SS South Sudan
GH Ghana   ST Sao Tome and Principe
GI Gibraltar   SV El Salvador
GL Greenland   SX Sint Maarten
GM Gambia   SY Syrian Arab Republic
GN Guinea   SZ Swaziland
GP Guadeloupe   TC Turks and Caicos Islands
GQ Equatorial Guinea   TD Chad
GR Greece   TF French Southern Territories
GS South Georgia and the South Sandwich Islands   TG Togo
GT Guatemala   TH Thailand
GU Guam   TJ Tajikistan
GW Guinea-Bissau   TK Tokelau
GY Guyana   TL Timor-Leste
HK Hong Kong   TM Turkmenistan
HM Heard Island and Mcdonald Islands   TN Tunisia
HN Honduras   TO Tonga
HR Croatia   TP East Timor
HT Haiti   TR Turkey
HU Hungary   TT Trinidad and Tobago
ID Indonesia   TV Tuvalu
IE Ireland   TW Taiwan
IL Israel   TZ Tanzania
IM Isle of Man   UA Ukraine
IN India   UG Uganda
IO British Indian Ocean Territory   UM United States Minor Outlying Islands
IQ Iraq   US United States
IR Iran   UY Uruguay
IS Iceland   UZ Uzbekistan
IT Italy   VA Holy See (Vatican City State)
JE Jersey   VC Saint Vincent and the Grenadines
JM Jamaica   VE Venezuela
JO Jordan   VG Virgin Islands
JP Japan   VI Virgin Islands
KE Kenya   VN Viet Nam
KG Kyrgyzstan   VU Vanuatu
KH Cambodia   WF Wallis and Futuna
KI Kiribati   WS Samoa
KM Comoros   XK Kosovo
KN Saint Kitts and Nevis   YE Yemen
KP Korea   YT Mayotte
KR Korea   ZA South Africa
KW Kuwait   ZM Zambia
KY Cayman Islands   ZW Zimbabwe
KZ Kazakhstan      


Error Codes


The following table defines the Error Code which might be generated when you’re making an API call to the Trustico system. The meaning of the Error Code is described below.

Error Code Description
1001 Wrong value in field or validation fails
1002 Error occurred during function execution. Eg. parsing CSR fails
1003 Not found. i.e. Order not found
1004 API is disabled for reseller account
1005 User request limit reached
1006 Method is not allowed in TEST mode
1007 API does not support GET method
1008 Certificate not generated
1009 Certificate not found
1010 Order not processed yet. Once your Order has been processed, you will be able to use this method.
1011 Validation method must be file based
1012 Validation method must be DNS based
1016 Coupon Code Not Applicable (Invalid or not available for product)

TEST Mode


A TEST API mode is a limited API access that interacts with your account in TEST mode. We recommend you to use TEST mode when you’re integrating Trustico API with your application for the first time.

You can find the settings in your reseller panel My Account > Account Settings under API setting tab. Basically, there are two API modes - TEST and LIVE. Once your integration and testing is done under TEST mode, you just need to switch to LIVE mode to put your API live and Trustico will start accepting and processing your orders.

When you access API with TEST mode, in the response you will always see a message like- “API working on test mode.”


TEST Mode

-users have limited access to API methods

-The test orders cannot beprocessed

-your reseller account balance will remain intact

LIVE Mode

-Users have full access to all API methods.

-Your orders will be processed and you can also perform other API methods on your order like ChangeApproverEmail etc.

-A transaction will be created and reflected accordingly on your reseller account statement.


Method’s behavior on TEST Mode

  1. Hello - This method will work same in TEST and LIVE mode.
  2. ParseCSR - This method will work same in TEST and LIVE mode.
  3. GetOrderStatus - This method shows only test order status.
  4. ResendEmail - This method is not allowed in TEST mode.
  5. ChangeApproverEmail - This method is not allowed in TEST mode.
  6. Reissue - This method is not allowed in TEST mode.
  7. GetUserAgreement - This method will work same in TEST and LIVE mode.
  8. GetApproverList - This method will work same in TEST and LIVE mode.
  9. PlaceOrder - User’s balance will not deduct. Order place with Unpaid. status also not allowed to deal with supplier system.
  10. GetBalance - This method will work same in TEST and LIVE mode.
  11. GetProductPrice - This method will work same in TEST and LIVE mode.
  12. MarkAsRefunded - This method will work same in TEST and LIVE mode.
  13. CancelOrder - This method is not allowed in TEST mode.
  14. GetCertificate - This method will work same in TEST and LIVE mode.
  15. GetCA - This method will work same in TEST and LIVE mode.
  16. GetOrderDetails - This method will work same in TEST and LIVE mode.
  17. GetCertificateCA - This method will work same in TEST and LIVE mode.


Method Test Live
Hello
ParseCSR
GetOrderStatus
ResendEmail
ChangeApproverEmail
Reissue
GetUserAgreement
GetApproverList
PlaceOrder
GetBalance
GetProductPrice
MarkAsRefunded
CancelOrder
GetCertificate
GetCA
GetOrderDetails
GetCertificateCA


Order Status


Order status Description
Unpaid Order payment is pending
Paid Order Payment is received
Processing Order is submitted for processing
Cancelled Order is Cancelled
Completed Order is completed
Queued An error occured while processing the order
Refunded Order Amount is refunded
Partially paid Order amount is partially paid


Product List


The following table defines a list of all the products Trustico® allows its partners to integrate using the API methods. You should refer this list before programming to make sure Trustico accepts your order with the correct order/product parameters.



Product Code Product Name Product Brand Validation Validity (months) Re- Issuance Multiple Approver Licences Free San SAN Pack SAN Individual SAN WildCard
1020 Comodo SSL Comodo® DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1021 Comodo SSL Wildcard Comodo® DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1022 Comodo SSL MultiDomain Comodo® DV 12-24 YES YES UNLIMITED YES(2 FREE) NO YES(MAX 248) YES
1023 PositiveSSL PositiveSSL DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1024 PositiveSSL Wildcard PositiveSSL DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1025 PositiveSSL MultiDomain PositiveSSL DV 12-24 NO(included) YES UNLIMITED YES(2 FREE) NO YES(MAX 248) YES
1026 InstantSSL InstantSSL OV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1027 PremiumSSL Wildcard PremiumSSL OV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1028 PremiumSSL MultiDomain PremiumSSL OV 12-24 NO(included) YES UNLIMITED YES(2 FREE) NO YES(MAX 248) NO
1029 Comodo EV SSL Comodo® EV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1030 Comodo EV SSL MultiDomain Comodo® EV 12-24 NO(included) YES UNLIMITED YES(2 FREE) NO YES(MAX 248) NO
1041 Comodo Free Trial SSL Comodo® EV 1 NO(included) NO UNLIMITED NO NO NO NO
1042 Trustico Single Site Trustico® DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1043 Trustico MultiDomain Trustico® DV 12-24 NO(included) YES UNLIMITED YES(2 FREE) NO YES(MAX 248) YES
1044 Trustico WildCard Trustico® DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1045 Trustico OV Trustico® DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1046 Trustico EV Trustico® DV 12-24 NO(included) NO UNLIMITED NO NO NO NO
1047 Trustico EV MultiDomain Trustico® DV 12-24 NO(included) YES UNLIMITED YES(2 FREE) NO YES(MAX 248) NO