AddPersonRecord.php
AddPersonRecord.php
<?php
require_once "C:/Php/SoftLayer/SoftLayer/SoapClient.class.php";
$username = "set me";
$apiKey = "set me";
$organization = "Organization testRcv2";
$firstName = "First name test";
$lastName = "Last name test";
$streetAddress = "Street address test";
$city = "Cochabamba";
$country = "Bolivia";
$zipCode = "591";
$email = "noreply@softlayer.com";
$abuseEmail = "noreply@softlayer.com";
$phoneNumber = "987654321";
$client = SoftLayer_SoapClient::getClient("SoftLayer_Account_Regional_Registry_Detail", null, $username, $apiKey);
$properties = array( array("propertyTypeId" => 61, "value" => $organization, "sequencePosition" => 0), array("propertyTypeId" => 11, "value" => $email, "sequencePosition" => 0), array("propertyTypeId" => 2, "value" => $firstName, "sequencePosition" => 0), array("propertyTypeId" => 3, "value" => $lastName, "sequencePosition" => 0), array("propertyTypeId" => 4, "value" => $streetAddress, "sequencePosition" => 0), array("propertyTypeId" => 5, "value" => $city, "sequencePosition" => 0), array("propertyTypeId" => 6, "value" => "OT", "sequencePosition" => 0), array("propertyTypeId" => 7, "value" => $zipCode, "sequencePosition" => 0), array("propertyTypeId" => 8, "value" => $country, "sequencePosition" => 0), array("propertyTypeId" => 14, "value" => $abuseEmail, "sequencePosition" => 0), array("propertyTypeId" => 9, "value" => $phoneNumber, "sequencePosition" => 0), );
$templateObject = new stdClass();
$templateObject -> detailTypeId = 3;
$templateObject -> properties = $properties;
try {
$receipt = $client -> createObject($templateObject);
print_r($receipt);
} catch(Exception $e) {
echo "Unable to add person record: " . $e -> getMessage();
}