Client Management Systems API

Request to create a counterpart under a specified owner as well as a number of accounts and users.


The following parameters are available in the request.

Parameter

Mandatory

Description

SessionID

Y

SessionID returned by the Login Request

Accounts

Y

A list of AccountCreationInfo objects.
See Section 4.4.3.1 for details.

Counterpart

Y

The Counterpart object.
See Section 4.4.3.2 for details.

SimCounterpartId

N

CounterpartId of a lead that exists in simulation, under the WLC's Owner in the the Simulation environment. This field is to be used if the WLC wishes to create a Live client with the same id that the client had as a lead in the simulation environment.
(This will allow the WLC to keep track of the conversions of leads to live clients.)

TemplateId

Y

Id of the counterpart template.
Saxo Bank will create the Counterpart template. This template sets all default values of the Counterpart that are not included as in parameters.

Users

Y

A list of User objects
See Section 0 for details

EncryptionInfo

N

See Section 4.4.1.1 for details

AccountCreationInfo object

Parameter

Mandatory

Description

Account

Y

The Account object.
See Section 4.4.2.1

TemplateId

Y

Id of the account template.
Saxo Bank will create the account template. This template sets all default values of the account that are not included as in parameters.

Counterpart object

Parameter

Mandatory

Description

OwnerId

Y

Owner Id of the Counterpart

CounterpartId

Create: N
Update: Y

Counterpart Id (other word for Client Id), only specified for updates.

Name

N

Name given to the Counterpart. If not defined the value will be set to the same as the CounterpartID (automatically generated by Saxo)

BaseCurrency

N

Base currency for the counterpart.

IsProfessional

N

"false" = Not professional
"true"= Is Professional

Language

Y

Language ISO (639-1) code of counterpart, e.g. DA.
Possible values, for this field, can be retrieved from the GetDataItemTypes request.

CountryOfResidence

Y

Must be set by the WLC. Possible values, for this field, can be retrieved from the GetDataItemTypes request.

TaxCountry

Y

Must be set by the WLC. Possible values, for this field, can be retrieved from the GetDataItemTypes request.

Email

N

Should NOT be used! But tag must be left in the message as empty.

CompanyRegistrationNumber

N

Should not be supplied.

Active

N

Whether the Counterpart is active or not.
Should not be created as inactive.

MarginProfileId

N

Should not be supplied during create.

MarginCallProfileId

N

Should not be supplied during create.

ProductClassifications

N

A list of Product Classification objects
See Section 4.4.3.4 for details.

ReliefAtSource

N

A Relief at Source object.
See Section 4.4.3.5 for details.

Vat

N

A Vat object.
See Section 4.4.3.6 for details

SwissTax

N

A Swiss Tax object. Should not be supplied.
See Section 4.4.3.7 for details.

CounterpartType

N

Private or Corporate

WealthManagementProfileId

N

The Id of the WealthManagementsProfile.
Possible values for this field can be retrieved from the GetDataItemTypes

Emir

N

The Emir object.
Trade Reporting functionality is an optional set of input parameters made up by 2 tags that can be added to the body of the CreateCounterpart request.
See Section 4.4.3.10 for details

WlcEndClientName

N

Name of the WLC's Client. Information encrypted within Saxo systems. (Used for Relief at source functionality)

feeProfileIds

N

Fee profile Id. Possible values, for this field, can be retrieved from the GetDataItemTypes request.

CounterpartGroupIds

N

Client group Ids

WithholdingTaxProfileId

N

Withholding Tax Profile Id

PositionNettingModeId

N

Position Netting Model, ie; Intraday Netting or EOD Netting. Possible Id values, for this field, can be retrieved from the GetDataItemTypes request.

User object

Parameter

Mandatory

Description

CounterpartId

N

The Counterpart id – the id the User is to be created under.
Not to be supplied when doing a Counterpart Create.

UserId

Create: N
Update: Y

The User Id.
Not to be supplied during creates.

Login

N

String length [4, 32] characters. This name must be unique in the system. This parameter can be set to empty string if the user login should be set to the same as the created counterpart id.

Name

N

The name of the WLC's client's name.

Tin

N

The Tin of the User.

Password

N

