Start a conversation

Account

1) account/add-to-tree

A method that adds an account to the specified tree. As a result, the position is formed.

Method - POST

https://.../online-office/account/add-to-tree

Request parameters

Parameter Type Mandatory field Note
accountID Integer Yes Account ID, which for you need to create a position in the tree

sponsorPositionId Integer Yes Sponsor position ID
treeId Integer Yes Tree ID


2) account/get-all-data

Method to get various account data.

Now you can get the following data:
- profile fields [prefix "p."]
- marketing properties [prefix "m."]
- wallet balances [prefix "w."]
- system properties [prefix "s."] (for account_id)

Method - POST

Request parameters

Field Type Mandatory field Note
ids
Integer|array
Yes id, for which you need to download information, one or a list
properties
Array
Yes, if none of the flags are specified
Properties to load for the specified id ["p.firstname", "w.Virtual_wallet", "m.PV"]
type
Integer
No The type of id sent. Could be 'accounts' or 'positions'. The default is 'accounts'.
dataProfile
Boolean
No Flag indicating that all profile fields must be loaded.
dataMarketing
Boolean No Flag indicating that all marketing properties must be loaded.
dataWallets
Boolean No Flag indicating that you need to load balances for all wallets

The flags dataProfile, dataMarketing, dataWallets can be used in conjunction with the list of properties.

 The answer is formed in a format allowing not to duplicate the attributes of the loaded properties of type title. The answer contains:

  • id type for which data were loaded
  • a property map that contains information about loaded fields but not their values
  • the loaded information for each transferred id, in a format convenient for the client

3) account/get-branch

https://.../main-app/account/get-branch

Parameter Type Mandatory field Default value Note
accountId int no   Id account to get ancestors
positionId int yes   Position to get upline
rootPositionId int no   Position to get ancestors
showRoot boolean no true Whether to show the root position in the result (only if rootPositionId or accountId is specified)
showSponsor boolean no false Whether to show the sponsor's position in the result (only if showRoot = true is specified and rootPositionId or accountId is specified)


4) account/get-downline

Request parameters

Field Type Mandatory field Note
accountId
Int
Yes This field is required if the parentId parameter is not passed.
treeId
Int
No The default is 0 - Genealogy. This parameter makes sense to pass along with accountId
offset
Int
No The default is 1. This parameter makes sense to pass along with accountId.
parentId
Int
Yes This field is required if the parentId parameter is not passed.
perPage
Int No Number of records returned - page size. Default 50, but not more than 100
pageNumber
Int No Page number. Numeration starts from 1. The default is 1

depth
Int No Depth of the tree opening. Only one level is returned by default.
showSponsor
Boolean No Whether to show the sponsor for the specified position, i.e. whether to return in the response data on parent parentId from which the search is conducted. Default is false

showRoot
Boolean No Whether to show the root, i.e. whether to return in the response data on parentId from which the search is conducted. Default is false

5) account/get-downline-size

The number of people in the structure on the specified tree at the beginning of the period. An array of period-number of people is returned.

Method - POST

Parameter Type Mandatory field Default value Note
accountId int Yes    
tree string No binar Tree alias
periodCount int No 6 Maximum 30
activePeriod
bool No false

6) account/get-invite-code

The method returns the referral link code for the specified accountId.

Parameter Type Mandatory field
accountId int yes

7) account/get-last-position

The method returns the last left / right position of the tree for the specified account and a list of values of its marketing properties.

Request parameters

Field Type Mandatory field Note
accountId
Int
Yes  
treeId
Int
Yes  


8) account/get-list

The method returns a list of accounts that meet the specified conditions.

URL - https://.../account/get-list

Request parameters

filter
Array
Yes An array of objects. Each object contains three fields: field, operation and value.
  • field - string. Acceptable values:
    • createdAt - account creation date
  • operation - string.  Type of comparison operation. Acceptable values:
  • value - string or array consisting of two elements in the case of using the comparison operation between
orderBy
String
No String format
field 1 sorting_type[, field2 sorting_type]
If there are several fields, they are separated by commas.
Acceptable fields for sorting:
  • id 
  • title
  • createdAt
