POST api/v1/ContactChange

Update the WebContactID contact on an existing customer account
All existing marketing data will be removed and replaced with the supplied data so you must always supply the full set
You must send a customer id or account number along with the contact details
Any part of the data which is supplied as null will be left as is in Caliq

Request Information

URI Parameters

None.

Body Parameters

ContactChangeParams
NameDescriptionTypeAdditional information
apiKey

Please contact Caliq support to get your key

string

Required

ChannelID

List of channels can be retrieved via API

integer

Required

CustomerID

Caliq internal unique customer identifier

integer

None.

AccountNo

User entered unique customer account number

string

Required

Max length: 10

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

Email

Cannot be used by any other account in Caliq for this brand

string

Required

Max length: 70

UpdateMarketing

If true then the following marketingOptions will be updated otherwise ignored

boolean

None.

MarketingOptions

Marketing preferences allowed for this this contact

Collection of MarketingOption

None.

Request Formats

application/json, text/json

Sample:
{
  "apiKey": "sample string 1",
  "ChannelID": 2,
  "CustomerID": 3,
  "AccountNo": "sample string 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",
  "UpdateMarketing": true,
  "MarketingOptions": [
    {
      "ID": 1,
      "Description": "sample string 2",
      "OptDate": "sample string 3",
      "OptSource": "sample string 4",
      "OptMeta1": "sample string 5",
      "OptMeta2": "sample string 6"
    },
    {
      "ID": 1,
      "Description": "sample string 2",
      "OptDate": "sample string 3",
      "OptSource": "sample string 4",
      "OptMeta1": "sample string 5",
      "OptMeta2": "sample string 6"
    }
  ]
}

application/xml, text/xml

Sample:
<ContactChangeParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <apiKey>sample string 1</apiKey>
  <ChannelID>2</ChannelID>
  <CustomerID>3</CustomerID>
  <AccountNo>sample string 4</AccountNo>
  <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>
  <UpdateMarketing>true</UpdateMarketing>
  <MarketingOptions>
    <MarketingOption>
      <ID>1</ID>
      <Description>sample string 2</Description>
      <OptDate>sample string 3</OptDate>
      <OptSource>sample string 4</OptSource>
      <OptMeta1>sample string 5</OptMeta1>
      <OptMeta2>sample string 6</OptMeta2>
    </MarketingOption>
    <MarketingOption>
      <ID>1</ID>
      <Description>sample string 2</Description>
      <OptDate>sample string 3</OptDate>
      <OptSource>sample string 4</OptSource>
      <OptMeta1>sample string 5</OptMeta1>
      <OptMeta2>sample string 6</OptMeta2>
    </MarketingOption>
  </MarketingOptions>
</ContactChangeParams>

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

ContactChangeResults
NameDescriptionTypeAdditional information
ContactChangeData

ContactChangeData

None.

Response Formats

application/json, text/json

Sample:
{
  "ContactChangeData": {
    "OK": true,
    "ContactChangeIssues": [
      {
        "ID": 1,
        "Message": "sample string 2",
        "ExtraData": "sample string 3"
      },
      {
        "ID": 1,
        "Message": "sample string 2",
        "ExtraData": "sample string 3"
      }
    ]
  }
}

application/xml, text/xml

Sample:
<ContactChangeResults xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ContactChangeData>
    <OK>true</OK>
    <ContactChangeIssues>
      <ContactChangeIssue>
        <ID>1</ID>
        <Message>sample string 2</Message>
        <ExtraData>sample string 3</ExtraData>
      </ContactChangeIssue>
      <ContactChangeIssue>
        <ID>1</ID>
        <Message>sample string 2</Message>
        <ExtraData>sample string 3</ExtraData>
      </ContactChangeIssue>
    </ContactChangeIssues>
  </ContactChangeData>
</ContactChangeResults>