I can create a person account using the REST API, but I can't seem to find any documentation on how to create a business account. I imaging that the post items you send need to include something extra that identifies this new account as a business account, but WHAT is it?
I am using PHP cURL to accomplish this.
$content = json_encode( array(
"LASTNAME" => $dealer->last_name,
"FIRSTNAME" => $dealer->first_name,
"PERSONMAILINGSTREET" => $dealer->address . ' ' . $dealer->address2,
"PERSONMAILINGCITY" => $dealer->city,
"PERSONMAILINGSTATE" => $dealer->state,
"PERSONMAILINGPOSTALCODE" => $dealer->zip,
"PERSONMAILINGCOUNTRY" => 'US',
"PERSONEMAIL" => $dealer->email,
"SPEQ_Dealer__c" => 'Yes',
) );
$curl = curl_init( $url );
curl_setopt( $curl, CURLOPT_HEADER, false );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_HTTPHEADER,
array("Authorization: OAuth $access_token",
"Content-type: application/json" ) );
curl_setopt( $curl, CURLOPT_POST, true );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $content );
This code works, but what am I missing? I can't find a list of database table fields to work with either, so any help on that front would be great too!