| GET | /account/status | Get account status |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using SanctionsSearch.Api2.ServiceModel.Operations.Account;
using SanctionsSearch.Api2.ServiceModel.Operations.Base;
using SanctionsSearch.Api2.ServiceModel.Types;
namespace SanctionsSearch.Api2.ServiceModel.Operations.Account
{
[DataContract]
public partial class GetAccountStatus
: BaseRequest
{
}
public partial class GetAccountStatusData
: BaseResponse
{
///<summary>
///The account status information
///</summary>
[ApiMember(Description="The account status information")]
public virtual AccountStatus AccountStatus { get; set; }
}
[DataContract]
public partial class GetAccountStatusResponse
{
///<summary>
///The response data
///</summary>
[DataMember]
[ApiMember(Description="The response data")]
public virtual GetAccountStatusData Data { get; set; }
}
}
namespace SanctionsSearch.Api2.ServiceModel.Operations.Base
{
public partial class ArrayOfResponseError
: List<ResponseError>
{
}
[DataContract]
public partial class BaseRequest
: IBaseRequest
{
///<summary>
///The authentication credentials
///</summary>
[DataMember]
[ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")]
public virtual Authentication Authentication { get; set; }
}
public partial class BaseResponse
: IBaseDataResponse, IHasResponseStatus
{
///<summary>
///The status of the response
///</summary>
[ApiMember(Description="The status of the response")]
public virtual ResponseStatus ResponseStatus { get; set; }
}
[DataContract]
public partial class ResponseError
{
[DataMember(Order=1)]
public virtual string ErrorCode { get; set; }
[DataMember(Order=2)]
public virtual string FieldName { get; set; }
[DataMember(Order=3)]
public virtual string Message { get; set; }
[DataMember(Order=4)]
public virtual Dictionary<string, string> Meta { get; set; }
}
[DataContract]
public partial class ResponseStatus
{
[DataMember(Order=1)]
public virtual string ErrorCode { get; set; }
[DataMember(Order=2)]
public virtual string Message { get; set; }
[DataMember(Order=3)]
public virtual string StackTrace { get; set; }
[DataMember(Order=4)]
public virtual ArrayOfResponseError Errors { get; set; }
[DataMember(Order=5)]
public virtual Dictionary<string, string> Meta { get; set; }
}
}
namespace SanctionsSearch.Api2.ServiceModel.Types
{
public partial class AccountStatus
{
///<summary>
///The account status (e.g. Unpaid, Active, Expired)
///</summary>
[ApiMember(Description="The account status (e.g. Unpaid, Active, Expired)")]
public virtual string Status { get; set; }
///<summary>
///The account type (e.g. live, developer, demo)
///</summary>
[ApiMember(Description="The account type (e.g. live, developer, demo)")]
public virtual string Type { get; set; }
///<summary>
///The account Expiry Date
///</summary>
[ApiMember(Description="The account Expiry Date")]
public virtual DateTime? ExpiryDate { get; set; }
///<summary>
///The account Expiry Date as a string in ISO 8601 format
///</summary>
[ApiMember(Description="The account Expiry Date as a string in ISO 8601 format")]
public virtual string ExpiryDateUniversal { get; set; }
///<summary>
///The account balance
///</summary>
[ApiMember(Description="The account balance")]
public virtual decimal Balance { get; set; }
///<summary>
///The account search credit balance
///</summary>
[ApiMember(Description="The account search credit balance")]
public virtual long CreditBalance { get; set; }
///<summary>
///The account DBS credit balance
///</summary>
[ApiMember(Description="The account DBS credit balance")]
public virtual int DBSBasicCreditBalance { get; set; }
///<summary>
///The list of enabled products for this account
///</summary>
[ApiMember(Description="The list of enabled products for this account")]
public virtual List<string> Products { get; set; }
///<summary>
///The list of enabled capabilities for this account
///</summary>
[ApiMember(Description="The list of enabled capabilities for this account")]
public virtual List<string> Capabilities { get; set; }
}
[DataContract]
public partial class Authentication
{
///<summary>
///The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)
///</summary>
[DataMember]
[ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body")]
public virtual string ApiUserId { get; set; }
///<summary>
///The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)
///</summary>
[DataMember]
[ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body")]
public virtual string ApiUserKey { get; set; }
///<summary>
///The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).
///</summary>
[DataMember]
[ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body")]
public virtual string UserId { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /account/status HTTP/1.1 Host: api.simplified.id Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"data":{"accountStatus":{"status":"String","type":"String","expiryDate":"\/Date(-62135596800000-0000)\/","expiryDateUniversal":"String","balance":0,"creditBalance":0,"dbsBasicCreditBalance":0,"products":["String"],"capabilities":["String"]},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}