Introduction
A Campaign represents the configuration of how Inbound text messages should be handled, whether it be a simple Message or payments – either Single or Recurring.
Properties
|
Name |
Type |
Mandatory |
Default |
Example |
Description |
|---|---|---|---|---|---|
|
campaignGuid |
STRING |
- |
|
a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx |
Unique GUID |
|
campaignName |
STRING |
YES |
|
|
Name of campaign |
|
active |
BOOLEAN |
NO |
|
|
|
|
replyText |
STRING |
YES |
|
“Thanks for your donation. Complete your registration here: [url]“ |
Replying text message with variables: [phone] for phone number and [url] for shortened URL. |
|
replyTextUrl |
STRING |
|
|
“https://domain.tld?phone=[phone]“ |
URL to shorten and replace variable in text message. |
|
urlShortner |
STRING |
|
|
“giiv.dk”, “kortl.ink” |
URL shorten provider |
|
cancelReplyText |
STRING |
NO |
|
“We have cancelled your recurring donation” |
Replying text message after cancellation |
|
serviceType |
STRING |
YES |
|
NoResponse, |
The type of service applied to the campaign |
|
contentType |
STRING |
NO* |
|
"PhysicalProduct", |
The content type defines the fees applied to transactions |
|
metaData |
STRING |
NO |
|
{"key": "campaign","value": "summertest"} |
JSON object of metaData applied to each inbound text message |
|
targetedAudienceUnderAge |
BOOLEAN |
NO |
|
|
Defines if the campaign is targeted individuals under 18 |
|
taxDeductable |
BOOLEAN |
NO |
|
|
Defines basis for tax deductibility |
|
paymentRequired |
BOOLEAN |
NO |
|
|
Defines how lapses Payments should be handled in during dunning |
|
amount |
DOUBLE |
NO* |
|
100.0 |
Price of Single or Recurring text message excluding VAT |
|
amountVat |
DOUBLE |
NO |
0.0 |
|
Amount VAT |
|
amountTotal |
DOUBLE |
NO* |
|
100.0 |
Price of Single or Recurring text message including VAT |
|
vatPercentage |
DOUBLE |
NO |
0.0 |
|
|
|
currencyCode |
STRING |
NO |
DKK |
|
ISO formatted Currency Code (wiki) |
|
purposeAccountingCode |
STRING |
NO |
|
“SMS Campaign“ |
Accounting Code defined by Merchant used to identify the receiving part of transactions. |
|
unit |
STRING |
NO |
|
“pcs.” |
|
|
unitPrice |
DOUBLE |
NO* |
|
100.0 |
|
|
agreementGuid |
STRING |
NO** |
|
a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx |
|
|
agreementName |
STRING |
NO*** |
|
“A Great Cause“ |
Name of Personal Agreement |
|
agreementDescription |
STRING |
NO |
|
“Recurring support for a great cause“ |
Description of Personal Agreement |
|
agreementType |
STRING |
NO*** |
|
“Personal”, “Shared” |
Agreements can either be Personal or Shared. Shared agreements are used by many Contacts, such as memberships with a certain frequency and amount, whereas personal agreements are unique to each individual Contact, such as a recurring donation of a specific frequency and amount. |
|
scheduleType |
STRING |
NO*** |
|
“Monthly” |
Please see list of Agreement Schedule Types |
|
scheduleBaseTier |
INTEGER |
NO*** |
|
|
The offset in relation to the chosen calendarUnit |
|
scheduleFixedDay |
INTEGER |
NO*** |
|
|
A fixed day of the chosen calendarUnit |
|
scheduleEveryOther |
INTEGER |
NO*** |
|
|
Skip every other due date |
|
scheduleCalendarUnit |
STRING |
NO |
Month |
Month |
Calculate due date based on the chosen calendarUnit |
|
scheduleSelectedSet |
STRING |
NO |
|
[1,2,3,4,5,6] |
Only calculate due dates when due date based on calendarUnit is in provided set of integers |
|
communicationCollectionGuid |
STRING |
NO |
|
a863d62e-d53b-4651-9b7b-xxxxxxxxxxxx |
|
|
invoiceText |
STRING |
NO* |
|
|
Invoice text for customer |
|
revenueText |
STRING |
NO* |
|
|
Revenue text for organization |
*) Required if serviceType: Single or Recurring.
**) Required if serviceType is Recurring.
***) Required if serviceType is Recurring and agreementGuid is not given.
Endpoints
GET /campaigns
Get a list of campaigns.
Response
|
HTTP |
Description |
|---|---|
|
200 |
OK |
HTTP 200 Example
[
{
"campaignGuid": "d05e4470-f612-497b-a2da-xxxxxxxxxxxx",
"createdTs": "2019-09-23 14:28:38 +0200",
"active": true
},
{
"campaignGuid": "d05e4470-f612-497b-a2da-xxxxxxxxxxxx",
"createdTs": "2019-09-23 14:28:38 +0200",
"active": true
}
]
GET /campaign/{campaignGuid}
Get a single campaign.
Response
|
HTTP |
Description |
|---|---|
|
200 |
OK |
|
404 |
Not found |
HTTP 200 Example
{
"campaignGuid": "afa0327a-5c42-4e7e-981d-xxxxxxxxxxxx",
"createdTs": "2019-10-28 08:58:34 +0100",
"merchantId": "Fundraisingbureau",
"active": true,
"campaignName": "Subscription by text message",
"replyText": "Thanks for your support!",
"cancelReplyText": "Thanks for now. He have ended your subscription as per your request.",
"serviceType": "Recurring",
"contentType": "HumanitarianDonation",
"amount": 1.0,
"amountVat": 0.0,
"amountTotal": 1.0,
"vatPercentage": 0.0,
"currencyCode": "DKK",
"taxDeductable": false,
"paymentRequired": false,
"unit": "pcs.",
"unitPrice": 1.0,
"agreementName": "SMS donation",
"agreementDescription": "Subscription by text message",
"agreementType": "Personal",
"scheduleType": "Monthly",
"scheduleBaseTier": 11,
"scheduleFixedDay": 1,
"scheduleEveryOther": 1,
"scheduleCalendarUnit": "Month",
"targetAudienceUnderAge": false,
"invoiceText": "This is shown to the donor in the payment statement",
"revenueText": "This is shown to the organization in their revenue overview"
}
POST /campaign
Insert a single campaign.
Request
The following must be provided as the request body:
{
"campaignName": "A Great Cause",
"serviceType": "Message",
"replyText": "Thanks for your message"
}
Response
|
HTTP |
Description |
|---|---|
|
201 |
Created |
|
400 |
Something's wrong with request body. |
HTTP 201 Example
{
"campaignGuid": "d05e4470-f612-497b-a2da-xxxxxxxxxxxx",
"createdTs": "2019-09-23 14:28:38 +0200",
"active": true
}
POST /campaign/{campaignGuid}/Cancel
Cancel a single campaign.
Response
|
HTTP |
Description |
|---|---|
|
200 |
OK |
|
404 |
Not found |