"Create or Update a Group of Contacts" Failed


#1

Hi all,

I want to update group of contact like in this link

with input like this:
(
[0] => Array
(
[vid] => 7093551
[properties] => Array
(
[0] => Array
(
[property] => full_name
[value] => MyName
)

            )

    )

[1] => Array
    (
        [vid] => 8639451
        [properties] => Array
            (
                [0] => Array
                    (
                        [property] => full_name
                        [value] => Othername
                    )

            )

    )

)

If I call to this url end point :
http://api.hubapi.com/contacts/v1/contact/batch/?hapikey=” . self::HAPIKEY

It will return status code 200 & the data is not updated.

Please tell me why don’t it return 202 as successful call?
Thank you


#2

I have solved this. It’s because I didn’t add application/json setting.

	curl_setopt( $ch , CURLOPT_HTTPHEADER , array (
			'Content-Type: application/json' ,
			'Content-Length: ' . strlen( $data_string )
		)
	);

Now it’s working fine.