...
The following operations allow you to work with contacts. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with contacts, see Sample configuration.
This section provides further details on the operations related to contacts.
Anchor |
---|
| createContact |
---|
| createContact |
---|
|
Creating a contactThe createContact
operation creates a contact for a specific client.
Code Block |
---|
language | xml |
---|
title | createContact |
---|
|
<billomat.createContact>
<clientId>{$ctx:clientId}</clientId>
<label>{$ctx:label}</label>
<name>{$ctx:name}</name>
<street>{$ctx:street}</street>
<zip>{$ctx:zip}</zip>
<city>{$ctx:city}</city>
<state>{$ctx:state}</state>
<countryCode>{$ctx:countryCode}</countryCode>
<firstName>{$ctx:firstName}</firstName>
<lastName>{$ctx:lastName}</lastName>
<salutation>{$ctx:salutation}</salutation>
<phone>{$ctx:phone}</phone>
<fax>{$ctx:fax}</fax>
<mobile>{$ctx:mobile}</mobile>
<email>{$ctx:email}</email>
<webAddress>{$ctx:webAddress}</webAddress>
</billomat.createContact> |
clientId:
The ID of the client.label:
Label for the contact.name:
Company name of the contact.street:
Street of the contact.zip:
Zip code of the contact.city:
City of the contact.state:
State of the contact.countryCode:
Country of the contact.firstName:
First name of the contact.lastName:
Last name of the contact.salutation:
Salutation of the contactlastName:
Last name of the contact.salutation:
Salutation of the contact.phone:
Phone of the contact.fax:
Fax of the contact.mobile:
Mobile number of the contact.email:
E-mail of the contact.webAddress:
Website of the contact.
Sample requestFollowing is a sample REST/JSON request that can be handled by the createContact
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for createContact |
---|
|
{
"clientId": "567687",
"label": "l1",
"name": "elena gilbert",
"street": "melb",
"zip": "24",
"city": "Leichster",
"state": "Ontario",
"countryCode": "CAN",
"firstName": "elena",
"lastName": "gilbert",
"salutation": "Mrs",
"phone": "35769809002",
"fax": "1436578",
"mobile": "1246778434",
"email": "elena@gmail.com",
"webAddress": "elena.com",
"apiUrl": "https://mycompany.billomat.net",
"apiKey": "735478efc440e219669e243c0fd71840",
"format":"xml"
}
|
http://www.billomat.com/en/api/clients/contacts
Retrieving specific contact details by its IDThe getContact
operation retrieves specific contact details by its ID.
Code Block |
---|
language | xml |
---|
title | getContact |
---|
|
<billomat.getContact>
<contactId>{$ctx:contactId}</contactId>
</billomat.getContact> |
contactId:
The ID of the contact whose details need to be retrieved.
Sample requestFollowing is a sample REST/JSON request that can be handled by the getContact
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for getContact |
---|
|
{
"contactId": "243546",
"apiUrl": "https://mycompany.billomat.net",
"apiKey": "735478efc440e219669e243c0fd71840",
"format":"xml"
} |
http://www.billomat.com/en/api/clients/contacts
Retrieving all contactsThe listContacts
operation retrieves all contacts.
Code Block |
---|
language | xml |
---|
title | listContacts |
---|
|
<billomat.listContacts>
<clientId>{$ctx:clientId}</clientId>
<page>{$ctx:page}</page>
<perPage>{$ctx:perPage}</perPage>
<orderBy>{$ctx:orderBy}</orderBy>
</billomat.listContacts> |
clientId:
The ID of the client.page:
Number of the page to return. Applies for paginated response.perPage:
Number of entries to return per page when results are paginated.orderBy:
Sorting orders to retrieve contacts.
Sample requestFollowing is a sample REST/JSON request that can be handled by the listContacts
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for listContacts |
---|
|
{
"clientId": "2454545",
"page": "1",
"perPage": "1",
"apiUrl": "https://mycompany.billomat.net",
"apiKey": "735478efc440e219669e243c0fd71840",
"format":"xml",
"orderBy":"id+DESC"
}
|
http://www.billomat.com/en/api/clients/contacts
Anchor |
---|
| updateContact |
---|
| updateContact |
---|
|
Updating the details of the contactThe updateContact
operation updates the details of the contact.
Code Block |
---|
language | xml |
---|
title | updateContact |
---|
|
<billomat.updateContact>
<clientId>{$ctx:clientId}</clientId>
<label>{$ctx:label}</label>
<name>{$ctx:name}</name>
<street>{$ctx:street}</street>
<zip>{$ctx:zip}</zip>
<city>{$ctx:city}</city>
<state>{$ctx:state}</state>
<countryCode>{$ctx:countryCode}</countryCode>
<firstName>{$ctx:firstName}</firstName>
<lastName>{$ctx:lastName}</lastName>
<salutation>{$ctx:salutation}</salutation>
<phone>{$ctx:phone}</phone>
<fax>{$ctx:fax}</fax>
<mobile>{$ctx:mobile}</mobile>
<email>{$ctx:email}</email>
<webAddress>{$ctx:webAddress}</webAddress>
<contactId>{$ctx:contactId}</contactId>
</billomat.updateContact> |
clientId:
The ID of the client.label:
Label for the contact.name:
Company name of the contact.street:
Street of the contact.zip:
Zip code of the contact.city:
City of the contact.state:
State of the contact.countryCode:
Country of the contact.firstName:
First name of the contact.lastName:
Last name of the contact.salutation:
Salutation of the contact.phone:
Phone of the contact.fax:
Fax of the contact.mobile:
Mobile number of the contact.email:
E-mail address of the contact.webAddress:
Website of the contact.contactId:
The ID of the contact to update.
Sample requestFollowing is a sample REST/JSON request that can be handled by the updateContact
operation.
Code Block |
---|
language | xml |
---|
title | Sample Request for updateContact |
---|
|
{
"clientId": "567687",
"label": "l1",
"name": "elena gilbert",
"street": "melb",
"zip": "24",
"city": "Leichster",
"state": "Ontario",
"countryCode": "CAN",
"firstName": "elena",
"lastName": "gilbert",
"salutation": "Mrs",
"phone": "35769809002",
"fax": "1436578",
"mobile": "1246778434",
"email": "elena@gmail.com",
"webAddress": "elena.com",
"contactId": "3455678",
"apiUrl": "https://mycompany.billomat.net",
"apiKey": "735478efc440e219669e243c0fd71840",
"format":"xml"
}
|
http://www.billomat.com/en/api/clients/contacts
Anchor |
---|
| sampleconfiguration |
---|
| sampleconfiguration |
---|
|
Sample configurationFollowing is a sample proxy service that illustrates how to connect to Billomat with the init
operation and use the createContact
operation. The sample request for this proxy can be found in the createContact sample request.
Code Block |
---|
language | xml |
---|
title | Sample Proxy |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="billomat_createContact" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence onError="faultHandlerSeq">
<property name="apiUrl" expression="json-eval($.apiUrl)"/>
<property name="apiKey" expression="json-eval($.apiKey)"/>
<property name="clientId" expression="json-eval($.clientId)"/>
<property name="label" expression="json-eval($.label)"/>
<property name="name" expression="json-eval($.name)"/>
<property name="street" expression="json-eval($.street)"/>
<property name="zip" expression="json-eval($.zip)"/>
<property name="city" expression="json-eval($.city)"/>
<property name="state" expression="json-eval($.state)"/>
<property name="countryCode" expression="json-eval($.countryCode)"/>
<property name="firstName" expression="json-eval($.firstName)"/>
<property name="lastName" expression="json-eval($.lastName)"/>
<property name="salutation" expression="json-eval($.salutation)"/>
<property name="phone" expression="json-eval($.phone)"/>
<property name="fax" expression="json-eval($.fax)"/>
<property name="mobile" expression="json-eval($.mobile)"/>
<property name="email" expression="json-eval($.email)"/>
<property name="webAddress" expression="json-eval($.webAddress)"/>
<property name="format" expression="json-eval($.format)"/>
<billomat.init>
<apiUrl>{$ctx:apiUrl}</apiUrl>
<apiKey>{$ctx:apiKey}</apiKey>
<format>{$ctx:format}</format>
</billomat.init>
<billomat.createContact>
<clientId>{$ctx:clientId}</clientId>
<label>{$ctx:label}</label>
<name>{$ctx:name}</name>
<street>{$ctx:street}</street>
<zip>{$ctx:zip}</zip>
<city>{$ctx:city}</city>
<state>{$ctx:state}</state>
<countryCode>{$ctx:countryCode}</countryCode>
<firstName>{$ctx:firstName}</firstName>
<lastName>{$ctx:lastName}</lastName>
<salutation>{$ctx:salutation}</salutation>
<phone>{$ctx:phone}</phone>
<fax>{$ctx:fax}</fax>
<mobile>{$ctx:mobile}</mobile>
<email>{$ctx:email}</email>
<webAddress>{$ctx:webAddress}</webAddress>
</billomat.createContact>
<respond/>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<description/>
</proxy> |