简体   繁体   English

如何在PHP中使用Rest API将用户个人资料地址发送给followupboss

[英]How to send user profile address to followupboss using rest api in php

I'm trying to send leads and inquiry to followupboss crm, this is the php code i used for connecting to the followupboos rest API https://github.com/FollowUpBoss/fub-api-examples 我正在尝试将线索和查询发送给followupboss crm,这是我用来连接到followupboos rest API https://github.com/FollowUpBoss/fub-api-examples的php代码

everything is working correctly, Now I have to add user addresses json field to the code. 一切正常,现在我必须在代码中添加用户地址json字段。 but it is not working, 但它不起作用,

this is my code: 这是我的代码:

"person" => array( 
    "firstName" => "john" ,
    "lastName" => "doe" ,
    "emails" => array(array("value" => "johndoe@gmail.com")),
    "phones" => array(array("value" => "09367099962")),
    "addresses[0].street" => "322 S Broadway"
) 

on send it is null ["addresses"]=> array(0) 发送时为null [“ addresses”] => array(0)

anybody can help on this? 有人可以帮忙吗?

You need to change the addresses into an array of address objects, so it would look like this: 您需要将addresses更改为地址对象数组,因此看起来像这样:

"person" => array( 
   "firstName" => "john" ,
   "lastName" => "doe" ,
   "emails" => array(array("value" => "johndoe@gmail.com")),
   "phones" => array(array("value" => "09367099962")),
   "addresses" => array(
        // Address 1
        array(
             "street" => "322 S Broadway"
        )
        // If there are more than 1 address, add here
        ,array(
             "street" => "323 S Broadway" 
        )
    )    
) 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM