Provides the ability to list and create Blacklists
{
"originator": "string",
"comment": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"blacklisted_until": "datetime",
"notify": "boolean",
"date_created": "datetime",
"message": "int",
"id": "int"
}
Provides the ability to get and put a Blacklist
{
"originator": "string",
"comment": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"blacklisted_until": "datetime",
"notify": "boolean",
"date_created": "datetime",
"message": "int",
"id": "int"
}
Provides the ability to list and create Messages
{
"originator": "string",
"campaign": "int",
"date_updated": "datetime",
"text": "string",
"company": "int",
"fav": "boolean",
"blacklisted": "boolean",
"fraud_incident": "boolean",
"reason": "int",
"id": "int",
"fraud_suspect": "boolean",
"slot": "int",
"extra_digits": "string",
"network": "int",
"session_data": "unknown",
"reply_path_message": "boolean",
"backend_id": "string",
"longitude": "float",
"provider": "int",
"latitude": "float",
"date_created": "datetime",
"backend": "string",
"additional_data": "unknown"
}
Provides the ability to reply to a message from collate.
{}
Provides the ability to get and put a Message
{
"originator": "string",
"campaign": "int",
"date_updated": "datetime",
"text": "string",
"company": "int",
"fav": "boolean",
"blacklisted": "boolean",
"fraud_incident": "boolean",
"reason": "int",
"id": "int",
"fraud_suspect": "boolean",
"slot": "int",
"extra_digits": "string",
"network": "int",
"session_data": "unknown",
"reply_path_message": "boolean",
"backend_id": "string",
"longitude": "float",
"provider": "int",
"latitude": "float",
"date_created": "datetime",
"backend": "string",
"additional_data": "unknown"
}
Provides the ability to reply to a message that we've received.
{}
Provides the ability to launch a task to create a csv file within filebox with messages.
{}
Provides the ability to launch a task to create a csv file within filebox with messages.
{}
GenerateReportAPIView class allows launching a task to create a PDF file within the filebox with a report.
{}
Provides the ability to list and create provider used to pull messages in to a campaign.
{
"live": "boolean",
"handle": "string",
"updated_by": "int",
"date_updated": "datetime",
"company": "int",
"last_token_id": "int",
"reply_config": "int",
"created_by": "int",
"currency": "string",
"token": "string",
"cost": "float",
"date_created": "datetime",
"id": "int",
"token_secret": "string",
"provider_type": "int"
}
Provides the ability to list providers that are not used in any live campaign.
{
"live": "boolean",
"handle": "string",
"updated_by": "int",
"date_updated": "datetime",
"company": "int",
"last_token_id": "int",
"reply_config": "int",
"created_by": "int",
"currency": "string",
"token": "string",
"cost": "float",
"date_created": "datetime",
"id": "int",
"token_secret": "string",
"provider_type": "int"
}
Provides the ability to get and update a provider used to pull messages in to a campaign.
{
"live": "boolean",
"handle": "string",
"updated_by": "int",
"date_updated": "datetime",
"company": "int",
"last_token_id": "int",
"reply_config": "int",
"created_by": "int",
"currency": "string",
"token": "string",
"cost": "float",
"date_created": "datetime",
"id": "int",
"token_secret": "string",
"provider_type": "int"
}
Provides the ability to send a message directly using a specific provider
{}
Provides the ability to list Attachments
{
"attachment": "image file",
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"thumbnail": "unknown"
}
Provides the ability to get an Attachment
{
"attachment": "image file",
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"thumbnail": "unknown"
}
Provides the ability to list ReplyMessage
{
"text": "string",
"updated_by": "int",
"campaign": "int",
"reply_type": "int",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int"
}
Provides the ability to get and put a ReplyMessage
{
"text": "string",
"updated_by": "int",
"campaign": "int",
"reply_type": "int",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int"
}
Provides the ability to list and create Addons
{
"addon_type": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"ignore_failure": "boolean",
"id": "int",
"created_by": "int",
"order": "int"
}
Provides the ability to set a list of Addons for a campaign using the following format [
{type: <addon type>, ignore_failure: <boolean>}, {type: <addon type>, ignore_failure: <boolean>}
]
clears out any previously set addons in the process.
{
"addon_type": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"ignore_failure": "boolean",
"id": "int",
"created_by": "int",
"order": "int"
}
Provides the ability to get and put a Addon
{
"addon_type": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"ignore_failure": "boolean",
"id": "int",
"created_by": "int",
"order": "int"
}
{
"addon_type": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"ignore_failure": "boolean",
"id": "int",
"created_by": "int",
"order": "int"
}
{
"addon_type": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"ignore_failure": "boolean",
"id": "int",
"created_by": "int",
"order": "int"
}
Provides the ability to list and create Campaigns
{
"updated_by": "int",
"end_date": "datetime",
"title": "string",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"start_date": "datetime",
"default": "boolean",
"is_focus_group": "boolean",
"keyword": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability to get and put a Campaign
{
"updated_by": "int",
"end_date": "datetime",
"title": "string",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"start_date": "datetime",
"default": "boolean",
"is_focus_group": "boolean",
"keyword": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability to list Campaigns, included those that are disabled.
{
"updated_by": "int",
"end_date": "datetime",
"title": "string",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"start_date": "datetime",
"default": "boolean",
"is_focus_group": "boolean",
"keyword": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability to get and put a Campaign
{
"updated_by": "int",
"end_date": "datetime",
"title": "string",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"start_date": "datetime",
"default": "boolean",
"is_focus_group": "boolean",
"keyword": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability to list closed/inactive Campaigns
{
"updated_by": "int",
"end_date": "datetime",
"title": "string",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"start_date": "datetime",
"default": "boolean",
"is_focus_group": "boolean",
"keyword": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability to list future Campaigns
{
"updated_by": "int",
"end_date": "datetime",
"title": "string",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"start_date": "datetime",
"default": "boolean",
"is_focus_group": "boolean",
"keyword": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability to un-allocate prizes for a closed campaign
{}
Provides the ability to POST a message into your campaign. Messages that are posted have some set fields that are required to successfully create the message.
The identity of the person sending the message. Usually you'd use something like the person's mobile number, email address or twitter handle. If you are giving away airtime prizes as part of the campaign the originator needs to be the person's mobile number.
This is only required if the campaign is giving away airtime prizes. The network id can be gotten from https://api.colonyhq.com/collate/networks/mobilenetwork/
Simple text that will be shown in the message stream. This field will also be mined with the below fields.
All other fields passed back into the post will be used to create the message as well as mine any data from. For mining, the following fields can be used.
A product that could be associated to both the person and the message. If the person is entering a competition after buying a specific product you could add that to the person's profile.
The person's full name or any part thereof.
The gender of the person.
A location where the person lives or works.
A wider type location like city etc.
An email address that is linked to a person.
A twitter handle that is linked to a person.
Any interest that a person has; i.e. music, movies.
Any language that can be linked to a person.
A mobile number that is linked to a person. Formatted with the country code; i.e. 27812213322
Any relationship the person could be in; i.e. father, son, mother etc.
The country that the person lives in.
If the person has a South African ID you could post it in this field.
The date that the person was born in ISO format; i.e. YYYY-MM-DD
A phune number that is linked to a person. Formatted with the country code; i.e. 27115422254
A South African postal code linked to the person.
The latitude of where the message originated.
The longitude of where the message originated.
A boolean informing you whether or not the call was successful. True if it was successful and False if not. If it is not a success then then error_code and error_text will inform you where the problem might be.
0: No fields were sent in with the POST. 1: The campaign_pk sent in as part of the URL could not be found. 2: The provider that is gleaned from the "HTTP_REFERER" header could not be found in the given campaign. 3: The originator was not sent in as a field in the POST. 4: The message was not sent in as a field in the POST.
A simple human readable text representation of the error.
A JSON representation of the message that was created.
Shows results for any prizes that were or were not awarded.
{}
Provides the ability to get a total of codes redeemed for a a campaign
{}
{
"twitter_count": "int",
"total": "int",
"web_hook_count": "int",
"campaign": "int",
"company": "int",
"mixit_count": "int",
"fraud_count": "int",
"wechat_count": "int",
"ussd_count": "int",
"period_type": "int",
"facebook_count": "int",
"period_end": "datetime",
"period_start": "datetime",
"mms_email_count": "int",
"id": "int",
"sms_count": "int",
"google_plus_count": "int"
}
{}
{}
Provides the ability to list and create code batches.
{
"product": "string",
"valid_from": "datetime",
"updated_by": "int",
"campaign": "int",
"title": "string",
"batch_num": "int",
"is_active": "boolean",
"valid_to": "datetime",
"date_updated": "datetime",
"prefix": "string",
"created_by": "int",
"date_created": "datetime",
"multi_use": "boolean",
"id": "int",
"code_len": "int"
}
Even though its a destroy API view we inherit CreateAPIView because we do not know the pk of the used batch beforehand
{
"code": "string",
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"batch": "int"
}
Provides the ability to retrieve an individual code batch
{
"product": "string",
"valid_from": "datetime",
"updated_by": "int",
"campaign": "int",
"title": "string",
"batch_num": "int",
"is_active": "boolean",
"valid_to": "datetime",
"date_updated": "datetime",
"prefix": "string",
"created_by": "int",
"date_created": "datetime",
"multi_use": "boolean",
"id": "int",
"code_len": "int"
}
Ability to generate codes for a batch
Params: count - Amount of codes to generate for this batch
{}
Ability to pass a code and check if it's valid on that batch
{}
Provides the ability to list codes that have already been used in a batch
{
"code": "string",
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"batch": "int"
}
Provides the ability to view details on an individual batch code that has been used
{
"code": "string",
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"batch": "int"
}
Provides the ability to get a total of codes redeemed for a a campaign
{}
Provides the ability to add and remove access codes which can be used to allow or disallow entry into a campaign on ussd.
{
"code": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int",
"batch": "int"
}
Allows for bulk upload of access codes for a campaign
{}
Provides the ability to retrieve, update or destroy access codes which are used to allow or disallow entry into a campaign on ussd.
{
"code": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int",
"batch": "int"
}
Provides the ability to remove large collections of access codes by supplying a batch
{
"pool_id": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"company": "int",
"id": "int",
"created_by": "int",
"name": "string"
}
Provides the ability to list access code batches
{
"pool_id": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"company": "int",
"id": "int",
"created_by": "int",
"name": "string"
}
{
"code": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"sent": "boolean",
"id": "int",
"created_by": "int",
"desc": "string"
}
{
"code": "string",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"sent": "boolean",
"id": "int",
"created_by": "int",
"desc": "string"
}
{
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"pull_code": "int"
}
{
"date_updated": "datetime",
"date_created": "datetime",
"message": "int",
"id": "int",
"pull_code": "int"
}
Provides the ability to list and create Rules
{
"active": "boolean",
"entry_count": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"company": "int",
"block_time_type": "int",
"id": "int",
"created_by": "int"
}
Provides the ability to get and put an Access Code Rule
{
"active": "boolean",
"entry_count": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"company": "int",
"block_time_type": "int",
"id": "int",
"created_by": "int"
}
Allows for bulk upload of user codes for a campaign #
{}
Allows for bulk upload of user codes for a campaign #
{}
{
"updated_by": "int",
"campaign": "int",
"trigger_type": "int",
"date_updated": "datetime",
"start_hour": "time",
"end_hour": "time",
"created_by": "int",
"emails": "list",
"summary_type": "int",
"last_run": "datetime",
"date_created": "datetime",
"id": "int"
}
Provides the ability to list closed/inactive Campaigns
{
"updated_by": "int",
"campaign": "int",
"trigger_type": "int",
"date_updated": "datetime",
"start_hour": "time",
"end_hour": "time",
"created_by": "int",
"emails": "list",
"summary_type": "int",
"last_run": "datetime",
"date_created": "datetime",
"id": "int"
}
Provides the ability to list and create Rules
{
"entry_time": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"suspect_time": "int",
"entry_time_type": "int",
"active": "boolean",
"entry_count": "int",
"suspect_time_type": "int",
"block_time": "int",
"date_created": "datetime",
"block_time_type": "int",
"id": "int",
"suspect_count": "int"
}
Provides the ability to get and put a Rule
{
"entry_time": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"company": "int",
"created_by": "int",
"suspect_time": "int",
"entry_time_type": "int",
"active": "boolean",
"entry_count": "int",
"suspect_time_type": "int",
"block_time": "int",
"date_created": "datetime",
"block_time_type": "int",
"id": "int",
"suspect_count": "int"
}
Provides the ability to list MobileNetwork
{
"mnc": "string",
"name": "string",
"country": "string",
"date_updated": "datetime",
"date_created": "datetime",
"dial_code": "string",
"mcc": "string",
"id": "int"
}
Provides the ability to fetch a MobileNetwork
{
"mnc": "string",
"name": "string",
"country": "string",
"date_updated": "datetime",
"date_created": "datetime",
"dial_code": "string",
"mcc": "string",
"id": "int"
}
Provides the ability to list and create Polls
{
"is_active": "boolean",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"question": "string",
"id": "int",
"created_by": "int"
}
Provides the ability to get and put a Poll
{
"is_active": "boolean",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"question": "string",
"id": "int",
"created_by": "int"
}
Provides the ability to list and create PollChoice
{
"matches": "list",
"votes": "int",
"updated_by": "int",
"date_updated": "datetime",
"date_created": "datetime",
"poll": "int",
"is_active": "boolean",
"id": "int",
"created_by": "int",
"choice": "string"
}
Provides the ability to get and put a PollChoice
{
"matches": "list",
"votes": "int",
"updated_by": "int",
"date_updated": "datetime",
"date_created": "datetime",
"poll": "int",
"is_active": "boolean",
"id": "int",
"created_by": "int",
"choice": "string"
}
Provides the ability to list and create QRCodes
{
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"company": "int",
"data": "string",
"id": "int",
"created_by": "int",
"image": "image file"
}
Provides the ability to get and put a QRCode
{
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"date_created": "datetime",
"company": "int",
"data": "string",
"id": "int",
"created_by": "int",
"image": "image file"
}
{
"status": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"csv_file": "file",
"company": "int",
"selection_log": "string",
"created_by": "int",
"from_date": "datetime",
"winners": "int",
"to_date": "datetime",
"error": "string",
"date_created": "datetime",
"id": "int"
}
{
"status": "int",
"updated_by": "int",
"campaign": "int",
"date_updated": "datetime",
"csv_file": "file",
"company": "int",
"selection_log": "string",
"created_by": "int",
"from_date": "datetime",
"winners": "int",
"to_date": "datetime",
"error": "string",
"date_created": "datetime",
"id": "int"
}
Provides the ability for a user within a company to list and create timeslots
{
"start_day": "int",
"updated_by": "int",
"title": "string",
"date_updated": "datetime",
"start_time": "time",
"created_by": "int",
"id": "int",
"end_day": "int",
"end_time": "time",
"active": "boolean",
"date_created": "datetime",
"company": "int"
}
Provides the ability to a user within a company to retrieve individual timeslots and to modify them.
{
"start_day": "int",
"updated_by": "int",
"title": "string",
"date_updated": "datetime",
"start_time": "time",
"created_by": "int",
"id": "int",
"end_day": "int",
"end_time": "time",
"active": "boolean",
"date_created": "datetime",
"company": "int"
}
Provides the ability to list and create modules used for USSD sessions.
{
"cup_module_id": "int",
"additionalData": "string",
"module_type": "int",
"updated_by": "int",
"campaign": "int",
"text": "string",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int"
}
Provides the ability to get and put a Module
{
"cup_module_id": "int",
"additionalData": "string",
"module_type": "int",
"updated_by": "int",
"campaign": "int",
"text": "string",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int"
}
Allows a user to destroy their previous session created for a campaign.
{
"cup_module_id": "int",
"additionalData": "string",
"module_type": "int",
"updated_by": "int",
"campaign": "int",
"text": "string",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"created_by": "int"
}
Allows for bulk upload of access codes for a campaign
{}
Provides the ability to list and create modules links used for USSD sessions.
{
"source_module": "int",
"option": "string",
"target_module": "int",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"value": "string"
}
Provides the ability to get and put a ModuleLink
{
"source_module": "int",
"option": "string",
"target_module": "int",
"date_updated": "datetime",
"date_created": "datetime",
"id": "int",
"value": "string"
}
{}
{}
{}