This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Contacts in Billomat


Overview

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

OperationDescription

createContact

Creates a contact for a specific client.

getContact

Retrieves specific contact details by its ID.

listContactsRetrieves all contacts.
updateContactUpdates the details of the contact.

Operation details

This section provides further details on the operations related to contacts.

Creating a contact

The createContact operation creates a contact for a specific client.

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>
Properties
  • 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
  • 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 of the contact.
  • webAddress: Website of the contact.
   Sample request

Following is a sample REST/JSON request that can be handled by the createContact operation.

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"
}
Related Billomat documentation

http://www.billomat.com/en/api/clients/contacts

Retrieving specific contact details by its ID

The getContact operation retrieves specific contact details by its ID.

getContact
<billomat.getContact>
    <contactId>{$ctx:contactId}</contactId>
</billomat.getContact>
Properties
  • contactId: The ID of the contact whose details need to be retrieved.
   Sample request

Following is a sample REST/JSON request that can be handled by the getContact operation.

Sample Request for getContact
{
    "contactId": "243546",
    "apiUrl": "https://mycompany.billomat.net",
    "apiKey": "735478efc440e219669e243c0fd71840",
    "format":"xml"
}
Related Billomat documentation

http://www.billomat.com/en/api/clients/contacts

Retrieving all contacts

The listContacts operation retrieves all contacts.

listContacts
<billomat.listContacts>
    <clientId>{$ctx:clientId}</clientId>
    <page>{$ctx:page}</page>
    <perPage>{$ctx:perPage}</perPage>
	<orderBy>{$ctx:orderBy}</orderBy>
</billomat.listContacts>
Properties
  • 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 request

Following is a sample REST/JSON request that can be handled by the listContacts operation.

Sample Request for listContacts
{
    "clientId": "2454545",
    "page": "1",
    "perPage": "1",
    "apiUrl": "https://mycompany.billomat.net",
    "apiKey": "735478efc440e219669e243c0fd71840",
    "format":"xml",
    "orderBy":"id+DESC"
}
Related Billomat documentation

http://www.billomat.com/en/api/clients/contacts

Updating the details of the contact

The updateContact operation updates the details of the contact.

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>
Properties
  • 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 request

Following is a sample REST/JSON request that can be handled by the updateContact operation.

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"
}
Related Billomat documentation

http://www.billomat.com/en/api/clients/contacts

Sample configuration

Following 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.

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>