The Password

Active

N

Whether the User is active or not.

AccessProfile

N

Id of the Access profile to associate to the user.
Possible values, for this field, can be retrieved from the GetDataItemTypes request.

LockedOut

N

For creation, will be set to true by template.

NationalTins

N

A list of National Tin objects.
See Section 4.4.3.8 for details.

Nationality

N

Nationality of the user

PasswordIsEncrypted

N

"true" = if the Password is being sent encrypted. If the this fiels is set to true the encryption details are read from the EncryptionInfo object (more details on the EncryptionInfo Object at 4.4.1.1).
"false"= if the Password is not being sent encrypted. This field can be left out if the Password is not encrypted.
For more information on the password encryption process please consult Appendix 8.1

PasswordOnly

N

True = No User Key needs to be provided when loging into Client Station.
False = User Key needs to be generated and approved, in order to login into Cleint Station

Product Classification Object

Parameter

Mandatory

Description

ProductAreaId

Y

If MiFID classification is taken for a specific product, this field must be specified.
Possible values, for this field, can be retrieved from the GetDataItemTypes request.

ProductClassificationId

Y

If MiFID classification is taken for a specific product, this field must be specified.
Possible values, for this field, can be retrieved from the GetDataItemTypes request.

AppropriatenessTestPassedId

N

If MiFID classification is taken for a speciffc product, this field must be specified.
Possible values, for this field, can be retrieved from the GetDataItemTypes request.

Relief at source object

Parameter

Mandatory

Description

Enabled

Y

Of type Boolean. If filled the expected values are: "true" or "false".

TypeId

Y

Type, e.g. "Danish companies reduced tax".
Possible values, for this field, can be retrieved from the GetDataItemTypes request.

ExpiryDate

N

Date. If DocType = 13 then set value to 0001-01-01.

Nifid

N

WLC's Client Tax Identification. Length equals to 9.

Vat Object

Parameter

Mandatory

Description

Percentage

Y

Taken from template as standard.

Forced

Y

Set to false as standard.

Swiss Tax Object

Parameter

Mandatory

Description

BrokerIntroduced

N

Should not be supplied.

StampDutyExcempt

N

Should not be supplied.

Residency

N

Should not be supplied.

National Tin Object

Parameter

Mandatory

Description

Country

Y

The Country the National Tin is from.

Tin

Y

The National Tin (Tax Identification Number).

Relief at source

This section of parameters is optional, but if the White Label wishes to use the functionality, two items must be in place, before the White Label can use the reliefAtSourceInfo fields:

  1. White Label must sign an additional addendum to the White Label agreement
  2. Additional configuration of the White Label's account structure is required

When requesting this functionality through the CreateCouterpart request the below information must be filled in for each client you would like to offer relief at source on Portuguese shares:

  • End client's full name: This value is to be presented in the wlcEndClientName parameter of the CreateCounterpart request.
  • Tax country: This value is to be presented in the COUNTRY parameter of the CreateCounterpart request.
  • Relief at Source Section Parameters: Please refer to the following chapter for more details on these fields.

Consequences of wrong information filled in these fields are:

  • The client will not obtain reduced tax rate on dividends
  • Other clients holding the same ISIN might not obtain reduced right either if the total positions for each tax bracket are wrong.
  • The tax reporting to Portuguese authority will be rejected with wrong information,
  • Potentially a cost of manual correction afterwards.

Relief at Source Section Parameters

The Relief at Source functionality is an optional set of input parameters made up by the fields found in Section 4.4.3.5.
Section Parameter Rules:

  1. The entire section is optional. However if it provided, the mandatory parts must be provided.
  2. When it is there, the relief at source information will be used for creating the counterpart.
  3. When it is provided the owner must be enabled for relief at source information, if not a validation message will be thrown.
  4. When setting relief at source information a valid doc type for the owner must be specified.
  5. When the selected document type is a Portuguese doc type a nif must be specified that follows the format rules for nif ids.


Valid Document Types for reduced tax:

SuBject

DOC ID

URL

Discl. local corp(PT)

13

Disclosed local corporate

Discl. foreign corp(PT)

16

Disclosed foreign corporate

Discl. local indv(PT)

