Skip to main content

PUT to people API via PHP

When i do something link this in PHP:

$params = array(
    'person' => array(
      'email' => '[email protected]','home_address' => array('country' => 'Germany', 'zip' => '66666' ))
);

$header = array('Authorization:' => $token,'Content-Type:' => 'application/json', 'Accept:' => 'application/json');
$response = $client->fetch($baseApiUrl . '/api/v1/people/push?access_token=myaccesstoken', $params, 'PUT',$header);
print_r($response);

i get the following response

Array
(
    [result] => Array
        (
            [code] => missing_parameters
            [message] => Missing Parameters.
            [parameters] => Array
                (
                    [0] => person
                )

            [inner_error] => Array
                (
                    [name] => Api::Error::MissingParameters
                    [message] => Missing parameters: person
                )

        )

    [code] => 400
    [content_type] => application/json
)

 

Whats wrong with the Parameters? Do i need to add something else to the Params?

 

 

 

Official response from submitted

Alexander, I sent you an email with a proposed solution; let me know if that works for you.

thanks, Arion Hardison

 

Showing 13 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.