This web application uses cookies. By using our services you are agreeing to our Cookie Policy. For more information see: Cookie Policy & Privacy Information  

Close

Api Documentation

The Basics

You have complete access to both Subscriptions and Products using the API, i.e Create, Read, Update & Delete.

Hierarchy

User
[has]
Companies

Company
[has]
Products

Product
[has]
Subscriptions

Protocol

HTTPS is required at all times.
HTTP can only be used by specifying the 'platform' parameter, eg. '&platform=arduino'

Controllers

Products : https://keyserv.solutions/api/p/
Subscriptions : https://keyserv.solutions/api/s/

Method Endpoint Operation
POST new Create
GET get Read
PUT mod Update
DELETE del Delete
GET all List
GET is Validity (Subscriptions Only)
GET qry Retrieve Key (Subscriptions Only)
Product Variables Formatting
/api/p/new JSON (See Example 1A)
/api/p/get Company Code & Client Key ?companycode=C0MPANYC0D3H3R3&clientkey=3xamp1exkey
/api/p/mod Client Key & JSON ?clientkey=3xamp1exkey + [See Example 2A]
/api/p/del Client Key ?companycode=C0MPANYC0D3H3R3&clientkey=3xamp1exkey
/api/p/all Company Code ?companycode=C0MPANYC0D3H3R3
Subscription Variables Formatting
/api/s/new JSON (See Example 1B)
/api/s/get Product Key ?productkey=MY-K3Y-G03S-H3R3
/api/s/mod Product Key & JSON ?productkey=MY-K3Y-G03S-H3R3 + [See Example 2B]
/api/s/qry Client Key & Subscription Name ?clientkey=3xamp1exkey&name=HelloMyNameIs01
/api/s/is Producy Key ?key=MY-K3Y-G035-H3R3
/api/s/del Product Key ?productkey=MY-K3Y-G035-H3R3
/api/s/all Client Key ?clientkey=3xamp1exkey

Example 1A

Create New Product:

POST /api/p/new/ HTTP/1.1
Host: keyserv.solutions
Content-Type: application/json; charset=utf-8

{
    "CompanyCode":"5B4C5C6CJD1747DEB5DC197449B8DA4C",
    "ProductName":"TestProduct",
    "Email":"[email protected]"
}

---

Result: 201 Created (Returns The Newly Created Client Key)

Example 1B

Create New Subscription:

POST /api/s/new/ HTTP/1.1
Host: keyserv.solutions
Content-Type: application/json; charset=utf-8

{
    "ClientKey":"3xamp1exkey",
    "ClientName":"Jacky",
    "StartFrom":"2017-11-08T22:59:59",
    "Frequency":"Weekly",
    "Action":"Renew",
    "Notify":"false",
    "Disable":"false"
}

---

Result: 201 Created (Returns The Newly Created Product Key)

Note
All Datetimes are according to UTC / GMT

NOT THE CLIENT'S TIMEZONE!

Example 2A

Modify Product
(Coming...)

Example 2B

Modify Subscription

(Coming...)

Response Reference List

Code Type Reasons
200 OK Request Fulfilled
Return Requested Resource(s)
201 Created Resource Created Successfully
Request Completed (Returns Key)
202 Accepted Request Accepted For Further Processing
Resource To Be Deleted
204 Completed Resource Modified Successfully
Request Completed (NFTR)
304 Not Modified Resource Information Unchanged
No Update Necessary
410 Gone Resource No Longer Present
Resource Deleted
402 Payment Required Subscription Upgrade Required
Tier Limit Reached
429 Too Many Requests Too Many Requests Within Short Time
Many Clients Using Same Public IP
400 Bad Request Variable Null or Invalid
Invalid Request
409 Conflict Resource With Variables Exists
Resource Name Taken
300 Ambigious Multiple Results Found
Blank Product Key
404 Not Found No Resource Found
Resource Missing
412 Precondition Failed Request Doesn't Meet Requirements
Resource Missing Variables
406 Not Acceptable Resource Has Invalid Variables
Resource Data Incorrect
403 Forbidden Not Using HTTPS
Server Firewalled Resource
500 Internal Error Request Failed (Server Side)
Technical Problem (Try Again?)