POST api/v1/ContactAdd
Add a new contact to a customer account and address
You must send a customer id or account number along with the contact details
Request Information
URI Parameters
None.
Body Parameters
ContactAddParams| Name | Description | Type | Additional information |
|---|---|---|---|
| apiKey |
Please contact Caliq support to get your key |
string |
Required |
| CustomerID |
Caliq internal unique customer identifier |
integer |
None. |
| AccountNo |
User entered unique customer account number |
string |
Required Max length: 10 |
| AddressID |
If not null or zero the contact will be added to this address id |
integer |
None. |
| Title |
Mr, Mrs etc Can be blank |
string |
Max length: 6 |
| Firstname | string |
Required Max length: 20 |
|
| Surname | string |
Required Max length: 30 |
|
| TelephoneNo | string |
Max length: 20 |
|
| MobileNo | string |
Max length: 20 |
|
| string |
Required Max length: 70 |
Request Formats
application/json, text/json
{
"apiKey": "sample string 1",
"CustomerID": 2,
"AccountNo": "sample string 3",
"AddressID": 4,
"Title": "sample string 5",
"Firstname": "sample string 6",
"Surname": "sample string 7",
"TelephoneNo": "sample string 8",
"MobileNo": "sample string 9",
"Email": "sample string 10"
}
application/xml, text/xml
<ContactAddParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <apiKey>sample string 1</apiKey> <CustomerID>2</CustomerID> <AccountNo>sample string 3</AccountNo> <AddressID>4</AddressID> <Title>sample string 5</Title> <Firstname>sample string 6</Firstname> <Surname>sample string 7</Surname> <TelephoneNo>sample string 8</TelephoneNo> <MobileNo>sample string 9</MobileNo> <Email>sample string 10</Email> </ContactAddParams>
Response Information
Resource Description
Returns:
200 OK Returns error list if failed
400 Bad Request - parameters supplied cannot be properly interpreted
401 Not Authorised if supplied api key is not valid
503 Service Unavailable
Messages returned for error: 1,29,30,31,38,39,42,43
| Name | Description | Type | Additional information |
|---|---|---|---|
| ContactAddData | ContactAddData |
None. |
Response Formats
application/json, text/json
{
"ContactAddData": {
"OK": true,
"ContactIDCreated": 2,
"ContactAddIssues": [
{
"ID": 1,
"Message": "sample string 2",
"ExtraData": "sample string 3"
},
{
"ID": 1,
"Message": "sample string 2",
"ExtraData": "sample string 3"
}
]
}
}
application/xml, text/xml
<ContactAddResults xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ContactAddData>
<OK>true</OK>
<ContactIDCreated>2</ContactIDCreated>
<ContactAddIssues>
<ContactAddIssue>
<ID>1</ID>
<Message>sample string 2</Message>
<ExtraData>sample string 3</ExtraData>
</ContactAddIssue>
<ContactAddIssue>
<ID>1</ID>
<Message>sample string 2</Message>
<ExtraData>sample string 3</ExtraData>
</ContactAddIssue>
</ContactAddIssues>
</ContactAddData>
</ContactAddResults>