Acceptable sorting types: ASC or DESC
An example to sort by two fields
createdAt DESC, title ASC
perPage
Integer No Number of records returned - page size. Default is 50, but not more than 100
pageNumber
Integer No Page number. Numbering starts from 1. The default is 1

Request examples

<!— After the specified date ->
https://drupal.mlm-soft.com/api2/basic/account/get-list?filter[0][field]=createdAt&filter[0][operation]=>&filter[0][value]=2019/1/1&orderBy=created_at DESC  
<!-- During the period ->
https://drupal.mlm-soft.com/api2/basic/account/get-list?filter[0][field]=createdAt&filter[0][operation]=between&filter[0][value][0]=2018/01/01&filter[0][value][1]=2018/12/31&orderBy=title ASC


9) account/get-payment-personal-data

The method returns personal data for payment.

Request parameters

Parameter Type Mandatory field Default value Note
accountId Integer Yes   Account ID
paymentSystemId Integer Yes   Payment system ID


10) account/get-plan-data

The method returns the values of marketing properties for the account.

Method - POST

Parameter Type Mandatory field Default value Note
accountId int yes    
positionId int no   if not specified, the position is taken from the genealogy
planAlias string yes    
properties array[string,string,...] yes    
periodCount int no 5 20 maximum
activePeriod boolean no false  


11) account/get-property-values

A method that returns marketing property values for account positions.
 The selection is made for the position in the Genealogy, as well as for positions in other trees with the condition offset == 1. The values of the properties in the result set are obtained by merging: the first value used is not NULL.

Request parameters

Parameter Type Mandatory field Default value
accountId Integer Yes  


12) account/get-wallet operations

The method returns a list of operations on the wallet.

Request parameters

Parameter Type Mandatory field Default value Note
accountId Integer Yes    
walletAlias string Yes    
pageNumber Integer No 1  
perPage Integer No 50 Valid values are from 1 to 100


13) account/get-wallets-balance

The method returns the balance of existing wallets.

Parameter Type Mandatory field Default value Note
accountId Integer No   If the value is not transferred, a list of wallets without balance will be returned.
date date No current date if the parameter is present, the balance for this date will be calculated, i.e. all transactions are sum up until this date inclusively.

14) account/property-edit

A method that sets the value of a marketing plan property.

Request parameters

Parameter Type Mandatory field Note
accountId Integer Yes Account ID. The field is required if the positionId parameter is NOT passed.
treeId Integer No Tree ID. Default is 0 (Genealogy)
offset Integer No The ordinal position in the tree. Default is 1
positionId Integer Yes Position ID. This field is required if accountId is not passed.
propertyId Integer Yes Property ID
value Double Yes New property value 
folderId Integer No If the folder ID is transferred, the document - the task for changing the volume is added to the existing one, otherwise it will be added to the newly created folder.

15) account/search

The method returns the user profile for the specified account and a list of the values of its marketing properties.
 Method - GET

Field Type Mandatory field Note
accountId
Int
Yes  


16) account/search-by-invite

Search account by referral link.

Method - GET

Parameter Type Mandatory field
inviteCode int yes


17) account/set-invite-code

The method sets invite_code for the specified account.

Method - POST

Parameter
Type
Mandatory field
accountId int yes
inviteCode string yes, from 6 to 100 symbols


18) account/set-payment-personal-data

The method saves personal data for payment.

Method - POST

Request parameters

Parameter

Type
Mandatory field
Default value Note
accountId Integer Yes   Account ID
paymentSystemId Integer Yes   Payment system ID
personalData Array Yes   Personal data


19) account/user-exist

20)account/volume-change

A method that changes the value of a marketing plan property per delta.

 The method can take parameters for changing both one marketing property and several.

Method - POST

Request parameters for changing a single marketing property

Parameter Type Mandatory field Default value Note
accountId Integer Yes    
positionOffset Integer No 0  
pointsAmount Double Yes    
orderId String No   Information field
volumePropertyAlias String No PV If the alias is not transmitted, the default value defined in the system settings is used.
folderId Integer No   If the folder ID is transferred, the document - the task for changing the volume is added to the existing one, otherwise it will be added to the newly created folder.












Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Daria Tsirelnikova

  2. Posted
  3. Updated

Comments