POST | /account/register | Create a new account |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports SanctionsSearch.Api2.ServiceModel.Operations.Account
Imports SanctionsSearch.Api2.ServiceModel.Operations.Base
Imports SanctionsSearch.Api2.ServiceModel.Types
Namespace Global
Namespace SanctionsSearch.Api2.ServiceModel.Operations.Account
<DataContract>
Public Partial Class RegisterAccount
Inherits BaseRequest
<DataMember>
Public Overridable Property Request As RegisterAccountRequest
End Class
Public Partial Class RegisterAccountData
Inherits BaseResponse
'''<Summary>
'''A unique identifier for the users API access
'''</Summary>
<ApiMember(Description:="A unique identifier for the users API access")>
Public Overridable Property ApiUserId As String
'''<Summary>
'''A secure, randomly generated key used for API authentication
'''</Summary>
<ApiMember(Description:="A secure, randomly generated key used for API authentication")>
Public Overridable Property ApiUserKey As String
End Class
Public Partial Class RegisterAccountRequest
'''<Summary>
'''The desired login username for the account
'''</Summary>
<ApiMember(Description:="The desired login username for the account", IsRequired:=true)>
Public Overridable Property Username As String
'''<Summary>
'''The password for account login
'''</Summary>
<ApiMember(Description:="The password for account login", IsRequired:=true)>
Public Overridable Property Password As String
'''<Summary>
'''The contact email address for the account holder
'''</Summary>
<ApiMember(Description:="The contact email address for the account holder", IsRequired:=true)>
Public Overridable Property Email As String
'''<Summary>
'''The full legal name of the account holder
'''</Summary>
<ApiMember(Description:="The full legal name of the account holder", IsRequired:=true)>
Public Overridable Property FullName As String
'''<Summary>
'''The registered name of the company associated with this account
'''</Summary>
<ApiMember(Description:="The registered name of the company associated with this account", IsRequired:=true)>
Public Overridable Property CompanyName As String
'''<Summary>
'''The primary contact phone number of the company
'''</Summary>
<ApiMember(Description:="The primary contact phone number of the company", IsRequired:=true)>
Public Overridable Property CompanyPhone As String
'''<Summary>
'''The first line of the company’s address (e.g., street name and number)
'''</Summary>
<ApiMember(Description:="The first line of the company’s address (e.g., street name and number)", IsRequired:=true)>
Public Overridable Property Address1 As String
'''<Summary>
'''The second line of the company’s address (optional)
'''</Summary>
<ApiMember(Description:="The second line of the company’s address (optional)")>
Public Overridable Property Address2 As String
'''<Summary>
'''The third line of the company’s address (optional)
'''</Summary>
<ApiMember(Description:="The third line of the company’s address (optional)")>
Public Overridable Property Address3 As String
'''<Summary>
'''The city where the company is located (optional)
'''</Summary>
<ApiMember(Description:="The city where the company is located (optional)")>
Public Overridable Property City As String
'''<Summary>
'''The postal or ZIP code of the company’s address
'''</Summary>
<ApiMember(Description:="The postal or ZIP code of the company’s address", IsRequired:=true)>
Public Overridable Property Postcode As String
'''<Summary>
'''The country where the company is registered
'''</Summary>
<ApiMember(Description:="The country where the company is registered", IsRequired:=true)>
Public Overridable Property Country As String
'''<Summary>
'''The classification of the company (e.g., LLC, Corporation, Sole Proprietorship)
'''</Summary>
<ApiMember(Description:="The classification of the company (e.g., LLC, Corporation, Sole Proprietorship)", IsRequired:=true)>
Public Overridable Property CompanyType As String
'''<Summary>
'''The industry sector the company operates in
'''</Summary>
<ApiMember(Description:="The industry sector the company operates in", IsRequired:=true)>
Public Overridable Property CompanyIndustry As String
'''<Summary>
'''The trade body, network, or affiliation the company is a member of (if applicable)
'''</Summary>
<ApiMember(Description:="The trade body, network, or affiliation the company is a member of (if applicable)")>
Public Overridable Property CompanyNetwork As String
'''<Summary>
'''Indicates agreement to the terms and conditions (required)
'''</Summary>
<ApiMember(Description:="Indicates agreement to the terms and conditions (required)", IsRequired:=true)>
Public Overridable Property AgreeToTerms As Boolean
'''<Summary>
'''Indicates agreement to the data protection statement (required)
'''</Summary>
<ApiMember(Description:="Indicates agreement to the data protection statement (required)", IsRequired:=true)>
Public Overridable Property AgreeToDataProtection As Boolean
'''<Summary>
'''Indicates consent to be contacted (optional)
'''</Summary>
<ApiMember(Description:="Indicates consent to be contacted (optional)")>
Public Overridable Property AgreeToContact As Boolean
'''<Summary>
'''Indicates agreement to the privacy policy (required)
'''</Summary>
<ApiMember(Description:="Indicates agreement to the privacy policy (required)", IsRequired:=true)>
Public Overridable Property AgreeToPrivacy As Boolean
'''<Summary>
'''An optional voucher code for discounts or promotions
'''</Summary>
<ApiMember(Description:="An optional voucher code for discounts or promotions")>
Public Overridable Property VoucherCode As String
'''<Summary>
'''An optional code that grants access to certain features or subscriptions
'''</Summary>
<ApiMember(Description:="An optional code that grants access to certain features or subscriptions")>
Public Overridable Property AccountActivationCode As String
'''<Summary>
'''The company's VAT registration number (if applicable)
'''</Summary>
<ApiMember(Description:="The company's VAT registration number (if applicable)")>
Public Overridable Property VATNumber As String
'''<Summary>
'''The country where the company is VAT-registered
'''</Summary>
<ApiMember(Description:="The country where the company is VAT-registered")>
Public Overridable Property VATCountry As String
End Class
<DataContract>
Public Partial Class RegisterAccountResponse
'''<Summary>
'''The response data
'''</Summary>
<DataMember>
<ApiMember(Description:="The response data")>
Public Overridable Property Data As RegisterAccountData
End Class
End Namespace
Namespace SanctionsSearch.Api2.ServiceModel.Operations.Base
Public Partial Class ArrayOfResponseError
Inherits List(Of ResponseError)
End Class
<DataContract>
Public Partial Class BaseRequest
Implements IBaseRequest
'''<Summary>
'''The authentication credentials
'''</Summary>
<DataMember>
<ApiMember(Description:="The authentication credentials", IsRequired:=true, ParameterType:="header, body")>
Public Overridable Property Authentication As Authentication
End Class
Public Partial Class BaseResponse
Implements IBaseDataResponse
Implements IHasResponseStatus
'''<Summary>
'''The status of the response
'''</Summary>
<ApiMember(Description:="The status of the response")>
Public Overridable Property ResponseStatus As ResponseStatus
End Class
<DataContract>
Public Partial Class ResponseError
Public Sub New()
Meta = New Dictionary(Of String, String)
End Sub
<DataMember(Order:=1)>
Public Overridable Property ErrorCode As String
<DataMember(Order:=2)>
Public Overridable Property FieldName As String
<DataMember(Order:=3)>
Public Overridable Property Message As String
<DataMember(Order:=4)>
Public Overridable Property Meta As Dictionary(Of String, String)
End Class
<DataContract>
Public Partial Class ResponseStatus
Public Sub New()
Meta = New Dictionary(Of String, String)
End Sub
<DataMember(Order:=1)>
Public Overridable Property ErrorCode As String
<DataMember(Order:=2)>
Public Overridable Property Message As String
<DataMember(Order:=3)>
Public Overridable Property StackTrace As String
<DataMember(Order:=4)>
Public Overridable Property Errors As ArrayOfResponseError
<DataMember(Order:=5)>
Public Overridable Property Meta As Dictionary(Of String, String)
End Class
End Namespace
Namespace SanctionsSearch.Api2.ServiceModel.Types
<DataContract>
Public Partial Class Authentication
'''<Summary>
'''The API User ID provided by us when you signed up to use our API
'''</Summary>
<DataMember>
<ApiMember(Description:="The API User ID provided by us when you signed up to use our API", IsRequired:=true, ParameterType:="header, body")>
Public Overridable Property ApiUserId As String
'''<Summary>
'''The API User Key provided by us when you signed up to use our API
'''</Summary>
<DataMember>
<ApiMember(Description:="The API User Key provided by us when you signed up to use our API", IsRequired:=true, ParameterType:="header, body")>
Public Overridable Property ApiUserKey As String
End Class
End Namespace
End Namespace
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.
POST /account/register HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"request":{"username":"String","password":"String","email":"String","fullName":"String","companyName":"String","companyPhone":"String","address1":"String","address2":"String","address3":"String","city":"String","postcode":"String","country":"String","companyType":"String","companyIndustry":"String","companyNetwork":"String","agreeToTerms":false,"agreeToDataProtection":false,"agreeToContact":false,"agreeToPrivacy":false,"voucherCode":"String","accountActivationCode":"String","vatNumber":"String","vatCountry":"String"},"authentication":{"apiUserId":"String","apiUserKey":"String"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"data":{"apiUserId":"String","apiUserKey":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}