Sanctions Search API: v2

<back to all web services

RegisterAccount

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

VB.NET RegisterAccount DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .soap12 suffix or ?format=soap12

HTTP + SOAP12

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /soap12 HTTP/1.1 
Host: api.sanctionssearch.com 
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>

<RegisterAccount xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Authentication>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Authentication>
  <Request>
    <AccountActivationCode>String</AccountActivationCode>
    <Address1>String</Address1>
    <Address2>String</Address2>
    <Address3>String</Address3>
    <AgreeToContact>false</AgreeToContact>
    <AgreeToDataProtection>false</AgreeToDataProtection>
    <AgreeToPrivacy>false</AgreeToPrivacy>
    <AgreeToTerms>false</AgreeToTerms>
    <City>String</City>
    <CompanyIndustry>String</CompanyIndustry>
    <CompanyName>String</CompanyName>
    <CompanyNetwork>String</CompanyNetwork>
    <CompanyPhone>String</CompanyPhone>
    <CompanyType>String</CompanyType>
    <Country>String</Country>
    <Email>String</Email>
    <FullName>String</FullName>
    <Password>String</Password>
    <Postcode>String</Postcode>
    <Username>String</Username>
    <VATCountry>String</VATCountry>
    <VATNumber>String</VATNumber>
    <VoucherCode>String</VoucherCode>
  </Request>
</RegisterAccount>

</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>

<RegisterAccountResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Data>
    <ResponseStatus>
      <ErrorCode>String</ErrorCode>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
      <Errors>
        <ResponseError>
          <ErrorCode>String</ErrorCode>
          <FieldName>String</FieldName>
          <Message>String</Message>
          <Meta xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:KeyValueOfstringstring>
              <d6p1:Key>String</d6p1:Key>
              <d6p1:Value>String</d6p1:Value>
            </d6p1:KeyValueOfstringstring>
          </Meta>
        </ResponseError>
      </Errors>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseStatus>
    <ApiUserId>String</ApiUserId>
    <ApiUserKey>String</ApiUserKey>
  </Data>
</RegisterAccountResponse>

</soap12:Body>
</soap12:Envelope>