POST api/SubscriberDataV2?TestMode={TestMode}
A function to save consumer data to the Heineken beverages Subscription database. Response returns: 1. SubscriberStatus (Subscribed or Unsubscribed) based on Email and/or CellNo. 2. Action (True or False) which indicates if the consumer data was saved. 3. ConsumerID which is the ID of the consumer in the Heineken beverages Subscription database, and returns -1 if no new consumer was created. Note: Both Email and CellNo need to be supplied for a new consumer to be saved
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| TestMode |
Test Mode available for testing validation |
boolean |
Default value is False |
Body Parameters
SubscriberDataV2| Name | Description | Type | Additional information |
|---|---|---|---|
| DataSourceID |
REQUIRED - (each supplier will get its unique id) |
integer |
Required |
| BrandID |
REQUIRED - List of brands with ID’s will be supplied |
integer |
Required |
| SubscriptionStatus |
Must be set True or False (according to your system) |
boolean |
Required |
| SubscriptionDate |
REQUIRED - ISO 8601 format(YYYY-MM-DDTHH:mm:ss): Date Must be supplied – if unkown use Creation Date |
date |
Required |
| EmailAddress |
REQUIRED - Either CellNo OR EmailAddress must be supplied |
string |
None. |
| CellNo |
REQUIRED - Either CellNo OR EmailAddress must be supplied |
string |
None. |
| EmailOptIn |
REQUIRED - Must be supplied if Email was supplied |
boolean |
None. |
| MobileOptIn |
REQUIRED - Must be supplied if Cellno was supplied |
boolean |
None. |
| UnsubscribeDate |
ISO 8601 format(YYYY-MM-DDTHH:mm:ss): Must be supplied if Subscriptionstatus is 0 |
date |
None. |
| Name |
Consumer Name |
string |
None. |
| Surname |
Consumer surname |
string |
None. |
| Sex |
Sex/Gender of consumer (male, female, other, m, f, o) |
string |
None. |
| Title |
Consumer Title |
string |
None. |
| DOB |
ISO 8601 format(YYYY-MM-DDTHH:mm:ss): Cosumer date of birth |
date |
None. |
| Country |
Country of residence of consumer (Country Name or ISO 3166-1 alpha-2 Country Code ) |
string |
None. |
| StateProvince |
If Country is South Africa, this field must be one of { "Eastern Cape", "Free State", "Gauteng", "KwaZulu-Natal", "Limpopo", "Mpumalanga", "Northern Cape", "North West", "Western Cape" } |
string |
None. |
| ProvinceCode |
If Country is South Africa, this field must be one of { "EC", "FS", "GP", "KZN", "LP", "MP", "NC", "NW", "WC" } |
string |
None. |
| Organisation |
Organisation |
string |
None. |
| IDNo |
ID Number of consumer |
string |
None. |
| Age |
Age of consumer |
integer |
None. |
| Profession |
Profession of consumer |
string |
None. |
| PostalCode |
Postal code of consumer address |
string |
None. |
| RegistrationDate |
ISO 8601 format(YYYY-MM-DDTHH:mm:ss): Registration date of consumer |
date |
None. |
| AddressLine1 |
Consumer address |
string |
None. |
| AddressLine2 |
Consumer address |
string |
None. |
| AddressLine3 |
Consumer address |
string |
None. |
| City |
City |
string |
None. |
| DateTimeCreated |
ISO 8601 format(YYYY-MM-DDTHH:mm:ss): Optional creation date field which defaults to time of execution |
date |
None. |
| Campaign |
Campaign name |
string |
None. |
| MediaSource |
Represents the source from which subscription originated, such as a social media platform (e.g., Facebook, Twitter, Instagram), a search engine (e.g., Google, Bing), or other digital channels. |
string |
None. |
| Device |
Device used to subscribe, for example: Windows Desktop, IOS Mobile, Android Tablet, etc. |
string |
None. |
| AdditionalData |
Additional data can be stored in this field as a JSON object string, for example: { "user": { "id": 12345, "name": "John Doe", "email": "user@example.com" }, "settings": { "theme": "dark", "notifications": true } } |
string |
None. |
Request Formats
application/json, text/json
{
"DataSourceID": 1,
"BrandID": 2,
"SubscriptionStatus": true,
"SubscriptionDate": "2026-08-27T10:57:10.4853281+02:00",
"EmailAddress": "sample string 4",
"CellNo": "sample string 5",
"EmailOptIn": true,
"MobileOptIn": true,
"UnsubscribeDate": "2026-08-27T10:57:10.4853281+02:00",
"Name": "sample string 6",
"Surname": "sample string 7",
"Sex": "sample string 8",
"Title": "sample string 9",
"DOB": "2026-08-27T10:57:10.487347+02:00",
"Country": "sample string 10",
"StateProvince": "sample string 11",
"ProvinceCode": "sample string 12",
"Organisation": "sample string 13",
"IDNo": "sample string 14",
"Age": 1,
"Profession": "sample string 15",
"PostalCode": "sample string 16",
"RegistrationDate": "2026-08-27T10:57:10.487347+02:00",
"AddressLine1": "sample string 17",
"AddressLine2": "sample string 18",
"AddressLine3": "sample string 19",
"City": "sample string 20",
"DateTimeCreated": "2026-08-27T10:57:10.487347+02:00",
"Campaign": "sample string 21",
"MediaSource": "sample string 22",
"Device": "sample string 23",
"AdditionalData": "sample string 24"
}
application/xml, text/xml
<SubscriberDataV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DistellSubscriptionAPI.Models"> <AdditionalData>sample string 24</AdditionalData> <AddressLine1>sample string 17</AddressLine1> <AddressLine2>sample string 18</AddressLine2> <AddressLine3>sample string 19</AddressLine3> <Age>1</Age> <BrandID>2</BrandID> <Campaign>sample string 21</Campaign> <CellNo>sample string 5</CellNo> <City>sample string 20</City> <Country>sample string 10</Country> <DOB>2026-08-27T10:57:10.487347+02:00</DOB> <DataSourceID>1</DataSourceID> <DateTimeCreated>2026-08-27T10:57:10.487347+02:00</DateTimeCreated> <Device>sample string 23</Device> <EmailAddress>sample string 4</EmailAddress> <EmailOptIn>true</EmailOptIn> <IDNo>sample string 14</IDNo> <MediaSource>sample string 22</MediaSource> <MobileOptIn>true</MobileOptIn> <Name>sample string 6</Name> <Organisation>sample string 13</Organisation> <PostalCode>sample string 16</PostalCode> <Profession>sample string 15</Profession> <ProvinceCode>sample string 12</ProvinceCode> <RegistrationDate>2026-08-27T10:57:10.487347+02:00</RegistrationDate> <Sex>sample string 8</Sex> <StateProvince>sample string 11</StateProvince> <SubscriptionDate>2026-08-27T10:57:10.4853281+02:00</SubscriptionDate> <SubscriptionStatus>true</SubscriptionStatus> <Surname>sample string 7</Surname> <Title>sample string 9</Title> <UnsubscribeDate>2026-08-27T10:57:10.4853281+02:00</UnsubscribeDate> </SubscriberDataV2>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
JSON response.
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample not available.