{
  "x-generator": "NSwag v14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))",
  "swagger": "2.0",
  "info": {
    "title": "Identity Server Api",
    "contact": {
      "name": "Dev Team",
      "email": "devteam@winning.com.au"
    },
    "version": "1.0.0"
  },
  "host": "id.winning.com.au",
  "schemes": [
    "http"
  ],
  "paths": {
    "/api/Account/login/{returnUrl}": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_GetLoginView",
        "parameters": [
          {
            "type": "string",
            "name": "returnUrl",
            "in": "path",
            "required": true,
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "origin",
            "in": "query",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "nonce",
            "in": "query",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/login-redir": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_PostLoginView",
        "parameters": [
          {
            "type": "string",
            "name": "origin",
            "in": "formData",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "email",
            "in": "formData",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "password",
            "in": "formData",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "returnUrl",
            "in": "formData",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "nonce",
            "in": "formData",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "loginUri",
            "in": "query",
            "default": "/account/login",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/login": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_Login",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "login",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/LoginPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/relogin": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_Relogin",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "reLogin",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ReLoginPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/externallogin/{providerName}/{returnUrl}": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_ExternalLogin",
        "parameters": [
          {
            "type": "string",
            "name": "providerName",
            "in": "path",
            "required": true,
            "x-nullable": false
          },
          {
            "type": "string",
            "name": "returnUrl",
            "in": "path",
            "required": true,
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "nonce",
            "in": "query",
            "x-nullable": true
          },
          {
            "type": "string",
            "name": "origin",
            "in": "query",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_ExternalLoginCallback",
        "parameters": [
          {
            "type": "string",
            "name": "returnUrl",
            "in": "query",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/logout": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_Logout",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "logout",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/LogoutPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/register": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_GetRegisterView",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_Register",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "register",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RegisterPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/confirmemail/{token}": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_GetConfirmEmailView",
        "parameters": [
          {
            "type": "string",
            "name": "token",
            "in": "path",
            "required": true,
            "format": "guid",
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/forgotpassword": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_GetForgotPasswordView",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_ForgotPassword",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "model",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ForgotPasswordPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/resendconfirmemail": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_ResendConfirmEmail",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "model",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResendConfirmEmailPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/Account/getprofile": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_GetProfile",
        "responses": {
          "401": {
            "description": ""
          },
          "400": {
            "x-nullable": false,
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "500": {
            "x-nullable": false,
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "200": {
            "x-nullable": false,
            "description": "",
            "schema": {
              "$ref": "#/definitions/ProfileViewModel"
            }
          }
        }
      }
    },
    "/api/Account/updateprofile": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_UpdateProfile",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "model",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateProfilePostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "401": {
            "description": ""
          },
          "400": {
            "x-nullable": false,
            "description": "",
            "schema": {
              "$ref": "#/definitions/ResultModel"
            }
          },
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/Account/resetpassword": {
      "get": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_GetResetPasswordView",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "Account_ResetPassword",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "parameters": [
          {
            "name": "model",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResetPasswordPostModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "tags": [
          "Default"
        ],
        "operationId": "Default_DefaultGET",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      },
      "head": {
        "tags": [
          "Default"
        ],
        "operationId": "Default_DefaultHEAD",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      },
      "options": {
        "tags": [
          "Default"
        ],
        "operationId": "Default_DefaultOPTIONS",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/authentication/Otp/send": {
      "post": {
        "tags": [
          "Otp"
        ],
        "summary": "Sends a one time password to authenticate the specified email.",
        "operationId": "Otp_SendOtp",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "sendOtpModel",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SendOtpModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "400": {
            "x-nullable": false,
            "description": "",
            "schema": {
              "$ref": "#/definitions/ValidationProblemDetails"
            }
          },
          "500": {
            "description": ""
          },
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/authentication/Otp/verify": {
      "post": {
        "tags": [
          "Otp"
        ],
        "summary": "Verifies and consumes a one time password, and returns whether or not it was successful.",
        "operationId": "Otp_VerifyOtp",
        "consumes": [
          "application/json-patch+json",
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "name": "verifyOtpModel",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/VerifyOtpModel"
            },
            "x-nullable": false
          }
        ],
        "responses": {
          "400": {
            "x-nullable": false,
            "description": "",
            "schema": {
              "$ref": "#/definitions/ValidationProblemDetails"
            }
          },
          "200": {
            "description": ""
          }
        }
      }
    },
    "/api/TestData/healthcheck": {
      "get": {
        "tags": [
          "TestData"
        ],
        "operationId": "TestData_HealthCheck",
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    },
    "/api/TestData/secret": {
      "get": {
        "tags": [
          "TestData"
        ],
        "operationId": "TestData_Secret",
        "parameters": [
          {
            "type": "string",
            "name": "secret",
            "in": "query",
            "x-nullable": true
          }
        ],
        "responses": {
          "200": {
            "x-nullable": true,
            "description": "",
            "schema": {
              "type": "file"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "LoginPostModel": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "origin": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        },
        "returnUrl": {
          "type": "string"
        }
      }
    },
    "ReLoginPostModel": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "origin": {
          "type": "string"
        },
        "nonce": {
          "type": "string"
        },
        "returnUrl": {
          "type": "string"
        }
      }
    },
    "LogoutPostModel": {
      "type": "object",
      "required": [
        "userId"
      ],
      "properties": {
        "userId": {
          "type": "string",
          "format": "guid"
        },
        "clientId": {
          "type": "string"
        }
      }
    },
    "RegisterPostModel": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "abn": {
          "type": "string"
        },
        "referrerId": {
          "type": "string"
        }
      }
    },
    "ForgotPasswordPostModel": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "ResendConfirmEmailPostModel": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      }
    },
    "ProfileViewModel": {
      "type": "object",
      "properties": {
        "emails": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EmailViewModel"
          }
        },
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        }
      }
    },
    "EmailViewModel": {
      "type": "object",
      "required": [
        "isVerified"
      ],
      "properties": {
        "email": {
          "type": "string"
        },
        "isVerified": {
          "type": "boolean"
        },
        "expiry": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "ResultModel": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "$ref": "#/definitions/StatusEnum"
        },
        "errors": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "StatusEnum": {
      "type": "integer",
      "description": "",
      "x-enumNames": [
        "Success",
        "Fail",
        "EmailNotConfirmed",
        "AccountNotActive",
        "TokenExpired",
        "PasswordNeedsReset"
      ],
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5
      ]
    },
    "UpdateProfilePostModel": {
      "type": "object",
      "required": [
        "emailChanged",
        "firstNameChanged",
        "lastNameChanged"
      ],
      "properties": {
        "email": {
          "type": "string"
        },
        "emailChanged": {
          "type": "boolean"
        },
        "firstName": {
          "type": "string"
        },
        "firstNameChanged": {
          "type": "boolean"
        },
        "lastName": {
          "type": "string"
        },
        "lastNameChanged": {
          "type": "boolean"
        }
      }
    },
    "ResetPasswordPostModel": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "ValidationProblemDetails": {
      "allOf": [
        {
          "$ref": "#/definitions/HttpValidationProblemDetails"
        },
        {
          "type": "object",
          "additionalProperties": {},
          "required": [
            "errors"
          ],
          "properties": {
            "errors": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      ]
    },
    "HttpValidationProblemDetails": {
      "allOf": [
        {
          "$ref": "#/definitions/ProblemDetails"
        },
        {
          "type": "object",
          "additionalProperties": {},
          "required": [
            "errors"
          ],
          "properties": {
            "errors": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      ]
    },
    "ProblemDetails": {
      "type": "object",
      "additionalProperties": {},
      "required": [
        "extensions"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "int32"
        },
        "detail": {
          "type": "string"
        },
        "instance": {
          "type": "string"
        },
        "extensions": {
          "type": "object",
          "additionalProperties": {}
        }
      }
    },
    "SendOtpModel": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "businessId": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "templateId": {
          "type": "string"
        },
        "explanation": {
          "type": "string"
        }
      }
    },
    "VerifyOtpModel": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "businessId": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    }
  }
}