API3
pete_onepagecrm at May 10th, 2014 07:52 — #1
Ryan was in touch to point out that the PHP API signing in sample in the API3 documentation hadn't been updated to work with API3.
It was still calling some old endpoints and was expecting the wrong response values.
I've created a new PHP sample repository and posted it here
Hope this helps Ryan.
pete_onepagecrm at May 10th, 2014 08:07 — #2
I've also updated the documentation on developer.onepagecrm.com to use the updated code.
steger at May 13th, 2014 14:21 — #3
Can you update the sample to show how emails and phone numbers are passed in via the API (v3)? I've tried the below and a bunch of variations to try to get it working and its just not... here's my contact data, the rest is identical to your sample and everything else is importing properly
$contact_data = array(
'first_name' => 'test',
'last_name' => 'test',
'type' => 'individual',
'starred' => true,
'phones' => array(array('type'=> 'work','value'=>'5555555555')),
'emails' => array(array('type'=> 'work','value'=>'email@test.com')),
'background' => htmlentities($description),
'urls' => array(array('type' => 'other', 'value'=> 'http://google.com')),
'tags' => 'Selling Immediately'
);
pete_onepagecrm at May 14th, 2014 06:53 — #4
Hi @steger. For multi dimensional data like this in PHP we will need to put the JSON representation of data directly in the request body and add a "Content-Type: application/json" request header.
@PawelSmolinski (our resident PHP guru) is going to update the PHP sample to show how to do this.
pawelsmolinski at May 14th, 2014 07:24 — #5
@steger our PHP sample code has been updated and it should work for you now.
fdiep at May 14th, 2014 09:47 — #6
Thanks for the help. The updates after @steger comments work perfect.
Powered by Discourse, best viewed with JavaScript enabled