Adding customers in JSON-RPC API
To add customers, use the AddPartner method. Customers are added one at a time.
Required parameters
| Parameter | Description | Supported values |
|---|---|---|
partnerInfo
|
A group of parameters related to the partner | PartnerInfo, (has child parameters of its own see the PartnerInfo child parameters table below) |
createDefaultAccount
|
The type of account to be created |
|
| Parameter | Description | Supported values |
|---|---|---|
ID
|
The ID of the Customer | <int> Integer |
ParentId
|
The ID of the parent customer | <int> Integer |
Name
|
The name to assign to the customer | OptionalNonEmptyString String |
Level
|
The level of the customer in the hierarchy tree (must be lower than the level of the parent customer) |
|
ChildServiceTypes
|
The type of service the customer company can provide to its own customers |
|
ServiceType
|
The type of service provided to the customer |
|
State
|
The current state of the customer |
|
DeviceCountry
|
The country the device is in | <std::string>
|
LocationId
|
The location that the customer is assigned to (it is used to set a default storage pool for the customer's devices). Normally, the location is identified automatically by the country in which a customer is located (the |
You can get the list of available locations using the |
Flags
|
Properties the customer has configured |
|
Company
|
A group of parameters related to the company |
|
TrialRegistrationTime
|
The time stamp that the trial was registered for the Customer | <std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018 |
TrialExpirationTime
|
The time stamp of when the trial will expire for the Customer | <std::time_t> Integer in Unix format. For example, 1535673599 stands for August 30, 2018 |
AdvancedPartnerProperties
|
Advanced information relating to the Partner | AdvancedPartnerPropertiesInfo (has child parameters of its own see the AdvancedPartnerPropertiesInfo child parameters table below) |
PartnerCompanyInfo Child Parameters
| Parameter | Description | Supported values |
|---|---|---|
PostAddress
|
The postal address for the Customer's company |
|
PhoneNumber
|
The phone number for the Customer's company |
<std::String> String |
FaxNumber
|
The fax number for the Customer's company |
<std::String> String |
WebsiteAddress
|
The website address in full for the Customer's company |
<std::String> String |
LegalCompanyName
|
The legal name of the Customer's company |
<std::String> String |
ChamberOfCommerceNumber
|
The chamber of commerce number for the Customer's company |
<std::String> String |
VatNumber
|
The VAT number for the Customer's company |
<std::String> String |
BankAccountNumber
|
The bank account number for the Customer's company |
<std::String> String |
BillingContactPersonId
|
The ID for the person to contatc with regards to billing for the Customer's company |
<std::String> String |
PostAddressInfo Child parameters
| Parameter | Description | Supported values |
|---|---|---|
Country
|
The country in which the customer is located. Based on the country, each customer is assigned to a location (see the |
Country code in ISO Alpha-2 format (recommended) or official country/area name in English. If the parameter is not submitted, the location of the parent customer is used. |
State
|
The state in which the customer is located |
<std::String> String |
District
|
The district in which the customer is located |
<std::String> String |
City
|
The city in which the customer is located |
<std::String> String |
ZipCode
|
The ZipCode in which the customer is located |
<std::String> String |
Address
|
The street address at which the customer is located |
<std::String> String |
AdvancedPartnerPropertiesInfo Child Parameters
| Parameter | Description | Supported Values |
|---|---|---|
RegionId
|
The ID number for the region the customer is in | <int> Integer |
ResponsibleUserId
|
The ID for the responsible user | <int> Integer |
Sample request
{
"id": "jsonrpc",
"visa": "{{visa}}",
"method": "AddPartner",
"jsonrpc": "2.0",
"params": {
"partnerInfo": {
"ParentId": 12345,
"Name": "Zeus & Sons",
"Level": "EndCustomer",
"ServiceType": "AllInclusive",
"ChildServiceTypes": [
"AllInclusive"
],
"Country": "Greece"
}
}
}
Sample response
{
"id": "jsonrpc",
"jsonrpc": "2.0",
"result": {
"result": 55806
},
"visa": "{{visa}}"
}
