API createIndividualAccount Error 10023

Home Forums General Issues API createIndividualAccount Error 10023

This topic contains 2 replies, has 1 voice, and was last updated by  AAC 3 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #930

    AAC
    Participant

    I am trying to create an Individual account with createIndividualAccount()

    When I add ‘individualAccount.primaryContact.addresses.address’ fields I get a 10023 error, I am not sure why this is happening, why would this happen ?

    ie:
    individualAccount.primaryContact.addresses.address.addressLine1
    individualAccount.primaryContact.addresses.address.city
    individualAccount.primaryContact.addresses.address.state.name

    array (size=3)
    ‘operationResult’ => string ‘FAIL’ (length=4)
    ‘responseDateTime’ => string ‘2016-05-11T15:40:41.952+0000’ (length=28)
    ‘errors’ =>
    array (size=1)
    ‘error’ =>
    array (size=1)
    0 =>
    array (size=2)
    ‘errorCode’ => string ‘10023’ (length=5)
    ‘errorMessage’ => string ‘One and only one of the addresses can be primary address.’ (length=57)

    #931

    AAC
    Participant

    Just to add a bit more context here is the args sent to the parameters

    $neon_args[‘individualAccount.primaryContact.firstName’] = ‘AACFirst’;
    $neon_args[‘individualAccount.primaryContact.lastName’] = ‘AACLast’;
    $neon_args[‘individualAccount.primaryContact.email1’] = ‘AACemail@aacemail.com’;
    $neon_args[‘individualAccount.primaryContact.phone1’] = ‘1234543210’;
    $neon_args[‘individualAccount.primaryContact.prefix’] = “Mr.”;
    $neon_args[‘individualAccount.primaryContact.title’] = “Programmer”;
    $neon_args[‘individualAccount.primaryContact.addresses.address.isPrimaryAddress’] = true;
    $neon_args[‘individualAccount.primaryContact.addresses.address.addressLine1’] = ‘100 Steet’;
    $neon_args[‘individualAccount.primaryContact.addresses.address.addressLine2’] = ”;
    $neon_args[‘individualAccount.primaryContact.addresses.address.city’] = ‘Medford’;
    $neon_args[‘individualAccount.primaryContact.addresses.address.state.name’] = ‘New Jersey’;

    function createIndividualAccount($neon_args){
    $neon = new Neon();

    $credentials = array( ‘orgId’ => NEON_ORGID, ‘apiKey’ => NEON_APIKEY );

    $loginResult = $neon->login($credentials);
    $result = ”;
    if ( isset( $loginResult[‘operationResult’] ) && $loginResult[‘operationResult’] == ‘SUCCESS’ ) {

    $request = array(
    ‘method’ => ‘account/createIndividualAccount’,
    ‘parameters’ => $neon_args,
    );
    $result = $neon->go( $request );
    $neon->go( array( ‘method’ => ‘common/logout’ ) );
    }
    return $result;
    }

    #932

    AAC
    Participant

    ok got it, the boolean value needed to be a string,

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.