{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"fc3101b5-af80-4582-84ea-4a3521c7a291","name":"Trustico® API","description":"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.\n\n# **Getting Started (Authenitcation OAuth2.0):**\n\nThe Trustico® REST API requires an access token to be used for every request sent to any endpoint. Our API uses OAuth 2.0 for secure connections between your website and the API, allowing for a robust and secure line for communication.\n\nTo complete an access token request, follow the steps below:\n\n1. Register for a [reseller account](https://app.trustico.com/login) and get your API credentials. Once logged in to your reseller portal, go to Manage Account > Account Settings and under the API Settings tab you will find your API credentials.\n    \n2. Save your client ID and client Secret details.\n    \n3. Use your coding library and environment of choice, and send an access token request to the following endpoint : [<b>https://api.trustico.com/oauth2/token</b>](https://api.trustico.com/oauth2/token)\n    \n4. Once an access token is available, you can start making API calls using your new access token.\n    \n\nSample code below for requesting an access token using **Javascript**:\n\n``` javascript\nconst https = require('https'); // Import the https module\nconst handler = async (event) => {\n  try {\n    const clientId = \"CLIENT_ID_HERE\";\n    const clientSecret = \"CLIENT_SECRET_HERE\";\n    const fetch = (await import('node-fetch')).default;\n    const tokenUrl = 'https://api.trustico.com/oauth2/token';\n    const response = await fetch(tokenUrl, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n      },\n      body: new URLSearchParams({\n        'grant_type': 'client_credentials',\n        'client_id': clientId,\n        'client_secret': clientSecret,\n      }),\n    });\n    if (!response.ok) {\n      throw new Error(`Failed to fetch access token: ${response.statusText}`);\n    }\n    const data = await response.json();\n    return {\n      statusCode: 200,\n      body: JSON.stringify(data),\n    };\n  } catch (error) {\n    console.error('Error:', error);\n    return { statusCode: 500, body: error.toString() };\n  }\n};\nmodule.exports = { handler };\n\n ```\n\n_\\*Note: the Trustico API token refreshes periodically to ensure that a connection is secure by using a new access token. You may need to incorporate a token refresh function to periodically check if the current token is valid, if not, then the token must be refreshed by invoking another token URL request for a new token._\n\n---\n\n#### Below are some important details to take into consideration when mkaing your first API calls\n\n# <u>Country ISO2 Codes</u>\n\nA list of valid country codes can be found through this link below\n\n_(ex. Australia Country Code = \"__**AU**__\")_:\n\n[Trustico Valid Country Codes](https://www.trustico.com.au/csr/generate-csr-howto.php)\n\n---\n\n# Error Codes\n\nThe following details define the Error Codes which might be encountered when making an API call to the Trustico API:  \n**1001** : Wrong value in field or validation fails  \n**1002** : Error occurred during function execution. (ex.: parsing a CSR fails)  \n**1003** : Not found. i.e. Order not found  \n**1004** : API is disabled for reseller account  \n**1005** : User request limit reached  \n**1006** : Method is not allowed in TEST mode  \n**1007** : API does not support GET method  \n**1008** : Certificate not generated  \n**1009** : Certificate not found  \n**1010** : Order not processed yet. Once your Order has been processed, you will be able to use this method.  \n**1011** : Validation method must be file based  \n**1012** : Validation method must be DNS based  \n**1016** : Coupon Code Not Applicable (Invalid or not available for product)\n\n---\n\n# TEST Mode\n\nThe TEST API mode allows for only limited API access. We recommend using TEST mode when integrating the Trustico API with your application for the first time.\n\nYou can find the setting to toggle between TEST and LIVE mode in your reseller panel (My Account > Account Settings under API setting tab).\n\nWhen the API is accessed in TEST mode, the following descriptor is added to an endpoint response:\n\n_“API working in test mode.”_\n\n---\n\n# Method Endpoint Allowances\n\nThe following shows what methods are available in TEST and LIVE mode:\n\n1. **Hello** - This method will work in TEST and LIVE mode.\n    \n2. **ParseCSR** - This method will work in TEST and LIVE mode.\n    \n3. **GetOrderStatus** - This method will work in TEST and LIVE mode, however a TEST mode order will only show the default Unpaid status at all times.\n    \n4. **ResendEmail** - This method will work only in LIVE mode.\n    \n5. **ChangeApproverEmail** - This method will work only in LIVE mode.\n    \n6. **Reissue** - This method will work only in LIVE mode.\n    \n7. **GetUserAgreement** - This method will work in TEST and LIVE mode.\n    \n8. **GetApproverList** - This method will work in TEST and LIVE mode.\n    \n9. **PlaceOrder** - This method will work in TEST and LIVE mode, however if the order is through a TEST mode reseller account, the order's status cannot be changed, nor can this order interact with Sectigo's supplier system.\n    \n10. **GetBalance** - This method will work in TEST and LIVE mode.\n    \n11. **GetProductPrice** - This method will work in TEST and LIVE mode.\n    \n12. **MarkAsRefunded** - This method will work in TEST and LIVE mode.\n    \n13. **CancelOrder** - This method will work only in LIVE mode.\n    \n14. **GetCertificate** - This method will work in TEST and LIVE mode.\n    \n15. **GetCA** - This method will work in TEST and LIVE mode.\n    \n16. **GetOrderDetails** - This method will work in TEST and LIVE mode.\n    \n17. **GetCertificateCA** - This method will work in TEST and LIVE mode.\n    \n\n---\n\n# Order Statuses\n\nAt any given time, an order can have the following statuses appended. (Note that only the \"Unpaid\" status is given to any orders placed in TEST mode):\n\nUnpaid : Order payment is pending  \nPaid : Order Payment is received  \nProcessing : Order is submitted for processing  \nCancelled : Order is Cancelled  \nCompleted : Order is completed  \nQueued : An error occured while processing the order  \nRefunded : Order Amount is refunded  \nPartially paid : Order amount is partially paid\n\n---\n\n# Product Codes & Properties\n\nThe following table below shows the available product codes that can be used to place new order. Please follow the information in this table when placing an order to ensure that not errors are generated when placing a new order for any of these products listed below:\n\n| Product Code | Product Name | Product Brand | Validation | Validity (months) | Re- Issuance | Multiple Approver | Licences | Free San | SAN Pack | SAN Individual | SAN WildCard |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n| 1020 | Comodo SSL | Comodo® | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1021 | Comodo SSL Wildcard | Comodo® | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1022 | Comodo SSL MultiDomain | Comodo® | DV | 12-24 | YES | YES | UNLIMITED | YES(2 FREE) | NO | YES(MAX 248) | YES |\n| 1023 | PositiveSSL | PositiveSSL | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1024 | PositiveSSL Wildcard | PositiveSSL | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1025 | PositiveSSL MultiDomain | PositiveSSL | DV | 12-24 | NO(included) | YES | UNLIMITED | YES(2 FREE) | NO | YES(MAX 248) | YES |\n| 1026 | InstantSSL | InstantSSL | OV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1027 | PremiumSSL Wildcard | PremiumSSL | OV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1028 | PremiumSSL MultiDomain | PremiumSSL | OV | 12-24 | NO(included) | YES | UNLIMITED | YES(2 FREE) | NO | YES(MAX 248) | NO |\n| 1029 | Comodo EV SSL | Comodo® | EV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1030 | Comodo EV SSL MultiDomain | Comodo® | EV | 12-24 | NO(included) | YES | UNLIMITED | YES(2 FREE) | NO | YES(MAX 248) | NO |\n| 1041 | Comodo Free Trial SSL | Comodo® | EV | 1 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1042 | Trustico Single Site | Trustico® | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1043 | Trustico MultiDomain | Trustico® | DV | 12-24 | NO(included) | YES | UNLIMITED | YES(2 FREE) | NO | YES(MAX 248) | YES |\n| 1044 | Trustico WildCard | Trustico® | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1045 | Trustico OV | Trustico® | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1046 | Trustico EV | Trustico® | DV | 12-24 | NO(included) | NO | UNLIMITED | NO | NO | NO | NO |\n| 1047 | Trustico EV MultiDomain | Trustico® | DV | 12-24 | NO(included) | YES | UNLIMITED | YES(2 FREE) | NO | YES(MAX 248) | NO |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"36259572","collectionId":"fc3101b5-af80-4582-84ea-4a3521c7a291","publishedId":"2sA3dvkCme","public":true,"publicUrl":"https://api-docs.trustico.com","privateUrl":"https://go.postman.co/documentation/36259572-fc3101b5-af80-4582-84ea-4a3521c7a291","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"1F51FF"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"All information needed to incorporate the Trustico REST API to your web pages can be found here. Start selling certificate using our reseller-friendly API and place order from the convenience of your own website."},{"name":"title","value":"Trustico REST API Documentation"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/d654eff9-97dc-4ef1-bd7d-24e22edc436a/bG9nb18xMDAucG5n","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"1F51FF"}},{"name":"light","logo":"https://content.pstmn.io/d654eff9-97dc-4ef1-bd7d-24e22edc436a/bG9nb18xMDAucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"1F51FF"}}]}},"version":"8.10.0","publishDate":"2024-08-27T06:43:57.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Trustico REST API Documentation","description":"All information needed to incorporate the Trustico REST API to your web pages can be found here. Start selling certificate using our reseller-friendly API and place order from the convenience of your own website."},"logos":{"logoLight":"https://content.pstmn.io/d654eff9-97dc-4ef1-bd7d-24e22edc436a/bG9nb18xMDAucG5n","logoDark":"https://content.pstmn.io/d654eff9-97dc-4ef1-bd7d-24e22edc436a/bG9nb18xMDAucG5n"}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/7f4b62412585f8c6c5e1541f30696dd6af4ad83c42c23345a96154d4e92a1899","favicon":"https://res.cloudinary.com/postman/image/upload/v1741331548/team/9204346eddf32b46c82c37669de7a546.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://api-docs.trustico.com/view/metadata/2sA3dvkCme"}