... | ... | @@ -58,7 +58,6 @@ HTTP Basic Authentication (username and accesskey) should be used and HTTP Metho |
|
|
|
|
|
To select (firstname, lastname) record fields of Module for matching email (=[[email protected]](mailto:[email protected])) the API definition would be:
|
|
|
|
|
|
|
|
|
```
|
|
|
<?xml version="1.0" ?>
|
|
|
<api method="get">
|
... | ... | @@ -75,7 +74,6 @@ To select (firstname, lastname) record fields of Module for matching email (=[te |
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Select Records With Value Binding {#select-records-with-value-binding}
|
|
|
|
|
|
To select (firstname, lastname) of Contacts record where email field value matching incoming request parameter email_address
|
... | ... | @@ -185,28 +183,44 @@ To replace email field value with incoming parameter (new_email) on all Contacts |
|
|
|
|
|
```
|
|
|
<api method="post" module="Contacts">
|
|
|
<upsert>
|
|
|
<where>
|
|
|
<field name="id" condition="eq" value="@CRMID"></field>
|
|
|
</where>
|
|
|
<upsert>
|
|
|
<where>
|
|
|
<field name="id" condition="eq" value="@CRMID"></field>
|
|
|
</where>
|
|
|
<sort>
|
|
|
<field name="id" order="desc"></field>
|
|
|
</sort>
|
|
|
<limit max="1"></limit>
|
|
|
<update>
|
|
|
<record>
|
|
|
<field name="email" value="@email" presence="optional" ></field>
|
|
|
|
|
|
<field name="email" value="@email" presence="optional"></field>
|
|
|
<field name="cardnumber" value="@card" presence="optional"></field>
|
|
|
</record>
|
|
|
</update>
|
|
|
<create>
|
|
|
<record>
|
|
|
<field name="firstname" value="@firstname" presence="optional" ></field>
|
|
|
<field name="lastname" value="@lastname" presence="optional" ></field>
|
|
|
<field name="email" value="@email" presence="optional" ></field>
|
|
|
<field name="firstname" value="@firstname" presence="optional"></field>
|
|
|
<field name="lastname" value="@lastname" presence="optional"></field>
|
|
|
<field name="email" value="@email" presence="optional"></field>
|
|
|
<field name="account_id" module="Accounts" presence="optional">
|
|
|
<select>
|
|
|
<where>
|
|
|
<field name="website" value="@website"></field>
|
|
|
</where>
|
|
|
<sort>
|
|
|
<field name="domain" order="descending"></field>
|
|
|
</sort>
|
|
|
</select>
|
|
|
</field>
|
|
|
</record>
|
|
|
</create>
|
|
|
<return>
|
|
|
<field name="id"></field>
|
|
|
<field name="lastname"></field>
|
|
|
<field name="account_id"></field>
|
|
|
</return>
|
|
|
</upsert>
|
|
|
</api">
|
|
|
</api>
|
|
|
```
|
|
|
|
|
|
|
... | ... | |