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