API3
ynot at June 25th, 2015 15:28 — #1
I'm creating a new contact every time i get a new sale in my shopify store. Thats working fine except the status is staying lead instead of customer. Is there anything special to change or m i doing anything wrong. I'm coding with php using the example provided in github and here's the array i'm creating for it
$contact_data = array(
'first_name' => $json_obj->customer->first_name,
'last_name' => $json_obj->customer->last_name,
'company_name' => $json_obj->shipping_address->company,
'tags' => 'Website Sale',
'status' => 'customer',
'address_list' => array(array(
'address'=> $json_obj->shipping_address->address1,
'city'=> $json_obj->shipping_address->city,
'state'=> $json_obj->shipping_address->province_code,
'zip_code'=> $json_obj->shipping_address->zip,
'country_code'=> $json_obj->shipping_address->country_code
)),'phones' => array(
array('type' => 'work', 'value' => $json_obj->shipping_address->phone)
),
'emails' => array(
array('type' => 'work', 'value' => $json_obj->email)
)
);
pete_onepagecrm at June 26th, 2015 04:42 — #2
Hi @ynotYou'll need to make a bit of a change.
The parameter you're looking for is status_id rather than status. As you can change the status name in the web application, we identify the status by it's id.
You can get the correct status id for your status by making a GET
request to statuses.json
Then just slightly modify your new contact array.
ynot at June 26th, 2015 09:18 — #3
Thats great. change is made. Nice and simple
Powered by Discourse, best viewed with JavaScript enabled