19

Disclosed local individual

Discl. foreign indv(PT)

22

Disclosed foreign individual

EMIR Object

Parameter

Mandatory

Description

IsFinancial

Y

Boolean field indicating financial classification of client.
If filled the expected values are: "true" or "false".

LeiCode

C

Legal Entity Identifier
If Isfinancial is "false" then LEI can be empty or exactly 20 chars.
If IsFinancial is "true" then LEI has to be exactly 20 char.

SOAP 1.2 Definition


Request 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.saxobank.com/service/cms/2013/08" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header>
     <ns:SessionId>string</ns:SessionId>
   </soapenv:Header>
   <soapenv:Body>
     <ns:CreateCounterpartRequest>
       <!-Optional:->
       <ns:Accounts>
         <!-Zero or more repetitions :->
         <ns:AccountCreateInfo>
           <ns:Account>
             <!-Optional:->
             <ns:CounterpartId>int</ns:CounterpartId>
             <ns:AccountNumber>string</ns:AccountNumber>
             <!-Optional:->
             <ns:Description>string</ns:Description>
             <!-Optional:->
             <ns:Currency>string</ns:Currency>
             <!-Optional:->
             <ns:InternalAccountNumber>string</ns:InternalAccountNumber>
             <!-Optional:->
             <ns:CommissionGroupId>int</ns:CommissionGroupId>
             <!-Optional:->
             <ns:Iban>string</ns:Iban>
             <!-Optional:->
             <ns:AccountRiskProfileId>int</ns:AccountRiskProfileId>
             <!-Optional:->
             <ns:Active>bool</ns:Active>
             <!-Optional:->
             <ns:InterestProfileId>int</ns:InterestProfileId>
             <!-Optional:->
             <ns:CfdInterestProfileId>int</ns:CfdInterestProfileId>
             <!-Optional:->
             <ns:TradableInstrumentIds>
               <!-Zero or more repetitions:->
               <arr:int>int</arr:int>
             </ns:TradableInstrumentIds>
             <!-Optional:->
             <ns:VPAccount>
               <ns:AccountNumber>string</ns:AccountNumber>
               <!-Optional:->
               <ns:CdIdentNumber>string</ns:CdIdentNumber>
               <!-Optional:->
               <ns:RegisterToName>bool</ns:RegisterToName>
               <!-Optional:->
               <ns:DividendTaxStatusId>int</ns:DividendTaxStatusId>
             </ns:VPAccount>
            <!-Optional:->
             <ns:MaxCreditLine>decimal</ns:MaxCreditLine>
             <!-Optional:->
             <ns:WealthManagementEnabled>bool</ns:WealthManagementEnabled>
 	     <ns:MoneyManagerFeeProfileId>int</ns:MoneyManagerFeeProfileId>
 	     <ns:CfdFinanceProfileId>int</ns:CfdFinanceProfileId>
             <ns:AccountGroupIds>
 		<arr:int>int</arr:int>
 	     </ns:AccountGroupIds>
           </ns:Account>
           <ns:TemplateId>int</ns:TemplateId>
         </ns:AccountCreateInfo>
       </ns:Accounts>
       <!-Optional:->
       <ns:Counterpart>
         <!-Optional:->
         <ns:OwnerId>int</ns:OwnerId>
         <!-Optional:->
         <ns:CounterpartId>int</ns:CounterpartId>
         <!-Optional:->
         <ns:Name>string</ns:Name>
         <!-Optional:->
         <ns:BaseCurrency>string</ns:BaseCurrency>
         <!-Optional:->
         <ns:IsProfessional>bool</ns:IsProfessional>
         <!-Optional:->
         <ns:Language>string</ns:Language>
         <!-Optional:->
         <ns:CountryOfResidence>string</ns:CountryOfResidence>
         <!-Optional:->
         <ns:TaxCountry>string</ns:TaxCountry>
         <!-Optional:->
         <ns:Email>string</ns:Email>
         <!-Optional:->
         <ns:CompanyRegistrationNumber>string</ns:CompanyRegistrationNumber>
         <!-Optional:->
         <ns:Active>bool</ns:Active>
         <!-Optional:->
         <ns:MarginProfileId>int</ns:MarginProfileId>
         <!-Optional:->
         <ns:MarginCallProfileId>int</ns:MarginCallProfileId>
         <!-Optional:->
         <ns:ProductClassifications>
           <!-Zero or more repetitions:->
           <ns:ProductAreaClassification>
             <ns:ProductAreaId>int</ns:ProductAreaId>
             <ns:ProductClassificationId>int</ns:ProductClassificationId>
             <!-Optional:->
             <ns:AppropriatenessTestPassedId>int</ns:AppropriatenessTestPassedId>
           </ns:ProductAreaClassification>
         </ns:ProductClassifications>
        <!-Optional:->
         <ns:ReliefAtSource>
           <ns:Enabled>bool</ns:Enabled>
           <ns:TypeId>int</ns:TypeId>
          <!-Optional:->
           <ns:ExpiryDate>DateTime</ns:ExpiryDate>
           <!-Optional:->
           <ns:NifId>string</ns:NifId>
         </ns:ReliefAtSource>
         <!-Optional:->
         <ns:Vat>
          	<ns:Percentage>decimal</ns:Percentage>
         	<ns:Forced>bool</ns:Forced>
         </ns:Vat>
         <!-Optional:->
         <ns:SwissTax>
         <!-Optional:->
         <ns:BrokerIntroduced>bool</ns:BrokerIntroduced>
         <!-Optional:->
         <ns:StampDutyExempt>bool</ns:StampDutyExempt>
         <!-Optional:->
         <ns:Residency>bool</ns:Residency>
         </ns:SwissTax>
         <!-Optional:->
         <ns:CounterpartType>string</ns:CounterpartType>
         <!-Optional:->
         <ns:WealthManagementProfileId>int</ns:WealthManagementProfileId>
 	 <ns:Emir>
 		<!-Optional:->
 		<ns:IsFinancial>bool</ns:IsFinancial>
 		<!-Optional:->
 		<ns:LeiCode> int </ns:LeiCode>
 	</ns:Emir>
 	<!-Optional:->
 	<ns:WlcEndClientName>string</ns:WlcEndClientName>
 	<!-Optional:->
 <ns:FeeProfileIds>
 		<!--Zero or more repetitions:-->
 		<arr:int>int</arr:int>
	 </ns:FeeProfileIds>
 	<ns:CounterpartGroupIds>
 		<!--Zero or more repetitions:-->
 		<arr:int>int</arr:int>
 	</ns:CounterpartGroupIds>
 	<ns:WithholdingTaxProfileId>int</ns:WithholdingTaxProfileId>
 	<!-Optional:->
 	<ns:PositionNettingModeId>int</ns:PositionNettingModeId>
       </ns:Counterpart>
 	<!-Optional:->
 	<ns:EncryptionInfo>
 	<!-Optional:->
 	<ns:RSAKeySequenceNumber>int</ns:RSAKeySequenceNumber>
 	<!-Optional:->
 	<ns:AESKey>string</ns:AESKey>
	 </ns:EncryptionInfo>
 	<!-Optional:->
 	<ns:SimCounterpartId>int</ns:SimCounterpartId>
       <!-Optional:->
       <ns:TemplateId>int</ns:TemplateId>
       <!-Optional:->
       <ns:Users>
         <!-Zero or more repetitions:->
         <ns:User>
           <!-Optional:->
           <ns:CounterpartId>int</ns:CounterpartId>
           <!-Optional:->
           <ns:UserId>int</ns:UserId>
           <!-Optional:->
           <ns:Login>string</ns:Login>
           <!-Optional:->
           <ns:Name>string</ns:Name>
           <!-Optional:->
           <ns:Tin>string</ns:Tin>
           <!-Optional:->
           <ns:Password>string</ns:Password>
           <!-Optional:->
           <ns:Active>bool</ns:Active>
           <!-Optional:->
           <ns:AccessProfile>int</ns:AccessProfile>
           <!-Optional:->
           <ns:LockedOut>bool</ns:LockedOut>
           <!-Optional:->
           <ns:NationalTins>
             <!-Zero or more repetitions:->
             <ns:NationalTin>
               <ns:Country>string</ns:Country>
               <ns:Tin>string</ns:Tin>
             </ns:NationalTin>
           </ns:NationalTins>
           <!-Optional:->
           <ns:Nationality>string</ns:Nationality>
 	<!-Optional:->
 	<ns:PasswordIsEncrypted>boolean</ns:PasswordIsEncrypted>
 	<!-Optional:->
 	<ns:PasswordOnly>boolean</ns:PasswordOnly>
         </ns:User>
       </ns:Users>
     </ns:CreateCounterpartRequest>
  </soapenv:Body></soapenv:Envelope>


Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
     <ActivityId CorrelationId="17ed0490-1290-40f1-a8a7-73c13719171b" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">98659929-eef5-4bcf-bba7-3dfc40a282ea</ActivityId>
   </s:Header>
   <s:Body>
     <CreateCounterpartResponse xmlns="http://www.saxobank.com/service/cms/2013/08">
       <AccountNumbers xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <a:string>string</a:string>
       </AccountNumbers>
       <CounterpartId>int</CounterpartId>
       <UserIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <a:int>int</a:int>
       </UserIds>
     </CreateCounterpartResponse>
   </s:Body>
 </s:Envelope>

