POST api/v1/MarketingChange
Update just the marketing options on an existing customer account/contact
This operates on a specific marketing option at a time
You must send a customer id or account number along with the marketing details
If you supply the ContactID then this will be updated. If this is 0 or missing then the main web contact will be updated
Request Information
URI Parameters
None.
Body Parameters
MarketingChangeParams| Name | Description | Type | Additional 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. |
| ContactID |
Caliq internal unique contact identifier. If this is missing or zero then the main web contact will be updated |
integer |
None. |
| AccountNo |
User entered unique customer account number |
string |
Required Max length: 10 |
| OptionID |
Marketing option ID to change |
integer |
None. |
| OptIn |
If true then the contact will be opted in with date/meta etc, if false opted out and other data is not required |
boolean |
None. |
| OptDate |
Date opted in, in YYYYMMDD format |
string |
None. |
| OptSource |
Source for this marketing opt in |
string |
Max length: 30 |
| OptMeta1 |
Meta 1, for sundry use |
string |
Max length: 30 |
| OptMeta2 |
Meta 2, for sundry use |
string |
Max length: 30 |
Request Formats
application/json, text/json
{
"apiKey": "sample string 1",
"ChannelID": 2,
"CustomerID": 3,
"ContactID": 4,
"AccountNo": "sample string 5",
"OptionID": 6,
"OptIn": true,
"OptDate": "sample string 8",
"OptSource": "sample string 9",
"OptMeta1": "sample string 10",
"OptMeta2": "sample string 11"
}
application/xml, text/xml
<MarketingChangeParams 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> <ContactID>4</ContactID> <AccountNo>sample string 5</AccountNo> <OptionID>6</OptionID> <OptIn>true</OptIn> <OptDate>sample string 8</OptDate> <OptSource>sample string 9</OptSource> <OptMeta1>sample string 10</OptMeta1> <OptMeta2>sample string 11</OptMeta2> </MarketingChangeParams>
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 |
|---|---|---|---|
| MarketingChangeData | MarketingChangeData |
None. |
Response Formats
application/json, text/json
{
"MarketingChangeData": {
"OK": true,
"MarketingChangeIssues": [
{
"ID": 1,
"Message": "sample string 2",
"ExtraData": "sample string 3"
},
{
"ID": 1,
"Message": "sample string 2",
"ExtraData": "sample string 3"
}
]
}
}
application/xml, text/xml
<MarketingChangeResults xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MarketingChangeData>
<OK>true</OK>
<MarketingChangeIssues>
<MarketingChangeIssue>
<ID>1</ID>
<Message>sample string 2</Message>
<ExtraData>sample string 3</ExtraData>
</MarketingChangeIssue>
<MarketingChangeIssue>
<ID>1</ID>
<Message>sample string 2</Message>
<ExtraData>sample string 3</ExtraData>
</MarketingChangeIssue>
</MarketingChangeIssues>
</MarketingChangeData>
</MarketingChangeResults>