Changing customer properties

To change the properties of an existing customer, use the ModifyPartner method. You can change the following properties:

  • Re-assign the customer to another customer
  • Change the service types provided to the customer
  • Set flags to the customer
  • Change the address of the customer
  • Change a trial customer to in production
🚧

Customer ID's cannot be changed.

Required Parameters

ParameterDescriptionSupported values
partnerIdA group of parameters related to the partnerPartnerInfo (has child parameters of its own see the PartnerInfo child parameters table below)

PartnerInfo child parameters

ParameterDescriptionSupported values
IDThe ID of the Customer<int> Integer
ParentIdThe ID of the parent customer<int> Integer
NameThe name to assign to the customerOptionalNonEmptyString String
LevelThe level of the customer in the hierarchy tree (must be lower than the level of the parent customer)<PartnerPrivilege::Enum>
  • Undefined
  • Distributor
  • SubDistributor
  • Reseller
  • EndCustomer
ChildServiceTypesThe type of service the customer company can provide to its own customers<PartnerServiceType::FlagsType>
  • Undefined
  • AllInclusive
  • SoftwareOnly
ServiceTypeThe type of service provided to the customer<PartnerServiceType::Enum>
  • Undefined
  • AllInclusive
  • SoftwareOnly
StateThe current state of the customer<PartnerState::Enum>
  • Undefined
  • InProduction
  • InTrial
DeviceCountryThe 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 Country parameter), but you can specify it yourself as well.

<int> Integer

You can get the list of available locations using the EnumerateLocations method

FlagsProperties the customer has configured<PartnerFlag::FlagsType>
  • Undefined
  • HasCustomBranding
  • HasCustomUpdatePackages
  • UnsubscribedFromTrialNotifications
  • CanInvoiceOthers
  • Count
CompanyA group of parameters related to the companyPartnerCompanyInfo (has child parameters of its own see the PartnerCompanyInfo child parameters table below)
TrialRegistrationTimeThe 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
TrialExpirationTimeThe 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
AdvancedPartnerPropertiesAdvanced information relating to the PartnerAdvancedPartnerPropertiesInfo (has child parameters of its own see the AdvancedPartnerPropertiesInfo child parameters table below)

PartnerCompanyInfo Child Parameters

ParameterDescriptionSupported values
PostAddressThe postal address for the Customer's companyPostAddressInfo (has child parameters of its own see the PostAddress child parameters table below)
PhoneNumberThe phone number for the Customer's company<std::String> String
FaxNumberThe fax number for the Customer's company<std::String> String
WebsiteAddressThe website address in full for the Customer's company<std::String> String
LegalCompanyNameThe legal name of the Customer's company<std::String> String
ChamberOfCommerceNumberThe chamber of commerce number for the Customer's company<std::String> String
VatNumberThe VAT number for the Customer's company<std::String> String
BankAccountNumberThe bank account number for the Customer's company<std::String> String
BillingContactPersonIdThe ID for the person to contact with regards to billing for the Customer's company<std::String> String

PostAddressInfo Child parameters

ParameterDescriptionSupported values
Country

The country in which the customer is located.

Based on the country, each customer is assigned to a location (see the LocationId parameter). Several neighboring countries may belong to the same location. The location is used to set a default storage pool for devices belonging to the customer.

<std::String> String

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.

StateThe state in which the customer is located<std::String> String
DistrictThe district in which the customer is located<std::String> String
CityThe city in which the customer is located<std::String> String
ZipCodeThe ZipCode in which the customer is located<std::String> String
AddressThe street address at which the customer is located<std::String> String

AdvancedPartnerPropertiesInfo Child Parameters

ParameterDescriptionSupported values
RegionIdThe ID number for the region the customer is in<int> Integer
ResponsibleUserIdThe ID for the responsible user<int> Integer

Optional parameters

ParameterDescriptionSupported values
forceRemoveCustomColumnValuesInOldScopeDo you wish to force remove custom column values for the devicebool Boolean
  • True
  • False

Sample request

It is possible to change as much about a customer or as little as you like. Provide the partnerID to select the customer whose information you need to change, then all other parameters entered will be changed to the information sent in the method.

The below example shows the change of name from "Zeus & Sons" to "Zeus And Sons" and limiting the available service types this Customer can provide to it's customers to AllInclusive only.

{
    "id": "jsonrpc",
    "visa": "{{visa}}",
    "method": "ModifyPartner",
    "jsonrpc": "2.0",
    "params": {
	"partnerInfo": {
		"Id": 12345,
		"Name": "Zeus And Sons",
		"ChildServiceTypes": ["AllInclusive"]
	}
}

Sample response

{
    "id": "jsonrpc",
    "jsonrpc": "2.0",
    "result": null,
    "visa": "{{visa}}"
}

Did this page help you?