{
  "x-generator": "NSwag v13.0.6.0 (NJsonSchema v10.0.23.0 (Newtonsoft.Json v11.0.0.0))",
  "swagger": "2.0",
  "info": {
    "title": "KeyServ",
    "description": "KeyServ API",
    "version": "1.4.5"
  },
  "host": "keyserv.solutions",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/KeysApi/Find/{serial}": {
      "get": {
        "tags": [
          "KeysApi"
        ],
        "operationId": "KeysApi_Find",
        "parameters": [
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/KeyView"
            }
          }
        }
      }
    },
    "/v1/KeysApi/Current/{serial}": {
      "get": {
        "tags": [
          "KeysApi"
        ],
        "operationId": "KeysApi_Current",
        "parameters": [
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/CurrentKey"
            }
          }
        }
      }
    },
    "/v1/KeysApi/Custom/{serial}": {
      "get": {
        "tags": [
          "KeysApi"
        ],
        "operationId": "KeysApi_Custom",
        "parameters": [
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/v1/KeysApi/Expiry/{serial}": {
      "get": {
        "tags": [
          "KeysApi"
        ],
        "operationId": "KeysApi_Expiry",
        "parameters": [
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/Expiry"
            }
          }
        }
      }
    },
    "/v1/ProductsApi/Count": {
      "post": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_Count",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiKey"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/CountOf"
            }
          }
        }
      }
    },
    "/v1/ProductsApi/Find": {
      "post": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_Find",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          },
          {
            "type": "integer",
            "name": "page",
            "in": "query",
            "required": false,
            "format": "int32",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/ProductView"
            }
          }
        }
      }
    },
    "/v1/ProductsApi/List": {
      "post": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_List",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiKey"
            },
            "x-nullable": true
          },
          {
            "type": "integer",
            "name": "page",
            "in": "query",
            "required": false,
            "format": "int32",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/ProductView"
              }
            }
          }
        }
      }
    },
    "/v1/ProductsApi": {
      "patch": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_PatchProduct",
        "parameters": [
          {
            "name": "productJson",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProductCreateModify"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_PatchProduct2",
        "parameters": [
          {
            "name": "productJson",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProductCreateModify"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      }
    },
    "/v1/ProductsApi/Save": {
      "post": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_Save",
        "parameters": [
          {
            "name": "productJson",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProductCreateModify"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "201": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/ProductView"
            }
          }
        }
      }
    },
    "/v1/ProductsApi/{serial}": {
      "delete": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_DeleteProduct",
        "parameters": [
          {
            "type": "string",
            "name": "X-Api-Key",
            "in": "header",
            "required": true,
            "format": "guid",
            "x-nullable": false
          },
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "ProductsApi"
        ],
        "operationId": "ProductsApi_DeleteProduct2",
        "parameters": [
          {
            "type": "string",
            "name": "X-Api-Key",
            "in": "header",
            "required": true,
            "format": "guid",
            "x-nullable": false
          },
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      }
    },
    "/v1/SubscriptionsApi/Count": {
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Count",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ApiCredentials"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/CountOf"
            }
          }
        }
      }
    },
    "/v1/SubscriptionsApi/Find": {
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Find",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/SubscriptionView"
            }
          }
        }
      }
    },
    "/v1/SubscriptionsApi/List": {
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_List",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          },
          {
            "type": "integer",
            "name": "page",
            "in": "query",
            "required": false,
            "format": "int32",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SubscriptionView"
              }
            }
          }
        }
      }
    },
    "/v1/SubscriptionsApi": {
      "put": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_PutSubscription",
        "parameters": [
          {
            "name": "subscriptionJson",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SubscriptionCreateModify"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_PutSubscription2",
        "parameters": [
          {
            "name": "subscriptionJson",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SubscriptionCreateModify"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      }
    },
    "/v1/SubscriptionsApi/Disable": {
      "patch": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Disable",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Disable2",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      }
    },
    "/v1/SubscriptionsApi/Enable": {
      "patch": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Enable",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Enable2",
        "parameters": [
          {
            "name": "apiCreds",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/FindCredentials"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      }
    },
    "/v1/SubscriptionsApi/Save": {
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_Save",
        "parameters": [
          {
            "name": "subscriptionJson",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SubscriptionCreateModify"
            },
            "x-nullable": true
          }
        ],
        "responses": {
          "201": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "$ref": "#/definitions/KeyView"
            }
          }
        }
      }
    },
    "/v1/SubscriptionsApi/{serial}": {
      "delete": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_DeleteSubscription",
        "parameters": [
          {
            "type": "string",
            "name": "X-Api-Key",
            "in": "header",
            "required": true,
            "format": "guid",
            "x-nullable": false
          },
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          },
          {
            "type": "boolean",
            "name": "keep",
            "in": "query",
            "required": true,
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      },
      "post": {
        "tags": [
          "SubscriptionsApi"
        ],
        "operationId": "SubscriptionsApi_DeleteSubscription2",
        "parameters": [
          {
            "type": "string",
            "name": "X-Api-Key",
            "in": "header",
            "required": true,
            "format": "guid",
            "x-nullable": false
          },
          {
            "type": "string",
            "name": "serial",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          },
          {
            "type": "boolean",
            "name": "keep",
            "in": "query",
            "required": true,
            "x-nullable": true
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        }
      }
    }
  },
  "definitions": {
    "KeyView": {
      "type": "object",
      "required": [
        "serial",
        "current",
        "commenced",
        "callbackOnModify",
        "created",
        "frequency",
        "action"
      ],
      "properties": {
        "serial": {
          "type": "string",
          "format": "guid"
        },
        "current": {
          "type": "boolean"
        },
        "commenced": {
          "title": "Start From",
          "type": "string",
          "format": "date-time",
          "minLength": 1
        },
        "callbackOnModify": {
          "title": "Callback On Modified",
          "type": "boolean"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        },
        "frequency": {
          "type": "string",
          "minLength": 1
        },
        "action": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "maxLength": 80,
          "minLength": 0
        },
        "callbackUrl": {
          "title": "Callback Url",
          "type": "string",
          "format": "uri",
          "maxLength": 800,
          "minLength": 0
        },
        "custom": {}
      }
    },
    "CurrentKey": {
      "type": "object",
      "required": [
        "current"
      ],
      "properties": {
        "current": {
          "type": "boolean"
        }
      }
    },
    "Expiry": {
      "type": "object",
      "required": [
        "expires",
        "time"
      ],
      "properties": {
        "expires": {
          "type": "string",
          "format": "date-time"
        },
        "time": {
          "type": "string",
          "format": "time-span"
        }
      }
    },
    "CountOf": {
      "type": "object",
      "required": [
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "ApiKey": {
      "type": "object",
      "required": [
        "key"
      ],
      "properties": {
        "key": {
          "type": "string",
          "format": "guid"
        }
      }
    },
    "ProductView": {
      "type": "object",
      "required": [
        "serial",
        "created"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 80,
          "minLength": 0
        },
        "serial": {
          "type": "string",
          "format": "guid"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        },
        "custom": {},
        "subscriptions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SubscriptionView"
          }
        }
      }
    },
    "SubscriptionView": {
      "type": "object",
      "required": [
        "commenced",
        "callbackOnModify",
        "created",
        "frequency",
        "action"
      ],
      "properties": {
        "commenced": {
          "title": "Start From",
          "type": "string",
          "format": "date-time",
          "minLength": 1
        },
        "callbackOnModify": {
          "title": "Callback On Modified",
          "type": "boolean"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        },
        "frequency": {
          "type": "string",
          "minLength": 1
        },
        "action": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "maxLength": 80,
          "minLength": 0
        },
        "callbackUrl": {
          "title": "Callback Url",
          "type": "string",
          "format": "uri",
          "maxLength": 800,
          "minLength": 0
        },
        "custom": {},
        "keys": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/KeyView"
          }
        }
      }
    },
    "FindCredentials": {
      "type": "object",
      "required": [
        "key",
        "serial"
      ],
      "properties": {
        "key": {
          "type": "string",
          "format": "guid"
        },
        "serial": {
          "type": "string",
          "format": "guid"
        }
      }
    },
    "ProductCreateModify": {
      "type": "object",
      "required": [
        "key"
      ],
      "properties": {
        "key": {
          "type": "string",
          "format": "guid"
        },
        "serial": {
          "type": "string",
          "format": "guid"
        },
        "name": {
          "type": "string"
        },
        "custom": {}
      }
    },
    "ApiCredentials": {
      "type": "object",
      "required": [
        "key"
      ],
      "properties": {
        "key": {
          "type": "string",
          "format": "guid"
        },
        "serial": {
          "type": "string",
          "format": "guid"
        }
      }
    },
    "SubscriptionCreateModify": {
      "type": "object",
      "required": [
        "frequency",
        "action",
        "key",
        "serial"
      ],
      "properties": {
        "frequency": {
          "type": "string",
          "minLength": 1
        },
        "action": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string",
          "maxLength": 80,
          "minLength": 0
        },
        "callbackUrl": {
          "title": "Callback Url",
          "type": "string",
          "format": "uri",
          "maxLength": 800,
          "minLength": 0
        },
        "key": {
          "type": "string",
          "format": "guid"
        },
        "serial": {
          "type": "string",
          "format": "guid"
        },
        "custom": {},
        "startFrom": {
          "type": "string"
        },
        "callbackOnModify": {
          "type": "boolean"
        }
      }
    }
  }
}