Code Examples

Code example 12: CreateCounterpart request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.saxobank.com/service/cms/2013/08" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header>
     <ns:SessionId>J8XLVeW4DLT3TLowpYFGTh81V81/3Ufgs8clS4i/eIo=</ns:SessionId>
   </soapenv:Header>
   <soapenv:Body>
     <ns:CreateCounterpartRequest>
       <ns:Accounts>
         <ns:AccountCreateInfo>
           <ns:Account>
             <ns:AccountNumber>33930/Test125</ns:AccountNumber>
             <ns:Description>Test</ns:Description>
             <ns:Currency>USD</ns:Currency>
             <ns:InternalAccountNumber>test</ns:InternalAccountNumber>
             <ns:CommissionGroupId>19184</ns:CommissionGroupId>
             <ns:Iban>223456</ns:Iban>
             <ns:AccountRiskProfileId>0</ns:AccountRiskProfileId>
             <ns:Active>true</ns:Active>
             <ns:TradableInstrumentIds>
               <arr:int>16384</arr:int>
             </ns:TradableInstrumentIds>
           </ns:Account>
           <ns:TemplateId>41080</ns:TemplateId>
         </ns:AccountCreateInfo>
       </ns:Accounts>
       <ns:Counterpart>
         <ns:OwnerId>3006888</ns:OwnerId>
         <ns:Language>EN</ns:Language>
         <ns:CountryOfResidence>DK</ns:CountryOfResidence>
         <ns:TaxCountry>DK</ns:TaxCountry>
         <ns:Email>mail@tst.dom</ns:Email>
         <ns:Active>true</ns:Active>
       </ns:Counterpart>
       <ns:TemplateId>41079</ns:TemplateId>
       <ns:Users>
         <!-Zero or more repetitions:->
         <ns:User>
           <ns:Tin>12345678</ns:Tin>
           <ns:Password>password123</ns:Password>
           <ns:NationalTins>
             <ns:NationalTin>
              <ns:Country>DK</ns:Country>
               <ns:Tin>12345678</ns:Tin>
             </ns:NationalTin>
           </ns:NationalTins>
           <ns:Nationality>DK</ns:Nationality>
         </ns:User>
       </ns:Users>
     </ns:CreateCounterpartRequest>
   </soapenv:Body>
 </soapenv:Envelope>


 Code example 13: CreateCounterpart response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
     <ActivityId CorrelationId="b113499f-8d82-4b71-944e-a324c019cee4" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">a66eb02e-dc3a-4d55-9fab-fdc81b978755</ActivityId>
   </s:Header>
   <s:Body>
     <CreateCounterpartResponse xmlns="http://www.saxobank.com/service/cms/2013/08">
       <AccountNumbers xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <a:string>33930/Test125</a:string>
       </AccountNumbers>
       <CounterpartId>6602953</CounterpartId>
       <UserIds xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
         <a:int>6602953</a:int>
       </UserIds>
     </CreateCounterpartResponse>
   </s:Body>
 </s:Envelope>