Overview

The GET Contact by Channel API allows you to retrieve the contact for a given database, channel, qualifier and destination. The PATCH Contact by Channel API will add or update a contact with the given contact data using channel information.

Functionalities Available

The ContactbyChannel API call has GET functionalities.

GET: This call returns the contact that matches the database, channel, qualifier and destination information provided in the request call.

GET /databases/{databaseId}/contactbychannel/{channel}-{qualifier}/{destination}

(e.g. /databases/746583/contactbychannel/PUSH-appKey1000/MUID1234|XCID4321)

Scenarios that can be accomplished using this API

Retrieve a contact for the given database ID, channel, qualifier, and destination.

Request body

Not applicable.

Path Parameters

Parameter Value Description Parameter Type Data Type
databaseId Required ID of the database enabled for SMS or Push path long
channel Required SMS or Push path String
qualifier Required Text to Join Program ID for SMS; AppKey for Push path String
destination Required SMS phone number for SMS; Xtify user ID and channel ID for Push path String

Response Content Type

application/json

Response Class Model

Attribute Required Description Data Type
email No A Contact’s email address String
emailType No The type of email to send to a contact (HTML or TEXT) String
leadSource No The lead source for a Contact String
optInDetails No The Opt In Details of a Contact; can only be set on a Contact being added. String
customFields No A list of Custom Field Values ArrayFieldValue

Response Model Schema

{
"email": "String",
"emailType": "String",
"leadSource": "String",
"optInDetails": "String",
"customFields": [
"FieldValue"
]
}

Sample JSON Response Body

Sample JSON Response Body
{ 
"email":"username@domain.com",
"emailType":"HTML",
"leadSource":"Trade Show",
"optInDetails":"Opted in via iPad",
"customFields":[ 
{ 
"name" : "First Name",
"value" : "Bob"
},
{ 
"name" : "Last Name",
"value" : "Andrews"
},
{ 
"name" : "Alias Id",
"value" : "UserAccount4567"
}
]
}

Swagger URL

https://api[your pod number].silverpop.com/restdoc/#!/databases/databases_contactbychannel_get_get_11

Functionalities available

The API call has PATCH functionalities.

PATCH: This call is used to add or update a contact with the given contact data using channel information.

PATCH /databases/{databaseId}/contactbychannel

(e.g. /databases/746583/contactbychannel)

Scenarios that can be accomplished using this API

If a contact is found, the record is updated with the given information and consent is applied. If a contact is not found, the API will add a new contact record and apply consent.

Populate any profile fields in the contact record based on the information you know from their registration or from their profile data in the external system. It is recommended to pass the external system’s alias identifier to Watson Campaign Automation so that it can be stored in the contact record and used as a lookup key field. Additionally, the mobile app could pass the appkey, userid/channelid back to the external system and store this as a unique identifier in the customer’s record.

Note: For the Push channel the Contact by Channel API is used by backend systems to add a contact and consent for push to IBM Watson Campaign Automation with registration IDs provided by our internal Push platform. It cannot be used to add consent for push by custom systems and any contacts or consent added will not result in push notifications being delivered by IBM Watson Campaign Automation.

Request Body

Path Parameters

Parameter Required Description Data Type
databaseId Yes ID of the SMS or Push-enabled Database where the Contact will be inserted or updated long

ContactByChannelSpecification

Attribute Required Description Data Type
channel Yes The channel data to identify a contact model
contact No The values to set on the new or updated contact model

Channel Data

Attribute Required Description Data Type
channelType Yes SMS or PUSH String
qualifier Yes Text to Join Program ID for SMS; AppKey for Push String
destination Yes SMS phone number for SMS; Xtify user ID and channel ID for Push String
status No Opt in status. Acceptable values are ‘OPTED-IN’ and ‘OPTED-OUT’ String
consentDate No Optional timestamp represented in a String (1970-01-01T00:00:00.000Z). ISO is the default format. Date
consentSource No The source of the contact. Defaults to ‘API’ if not included. String

Attributes

Attribute Required Description Data Type
timezoneID No ID of the time zone String

Contact

Attribute Required Description Data Type
email No A contact’s email address String
emailType No The type of email to send to a contact (HTML or TEXT) String
leadSource No The lead source for a contact String
optInDetails No The Opt In details of a contact; can only be set on a contact being added. String
customFields No Name value pairs representing columns in the database and their values. ArrayFieldValue

Swagger URL

https://api[your pod number].silverpop.com/restdoc/#!/databases/databases_contactbychannel_patch_patch_6

SampleJSON Request Body

{ 
"channel":{ 
"channelType":"PUSH",
"qualifier":"appKey100",
"destination":"MUID1234|XCID4321",
"status":"OPTED-IN",
"consentDate":"2015-05-01T23:01:12.000Z"
},
"contact":{ 
"email":"username@domain.com",
"emailType":"HTML",
"leadSource":"Trade Show",
"customFields":[ 
{ 
"name" : "First Name",
"value" : "Bob"
},
{ 
"name" : "Last Name",
"value" : "Andrews"
},
{ 
"name" : "Alias Id",
"value" : "UserAccount4567"
}
]
}
}

Go Back to the Mobile App Messaging home page.

Join The Discussion

Your email address will not be published. Required fields are marked *