Skip to content

Instantly share code, notes, and snippets.

@boxpositron
Last active August 10, 2019 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boxpositron/970da9ad836a0d816c33280f9c27ca9a to your computer and use it in GitHub Desktop.
Save boxpositron/970da9ad836a0d816c33280f9c27ca9a to your computer and use it in GitHub Desktop.
Documentation for X Serial Server API

Build Status

X Serial Generation API

Requirements

Every API request must have an associated bearer token that will be provided.
Requests made without this authorisation token will return a 403 Status

Routes

Base URL https://xserver.boxmarshall.com/api

Test Endpoint

Target / Method: GET

This endpoint is used for API Setup Validation

Response

{
    "type": "api-test",
    "status": "success",
    "name": "Example 1",
    "dateCreated": "Thursday, July 25, 2019 10:09 AM"
}

Creation Endpoint

Target /manage/create Method: POST

This endpoint is used for creation of serial keys for the target product

Request Body

{
	"email": String,
	"tierHash": String,
	"familyName": String,
	"givenName": String,
	"days": Int
}

Response

{
	"type": "create-key",
	"status": "success",
	"serial": "XXXX-XXXXXXXXXXXX"
}

Extend Endpoint

Target /manage/extend Method: POST

This endpoint is used to extend the license of serial keys for the target product

Request Body

{
	"serialkey":String,
	"days": Int
}

Response

{
	"type": "extend-key",
	"status": "success"
}

Bind Discord Endpoint

Target /manage/setup-discord Method: POST

This endpoint is used for attaching user discord credentials to a key

Request Body

{ 	
	"discord":{
		"id": String,
		"username": String,
		"discriminator": String,
		"avatar": String,
		"isBot": Boolean,
		"nitro": String,
		"email": String,
		"emailVerified": Boolean,
	},
	"serialkey": String
	"email": String
}

Response

{
	"type": "setup-discord",
	"status" : "success"
}

Unbind Discord Endpoint

Target /manage/remove-discord Method: POST

This endpoint is used for removing discord credentials attached to a key

Request Body

{ 	
	"serialkey": String
	"email": String
}

Response

{
	"type": "remove-discord",
	"status" : "success"
}

Reset Endpoint

Target /manage/reset Method: POST This endpoint is used to reset a target serial key.

Request Body

{
	"serialkey" :  String,
	"email" : String
}

Response

{
	"type":"reset-key",
	"status": "success"
}

Query Key Endpoint

Target /manage/query Method: POST

List out key details Request Body

{
	"serialkey": String
}

Response

{
	"type" : "query-key" ,
	"result" : {
		"expiryDate" : Date,
		"eternal": Boolean
	},
	"status" : "success",
} 

Query Keys Endpoint

Target /manage/list Method: GET

List all serials that belong to a given email for a product. Request Body

{
	"email": String
}

Response

{
	"type" : "list-keys" ,
	"serials" : [Array],
	"status" : "success",
} 

Query Tiers Endpoint

Target /manage/list-tiers Method: GET

List all tiers that belong to a given product

Response

{
    "type": "list-tiers",
    "status": "success",
    "tiers": [Array]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment