POST | /users/passwordreset | Send password reset email to a user. |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class PasswordResetRequest : PasswordResetRequestDto(), IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
@ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
var ApiKey:String? = null
/**
* ClubReady Club ID (StoreID internally)
*/
@ApiMember(DataType="integer", Description="ClubReady Club ID (StoreID internally)", Name="StoreId", ParameterType="query")
var StoreId:Int? = null
/**
* StoreId OR ChainId is required
*/
@ApiMember(DataType="integer", Description="StoreId OR ChainId is required", Name="ChainId", ParameterType="query")
var ChainId:Int? = null
/**
* ClubReady username
*/
@ApiMember(DataType="string", Description="ClubReady username", Name="UserName", ParameterType="query")
var Username:String? = null
/**
* User's email address.
*/
@ApiMember(DataType="string", Description="User's email address.", Name="Email", ParameterType="query")
var Email:String? = null
/**
* 0 = All, 1 = Prospects, 2 = Active, 3 = Inactive, 4 = All Members, 5 = Past Due
*/
@ApiMember(DataType="integer", Description="0 = All, 1 = Prospects, 2 = Active, 3 = Inactive, 4 = All Members, 5 = Past Due", Name="Filter", ParameterType="query")
var Filter:Int? = null
var RestrictedId:Int? = null
var RestrictedResourceType:RestrictedResourceType? = null
}
open class PasswordResetRequestDto : ApiDtoBase()
{
var Email:String? = null
var Username:String? = null
var Filter:Int? = null
}
open class ApiDtoBase
{
var ApiKey:String? = null
var StoreId:Int? = null
var ChainId:Int? = null
}
enum class RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
open class PasswordResetResponse : PasswordResetResponseDto()
{
var Success:Boolean? = null
var Message:String? = null
}
open class PasswordResetResponseDto : ApiResponseBase()
{
}
open class ApiResponseBase
{
var Success:Boolean? = null
var Message:String? = null
}
Kotlin PasswordResetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /users/passwordreset HTTP/1.1
Host: clubready.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PasswordResetRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model">
<ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
<ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
<StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
<Email xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Email>
<Filter xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</Filter>
<Username xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Username>
</PasswordResetRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <PasswordResetResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Members.Model"> <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message> <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success> </PasswordResetResponse>