Campaign Detector API
1. Introduction
The HORISEN Campaign Detector Module is programmed to detect SMS campaigns. As one of the monitoring tools, it can help in tracking, monitoring and managing the campaigns. Once a campaign is detected, details like basic data of a campaign, a sender of a campaign, on which customer accounts and supplier gates it is detected, will be available. With update option it is possible to manage a campaign’s status, give a campaign a name, classify a campaign by setting the classification details, adding the system and custom tags, set a priority for a campaign traffic, etc.
This API belongs to the Bulk Campaign Detector domain. The subject domain of an endpoint URL is:
https://api{separator}{platform_domain}/bulk/campaign-detector/v1
Note: A domain is presented with placeholders as https://api{separator}{platform_domain}
, where {separator}
can be a dot (.) or a hyphen (-). Please, replace it with your actual platform domain name.
The API uses the HORISEN implementation of the OAuth 2.0 protocol. For more information refer to the OAuth2 Authentication Guidelines page.
2. Methods Overview
2.1 Campaign
The Campaign related endpoints.
2.2 CampaignStats
The Campaign Stats related endpoint.
2.3 CampaignHasTag
The Campaign Has Tag related endpoint.
2.4 CampaignExample
The Campaigns Example related endpoints.
2.5 AccountCounter
The Account Counter related endpoints.
2.6 Account
The Account related endpoints.
2.7 CampaignGroup
The Campaign Group related endpoints.
2.8 CampaignTag
The Campaign Tag related endpoints.
2.9 GateCounter
The Gate Counter related endpoints.
2.10 Gate
The Gate related endpoints.
2.11 TagLOV
The Tag LOV related endpoints.
2.12 CampaignMsgSender
The Campaign Msg Sender related endpoints.
3. Methods Details
3.1 Campaign
The Campaign related endpoints.
Method Overview
The method returns a list of campaigns.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, msgHash, msgType, msgSender, msgText, msgDt, msgCoding, smsTotalParts, smsPart, totalHits, flags, name, insertDt, updateDt, status, statusDt, action, priority, lang, groupId, groupName, activeDuration, activeUntilDt. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, msgHash, msgType, msgSender, msgText, msgDt, msgCoding, smsTotalParts, smsPart, totalHits, flags, name, insertDt, updateDt, status, statusDt, action, priority, lang, groupId, groupName, activeDuration, activeUntilDt, accountId, gateId, tagId.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of campaigns. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of campaigns
{
"data": [
{
"id": 0,
"msgHash": "string",
"instanceId": 0,
"msgType": "mt",
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-07T09:34:25.419Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"totalHits": 0,
"flags": "string",
"name": "string",
"insertDt": "2023-07-07T09:34:25.419Z",
"updateDt": "2023-07-07T09:34:25.419Z",
"status": "new",
"statusDt": "2023-07-07T09:34:25.419Z",
"action": "none",
"priority": "low",
"lang": "string",
"langName": "string",
"groupId": 0,
"groupName": "string",
"activeDuration": "unknown",
"activeUntilDt": "2023-07-07T09:34:25.419Z",
"conf": {},
"actionMethod": {
"method": "string",
"object": "string",
"parameters": {
"charge": "string",
"dlrError": "string",
"dlrStatus": "string"
}
},
"tags": [
{
"id": 0,
"type": "system",
"name": "string"
}
]
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 10
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a campaign for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_NOT_FOUND | Campaign not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Campaign data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign data
{
"id": 0,
"msgHash": "string",
"instanceId": 0,
"msgType": "mt",
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-07T09:47:45.135Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"totalHits": 0,
"flags": "string",
"name": "string",
"insertDt": "2023-07-07T09:47:45.135Z",
"updateDt": "2023-07-07T09:47:45.135Z",
"status": "new",
"statusDt": "2023-07-07T09:47:45.135Z",
"action": "none",
"priority": "low",
"lang": "string",
"groupId": 0,
"activeDuration": "unknown",
"activeUntilDt": "2023-07-07T09:47:45.135Z",
"conf": {},
"actionMethod": {
"method": "string",
"object": "string",
"parameters": {
"charge": "string",
"dlrError": "string",
"dlrStatus": "string"
}
},
"group": {
"id": 0,
"name": "string"
},
"langData": {
"id": "string",
"name": "string"
},
"tags": [
{
"id": 0,
"type": "system",
"name": "string"
}
]
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a campaign for a given campaign ID.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_STATUS_NOT_SUPPORTED | The given status is not supported. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ARCHIVED_STATUS_CANNOT_BE_CHANGED | The status of the archived campaign cannot be changed. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTIVE_DURATION_NOT_SUPPORTED | The given active duration value is not supported. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTIVE_DURATION_CANNOT_BE_UPDATED | The action duration can be changed only for active or inactive campaigns. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_NAME_IS_REQUIRED | The name is a required field and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_NAME_IS_TOO_LONG | The name cannot be longer than 255 characters. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_PRIORITY_NOT_SUPPORTED | The given priority value is not supported. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_LANG_LEN_NOT_EQ_2 | The lang field must have 2 characters. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_LANG_NOT_FOUND | Language not found. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTION_NOT_SUPPORTED | The given action value is not supported. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTION_METHOD_REQUIRED | The action method id required and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NOT_FOUND | Campaign group not found. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_CANNOT_BE_IGNORED | Only new campaigns can be ignored. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTIVE_UNTIL_DT_IS_REQUIRED | The value for the active until dt field is required and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTIVE_UNTIL_DT_NOT_VALID_FORMAT | The value for the active until dt field is not in the valid date-time format. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTIVE_UNTIL_DT_IS_FAR_IN_FUTURE | The given value for the active until dt field is in far in the future. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_ACTIVE_UNTIL_DT_IS_IN_PAST | The given value for the active until dt field cannot be in the past. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign ID. |
patch data (required) | object (body) | Data to update a campaign. |
Data Parameters
Patch data object example
{
"status": "active",
"activeDuration": "unlimited",
"activeUntilDt": "2023-07-25T12:54:52.547Z",
"action": "none",
"name": "string",
"priority": "low",
"lang": "st",
"groupId": 0,
"tags": [
{
"id": 0
}
],
"conf": {},
"actionMethod": {
"method": "string",
"object": "string",
"parameters": {
"charge": "string",
"dlrError": "string",
"dlrStatus": "string"
}
}
}
Responses
Code | Description | Links |
---|---|---|
200 | Campaign data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign data
{
"id": 0,
"msgHash": "string",
"instanceId": 0,
"msgType": "mt",
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-07T10:09:25.299Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"totalHits": 0,
"flags": "string",
"name": "string",
"insertDt": "2023-07-07T10:09:25.299Z",
"updateDt": "2023-07-07T10:09:25.299Z",
"status": "new",
"statusDt": "2023-07-07T10:09:25.299Z",
"action": "none",
"priority": "low",
"lang": "string",
"groupId": 0,
"activeDuration": "unknown",
"activeUntilDt": "2023-07-07T10:09:25.299Z",
"conf": {},
"actionMethod": {
"method": "string",
"object": "string",
"parameters": {
"charge": "string",
"dlrError": "string",
"dlrStatus": "string"
}
},
"group": {
"id": 0,
"name": "string"
},
"langData": {
"id": "string",
"name": "string"
},
"tags": [
{
"id": 0,
"type": "system",
"name": "string"
}
]
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a campaign for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_STATUS_NOT_SUPPORTED | The given status is not supported. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign ID. |
Responses
Code | Description | Links |
---|---|---|
204 | The campaign is deleted. | No links. |
default | Unexpected Error. | No links. |
Success Response 204: Campaign is deleted
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.2 CampaignStats
The Campaign Stats related endpoint.
Method Overview
The method returns statistical data of campaigns.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, msgHash, msgType, msgSender, msgText, msgDt, msgCoding, smsTotalParts, smsPart, totalHits, flags, name, insertDt, updateDt, status, statusDt, action, priority, lang, groupId, groupName, activeDuration, activeUntilDt, accountId, gateId, tagId.
|
Responses
Code | Description | Links |
---|---|---|
200 | Campaign statistical data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign statistical data
{
"totalCount": 0,
"totalClassified": 0,
"totalHits": 0
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.3 CampaignHasTag
The Campaign Has Tag related endpoint.
Method Overview
The method returns a list of campaign has tags data.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: campaignId, tagId, insertDt, tagType, tagName, campaignName, campaignMsgHash. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: campaignId, tagId, insertDt, tagType, tagName, campaignName, campaignMsgHash.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of campaign has tag data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of campaign has tag data
{
"data": [
{
"campaignId": 0,
"tagId": 0,
"insertDt": "2023-07-07T12:10:44.634Z",
"tagType": "system",
"tagName": "string",
"campaignName": "string",
"campaignMsgHash": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.4 CampaignExample
The Campaigns Example related endpoints.
Method Overview
The method returns a list of campaign examples.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, campaignId, campaignName, campaignMsgHash, msgSender, msgText, msgDt, msgCoding, smsTotalParts, smsPart, status, statusDt. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, campaignId, campaignName, campaignMsgHash, msgSender, msgText, msgDt, msgCoding, smsTotalParts, smsPart, status, statusDt.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of campaign examples. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of campaign examples
{
"data": [
{
"id": 0,
"campaignId": 0,
"campaignName": "string",
"campaignMsgHash": "string",
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-07T13:21:14.283Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"status": "active",
"statusDt": "2023-07-07T13:21:14.283Z"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a campaign example for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_EXAMPLE_NOT_FOUND | Campaign example not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign example ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Campaign example data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign example data
{
"id": 0,
"campaignId": 0,
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-07T13:29:01.849Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"status": "active",
"statusDt": "2023-07-07T13:29:01.849Z",
"campaign": {
"id": 0,
"name": "string",
"msgHash": "string"
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.5 AccountCounter
The Account Counter related endpoints.
Method Overview
The method returns a list of account counters.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, campaignId, campaignName, campaignMsgHash, accountId, accountName, accountAuthName, accountCnt, insertDt, updateDt, customerId, customerName, customerBriefName, countryId, countryName. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, campaignId, campaignName, campaignMsgHash, accountId, accountName, accountAuthName, accountCnt, insertDt, updateDt, customerId, customerName, customerBriefName, countryId, countryName.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of account counters. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of account counters
{
"data": [
{
"id": 0,
"campaignId": 0,
"campaignName": "string",
"campaignMsgHash": "string",
"accountId": 0,
"accountName": "string",
"accountAuthName": "string",
"accountCnt": 0,
"insertDt": "2023-07-07T13:31:17.242Z",
"updateDt": "2023-07-07T13:31:17.242Z",
"customerId": 0,
"customerName": "string",
"customerBriefName": "string",
"countryId": 0,
"countryName": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns an account counter for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_ACCOUNT_COUNTER_NOT_FOUND | Account counter not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Account counter ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Account counter data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Account counter data
{
"id": 0,
"campaignId": 0,
"accountId": 0,
"accountCnt": 0,
"insertDt": "2023-07-07T13:36:12.712Z",
"updateDt": "2023-07-07T13:36:12.712Z",
"campaign": {
"id": 0,
"name": "string",
"msgHash": "string"
},
"account": {
"id": 0,
"name": "string",
"authName": "string"
},
"customer": {
"id": 0,
"name": "string",
"briefName": "string"
},
"country": {
"id": 0,
"name": "string"
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.6 Account
The Account related endpoints.
Method Overview
The method returns a list of the accounts used in campaigns.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, name, authName, customerId, customerName, customerBriefName. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, name, authName, customerId, customerName, customerBriefName.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of accounts. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of accounts
{
"data": [
{
"id": 0,
"name": "string",
"authName": "string",
"customerId": 0,
"customerName": "string",
"customerBriefName": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns an account for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_ACCOUNT_NOT_FOUND | Account not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Account ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Account data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Account data
{
"id": 0,
"name": "string",
"authName": "string",
"customerId": 0,
"customerName": "string",
"customerBriefName": "string"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.7 CampaignGroup
The Campaign Group related endpoints.
Method Overview
The method creates a campaign group.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NAME_IS_REQUIRED | Name is a required field and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NAME_IS_TOO_LONG | The name cannot be longer than 60 characters. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NAME_IS_NOT_UNIQUE | The name is not unique |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NOT_FOUND | Campaign group not found. |
URL Parameters
Name | Type | Description |
---|---|---|
post data (required) | object (body) | Campaign group data. |
Data Parameters
Post data object example
{
"name": "string"
}
Responses
Code | Description | Links |
---|---|---|
201 | Campaign group is created. | No links. |
default | Unexpected Error. | No links. |
Success Response 201: Campaign group is created
{
"id": 0,
"instanceId": 0,
"name": "string",
"status": "active",
"statusDt": "2023-07-07T13:45:25.898Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a list of campaign groups.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, name, status, statusDt. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, name, status, statusDt.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of campaign groups. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of campaign groups
{
"data": [
{
"id": 0,
"instanceId": 0,
"name": "string",
"status": "active",
"statusDt": "2023-07-07T14:18:44.893Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a campaign group for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NOT_FOUND | Campaign group not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign group ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Campaign group data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign group data
{
"id": 0,
"instanceId": 0,
"name": "string",
"status": "active",
"statusDt": "2023-07-07T14:21:05.669Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method updates a campaign group for a given campaign group ID.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NOT_FOUND | Campaign group not found. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NAME_IS_REQUIRED | The name is a required field and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NAME_IS_TOO_LONG | The name cannot be longer than 60 characters. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NAME_IS_NOT_UNIQUE | The name is not unique. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign group ID. |
update data (required) | object (body) | Data to put. |
Data Parameters
Data object example
{
"name": "string"
}
Responses
Code | Description | Links |
---|---|---|
200 | Campaign group data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign group data
{
"id": 0,
"instanceId": 0,
"name": "string",
"status": "active",
"statusDt": "2023-07-07T14:25:06.827Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method deletes a campaign group identified by ID. A campaign group cannot be deleted if is in use.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NOT_FOUND | The campaign group is not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign group ID. |
Responses
Code | Description | Links |
---|---|---|
204 | The campaign group is deleted successfully. | No links. |
default | Unexpected Error. | No links. |
Success Response 204: Campaign group is deleted successfully
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method patches a campaign group for a given campaign group ID.
This endpoint supports patching the following fields: status.
Status cannot be changed from active to inactive if the campaign group is in use.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_NOT_FOUND | Campaign group not found. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_GROUP_STATUS_NOT_SUPPORTED | The given status is not supported. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign group ID. |
patch data (required) | object (body) | Data to update a campaign group. |
Data Parameters
Patch data object example
{
"status": "active"
}
Responses
Code | Description | Links |
---|---|---|
200 | Campaign group data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign group data
{
"id": 0,
"instanceId": 0,
"name": "string",
"status": "active",
"statusDt": "2023-07-07T14:38:19.446Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.8 CampaignTag
The Campaign Tag related endpoints.
Method Overview
The method creates a campaign tag.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NAME_IS_REQUIRED | Name is a required field and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NAME_IS_TOO_LONG | The name cannot be longer than 60 characters. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NAME_IS_NOT_UNIQUE | The name is not unique |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NOT_FOUND | Campaign tag not found. |
URL Parameters
Name | Type | Description |
---|---|---|
post data (required) | object (body) | Campaign tag data. |
Data Parameters
Post data object example
{
"name": "string"
}
Responses
Code | Description | Links |
---|---|---|
201 | Campaign tag is created. | No links. |
default | Unexpected Error. | No links. |
Success Response 201: Campaign tag is created
{
"id": 0,
"instanceId": 0,
"type": "system",
"name": "string",
"status": "active",
"statusDt": "2023-07-07T14:50:10.205Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a list of campaign tags.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, type, name, status, statusDt. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, type, name, status, statusDt.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of campaign tags. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of campaign tags
{
"data": [
{
"id": 0,
"instanceId": 0,
"type": "system",
"name": "string",
"status": "active",
"statusDt": "2023-07-07T14:52:54.967Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a campaign tag for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NOT_FOUND | Campaign tag not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign tag ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Campaign tag data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign tag data
{
"id": 0,
"instanceId": 0,
"type": "system",
"name": "string",
"status": "active",
"statusDt": "2023-07-10T09:36:02.807Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method updates a campaign tag for a given campaign tag ID. Only custom tags can be updated. The name of a tag that is in use, cannot be changed. The name of the system tags cannot be changed.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NOT_FOUND | Campaign tag not found. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NAME_IS_REQUIRED | The name is a required field and cannot be empty. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NAME_IS_TOO_LONG | The name cannot be longer than 60 characters. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NAME_IS_NOT_UNIQUE | The name is not unique. |
CAMPAIGN_DETECTOR_API_SYSTEM_CAMPAIGN_TAG_NAME_CANNOT_BE_CHANGED | The name cannot be changed for system tags. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign tag ID. |
update data (required) | object (body) | Data to put. |
Data Parameters
Data object example
{
"name": "string"
}
Responses
Code | Description | Links |
---|---|---|
200 | Campaign tag data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign tag data
{
"id": 0,
"instanceId": 0,
"type": "system",
"name": "string",
"status": "active",
"statusDt": "2023-07-10T09:43:37.804Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method deletes a campaign tag identified by ID. A campaign tag cannot be deleted if is in use. System tags cannot be deleted at all.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NOT_FOUND | Campaign tag not found. |
CAMPAIGN_DETECTOR_API_SYSTEM_CAMPAIGN_TAG_CANNOT_BE_DELETED | System campaign tag cannot be deleted. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign tag ID. |
Responses
Code | Description | Links |
---|---|---|
204 | The campaign tag is deleted successfully. | No links. |
409 | The campaign tag can not be deleted, because it's currently in use in some campaigns. | No links. |
default | Unexpected Error. | No links. |
Success Response 204: Campaign tag is deleted successfully
Error Response 409: Campaign tag cannot be deleted
{
"error": {
"code": "Invalid parameters",
"items": [
{
"name": "campaigns",
"message": "campaigns",
"description": "ID: 12221 Name: Facebook Campaign Msg Hash: d8a0425086c98e98a97885cdte0512cf9b092d8s; ID: 12221 Name: Twitter Campaign Msg Hash: 56a0425ddg698e98a97885cdte0512cf9b092d8s; "
}
]
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method patches a campaign tag for a given campaign tag ID.
This endpoint supports patching the following fields: status.
Status cannot be changed from active to inactive if the campaign tag is in use.
Authorization privilege needed for this endpoint:
- campaign-detector.manage.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_NOT_FOUND | Campaign tag not found. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_STATUS_NOT_SUPPORTED | The given status is not supported. |
CAMPAIGN_DETECTOR_API_CAMPAIGN_TAG_STATUS_SYSTEM_TYPE | The given status is not supported for system campaign tags. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Campaign tag ID. |
patch data (required) | object (body) | Data to update a campaign tag. |
Data Parameters
Patch data object example
{
"status": "active"
}
Responses
Code | Description | Links |
---|---|---|
200 | Campaign tag data. | No links. |
409 | The campaign tag can not to changed, because it's currently in use in some campaigns. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Campaign tag data
{
"id": 0,
"instanceId": 0,
"type": "system",
"name": "string",
"status": "active",
"statusDt": "2023-07-10T09:52:18.780Z",
"canBeDeleted": "yes",
"canBeInactive": "yes"
}
Error Response 409: Campaign tag cannot be changed
{
"error": {
"code": "Invalid parameters",
"items": [
{
"name": "campaigns",
"message": "campaigns",
"description": "ID: 12221 Name: Facebook Campaign Msg Hash: d8a0425086c98e98a97885cdte0512cf9b092d8s; ID: 12221 Name: Twitter Campaign Msg Hash: 56a0425ddg698e98a97885cdte0512cf9b092d8s; "
}
]
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.9 GateCounter
The Gate Counter related endpoints.
Method Overview
The method returns a list of gate counters.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, campaignId, campaignName, campaignMsgHash, gateId, gateName, gateCName, gateCnt, insertDt, updateDt, supplierId, supplierName, supplierBriefName, countryId, countryName. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, campaignId, campaignName, campaignMsgHash, gateId, gateName, gateCName, gateCnt, insertDt, updateDt, supplierId, supplierName, supplierBriefName, countryId, countryName.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of gate counters. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of gate counters
{
"data": [
{
"id": 0,
"campaignId": 0,
"campaignName": "string",
"campaignMsgHash": "string",
"gateId": 0,
"gateName": 0,
"gateCName": "string",
"gateCnt": 0,
"insertDt": "2023-07-10T11:00:57.138Z",
"updateDt": "2023-07-10T11:00:57.138Z",
"supplierId": 0,
"supplierName": "string",
"supplierBriefName": "string",
"countryId": 0,
"countryName": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a gate counter for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Gate counter ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Gate counter data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Gate counter data
{
"id": 0,
"campaignId": 0,
"gateId": 0,
"gateCnt": 0,
"insertDt": "2023-07-10T11:06:12.587Z",
"updateDt": "2023-07-10T11:06:12.587Z",
"campaign": {
"id": 0,
"name": "string",
"msgHash": "string"
},
"gate": {
"id": 0,
"name": "string",
"cname": "string"
},
"supplier": {
"id": 0,
"name": "string",
"briefName": "string"
},
"country": {
"id": 0,
"name": "string"
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.10 Gate
The Gate related endpoints.
Method Overview
The method returns a list of gates used in campaigns.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, name, cname, supplierId, supplierName, supplierBriefName. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, name, cname, supplierId, supplierName, supplierBriefName.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of gates. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of gates
{
"data": [
{
"id": 0,
"name": "string",
"cname": "string",
"supplierId": 0,
"supplierName": "string",
"supplierBriefName": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
Method Overview
The method returns a gate for a given ID.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
Errors
Name | Description |
---|---|
CAMPAIGN_DETECTOR_API_CAMPAIGN_GATE_NOT_FOUND | Campaign gate not found. |
URL Parameters
Name | Type | Description |
---|---|---|
id (required) | integer (path) | Gate ID. |
Responses
Code | Description | Links |
---|---|---|
200 | Gate data. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: Gate data
{
"id": 0,
"name": "string",
"cname": "string",
"supplierId": 0,
"supplierName": "string",
"supplierBriefName": "string"
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.11 TagLOV
The Tag LOV related endpoints.
Method Overview
The method returns a list of tags used in campaigns as list of values.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting fields: id, name, type. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: id, name, type.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of tags used in campaigns as list of values. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of tags used in campaigns as list of values.
{
"data": [
{
"id": 0,
"name": "string",
"type": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
3.12 CampaignMsgSender
The Campaign Msg Sender related endpoints.
Method Overview
The method returns a list of campaign msg senders used in campaigns.
Authorization privilege needed for this endpoint:
- campaign-detector.view.
This endpoint accepts query parameters for filtering data described on URL Filtering Guidelines page.
URL Parameters
Name | Type | Description |
---|---|---|
all | string (query) | Returns all data for given criteria. Available values: yes, no. Default value: no. |
page_size | integer (query) | Page size. Default value is 10. |
page_number | integer (query) | Page number. Default value is 1. |
paging | string (query) | Paging options. The format is: &paging=page_num,page_size. E.g. paging=1,10. |
sort | string (query) | Sorting options. The format is: sort=-attribute1,attribute2,-attribute3. Available sorting field: msgSender. |
operator(fieldName) | string (query) | Search criteria by using the following operators: isnull, isnotnull, isempty, isnotempty, eq, neq, startswith, contains, endswith, doesnotcontain, lt, lte, gt, gte, in, notin, between, notbetween, and the following attributes: msgSender.
|
Responses
Code | Description | Links |
---|---|---|
200 | List of campaign msg senders used in campaigns. | No links. |
default | Unexpected Error. | No links. |
Success Response 200: List of campaign msg senders used in campaigns
{
"data": [
{
"msgSender": "string"
}
],
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
}
Error Response Unexpected Error: Default
{
"Code": 0,
"Message": "string"
}
4. Data Models
Data Models define the structure of a JSON document.
4.1 Data
Data describe the data related to the Campaign Detector API.
GateCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of Gate objects. |
meta (required) | object | CollectionMeta object. |
Name | Type | Description |
---|---|---|
id | integer | Gate ID. |
name | string | Gate name. |
cname | string | Gate code name. |
supplierId | integer | Supplier ID. |
supplierName | string | Supplier name. |
supplierBriefName | string | Supplier brief name. |
JSON Example
{
"id": 0,
"name": "string",
"cname": "string",
"supplierId": 0,
"supplierName": "string",
"supplierBriefName": "string"
}
AccountCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of Account objects. |
meta (required) | object | CollectionMeta object. |
Name | Type | Description |
---|---|---|
id | integer | Account ID. |
name | string | Account name. |
authName | string | Account auth name. |
customerId | integer | Customer ID. |
customerName | string | Customer name. |
customerBriefName | string | Customer brief name. |
JSON Example
{
"id": 0,
"name": "string",
"authName": "string",
"customerId": 0,
"customerName": "string",
"customerBriefName": "string"
}
AccountCounterCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of AccountCounter objects. |
meta (required) | object | CollectionMeta object. |
AccountCounter object properties:
Name | Type | Description |
---|---|---|
id | integer | Account counter ID. |
campaignId | integer | Campaign ID. |
campaignName | string | Campaign name. |
campaignMsgHash | string | Campaign hash tag. |
accountId | integer | Account ID. |
accountName | string | Account name. |
accountAuthName | string | Account auth name. |
accountCnt | integer | Total hits per account. |
insertDt | string($date-time) | Date and time of creation. |
updateDt | string($date-time) | Date and time of update. |
customerId | integer | Customer ID. |
customerName | string | Customer name. |
customerBriefName | string | Customer brief name. |
countryId | integer | Country ID. |
countryName | string | Country name. |
AccountCounterGet object properties:
Name | Type | Description |
---|---|---|
id | integer | Account counter ID. |
campaignId | integer | Campaign ID. |
accountId | integer | Account ID. |
accountCnt | integer | Total hits per account. |
insertDt | string($date-time) | Date and time of creation. |
updateDt | string($date-time) | Date and time of update. |
campaign | object | CampaignRes object. |
account | object | AccountRes object. |
customer | object | CustomerRes object. |
country | object | CountryRes object. |
CampaignRes object properties:
Name | Type | Description |
---|---|---|
id | integer | Campaign ID. |
name | string | Campaign name. |
msgHash | string | Campaign hash tag. |
Name | Type | Description |
---|---|---|
id | integer | Account ID. |
name | string | Account name. |
authName | string | Account auth name. |
CustomerRes object properties:
Name | Type | Description |
---|---|---|
id | integer | Customer ID. |
name | string | Customer name. |
briefName | string | Customer brief name. |
Name | Type | Description |
---|---|---|
id | integer | Country ID. |
name | string | Country name. |
GateCounterCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of GateCounter objects. |
meta (required) | object | CollectionMeta object. |
GateCounter object properties:
Name | Type | Description |
---|---|---|
id | integer | Gate counter ID. |
campaignId | integer | Campaign ID. |
campaignName | string | Campaign name. |
campaignMsgHash | string | Campaign hash tag. |
gateId | integer | Gate ID. |
gateName | integer | Gate name. |
gateCName | string | Gate code name. |
gateCnt | integer | Total hits per gate. |
insertDt | string($date-time) | Date and time of creation. |
updateDt | string($date-time) | Date and time of update. |
supplierId | integer | Supplier ID. |
supplierName | string | Supplier name. |
supplierBriefName | string | Supplier brief name. |
countryId | integer | Country ID. |
countryName | string | Country name. |
GateCounterGet object properties:
Name | Type | Description |
---|---|---|
id | integer | Gate counter ID. |
campaignId | integer | Campaign ID. |
gateId | integer | Gate ID. |
gateCnt | integer | Total hits per gate. |
insertDt | string($date-time) | Date and time of creation. |
updateDt | string($date-time) | Date and time of update. |
campaign | object | CampaignRes object. |
gate | object | GateRes object. |
supplier | object | SupplierRes object. |
country | object | CountryRes object. |
Name | Type | Description |
---|---|---|
id | integer | Gate ID. |
name | string | Gate name. |
cName | string | Gate code name. |
SupplierRes object properties:
Name | Type | Description |
---|---|---|
id | integer | Supplier ID. |
name | string | Supplier name. |
briefName | string | Supplier brief name. |
CampaignTagCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of CampaignTagGet objects. |
meta (required) | object | CollectionMeta object. |
CampaignTagGet object properties:
Name | Type | Description |
---|---|---|
id | integer | Campaign tag ID. |
instanceId | integer | Instance ID. |
type | string | Tag type. Possible values: system, custom. |
name | string | Tag name. |
status | string | Campaign tag status. Possible values: active, inactive. |
statusDt | string($date-time) | Date and time of a status. |
canBeDeleted | string | If a campaign tag can be deleted. Possible values: yes, no. |
canBeInactive | string | This value is relevant only if the current status of the campaign tag is active. Possible values: yes, no. |
CampaignTagPost object properties:
Name | Type | Description |
---|---|---|
name (required) | string | maxLength: 60. The name must be unique. |
CampaignTagUpdate object properties:
Name | Type | Description |
---|---|---|
name | string | maxLength: 60. The name must be unique. The name of a tag that is in use, cannot be changed. |
CampaignTagPatch object properties:
Name | Type | Description |
---|---|---|
status | string | Status cannot be changed from active to inactive if the campaign tag is in use. Status can be changed only for custom tags. Possible values: active, inactive. |
CampaignGroupCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of CampaignGroupGet objects. |
meta (required) | object | CollectionMeta object. |
CampaignGroupGet object properties:
Name | Type | Description |
---|---|---|
id | integer | Campaign group ID. |
instanceId | integer | Instance ID. |
name | string | Campaign group name. |
status | string | Campaign group status. Possible values: active, inactive. |
statusDt | string($date-time) | Date and time of a status. |
canBeDeleted | string | If a campaign group can be deleted. Possible values: yes, no. |
canBeInactive | string | This value is relevant only if the current status of the campaign group is active. Possible values: yes, no. |
CampaignGroupPost object properties:
Name | Type | Description |
---|---|---|
name (required) | string | maxLength: 60. The name must be unique on the instance level. |
CampaignGroupUpdate object properties:
Name | Type | Description |
---|---|---|
name | string | maxLength: 60. The name must be unique on the instance level. |
CampaignGroupPatch object properties:
Name | Type | Description |
---|---|---|
status | string | Status cannot be changed from active to inactive if the campaign group is in use. Possible values: active, inactive. |
CampaignMsgSenderCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of CampaignMsgSender objects. |
meta (required) | object | CollectionMeta object. |
CampaignMsgSender object properties:
Name | Type | Description |
---|---|---|
msgSender | string | Campaign message sender. |
TagLovCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of TagLov objects. |
meta (required) | object | CollectionMeta object. |
Name | Type | Description |
---|---|---|
id | integer | TagLov ID. |
name | string | TagLov name. |
type | string | TagLov type. |
CampaignHasTagCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of CampaignHasTag objects. |
meta (required) | object | CollectionMeta object. |
CampaignHasTag object properties:
Name | Type | Description |
---|---|---|
campaignId | integer | Campaign ID. |
tagId | integer | Tag ID. |
insertDt | string($date-time) | Date and time of creation. |
tagType | string | Tag type. Possible values: system, custom. |
tagName | string | Tag name. |
campaignName | string | Campaign name. |
campaignMsgHash | string | Campaign hash tag. |
CampaignExampleCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of CampaignExample objects. |
meta (required) | object | CollectionMeta object. |
CampaignExample object properties:
Name | Type | Description |
---|---|---|
id | integer | Campaign example ID. |
campaignId | integer | Campaign ID. |
campaignName | string | Campaign name. |
campaignMsgHash | string | Campaign hash tag. |
msgSender | string | Campaign message sender. |
msgText | string | Campaign message text. |
msgDt | string($date-time) | Campaign message date and time. |
msgCoding | string | Campaign message coding. Possible values: gsm, unicode, binary, unknown. |
smsTotalParts | integer | Indicates if template represents a concatenated message or not. When value is > 0, then this is a concatenated message. |
smsPart | integer | It makes sense only if smsTotalParts > 0, i.e. 0 <= smsPart <= smsTotalParts. |
status | string | Possible value: active. |
statusDt | string($date-time) | Date and time of a status. |
CampaignExampleGet object properties:
Name | Type | Description |
---|---|---|
id | integer | Campaign example ID. |
campaignId | integer | Campaign ID. |
msgSender | string | Campaign message sender. |
msgText | string | Campaign message text. |
msgDt | string($date-time) | Campaign message date and time. |
msgCoding | string | Campaign message coding. Possible values: gsm, unicode, binary, unknown. |
smsTotalParts | integer | Indicates if template represents a concatenated message or not. When value is > 0, then this is a concatenated message. |
smsPart | integer | It makes sense only if smsTotalParts > 0, i.e. 0 <= smsPart <= smsTotalParts. |
status | string | Possible value: new, active, ignored, inactive, archived. |
statusDt | string($date-time) | Date and time of a status. |
campaign | object | CampaignRes object. |
JSON Example
{
"id": 0,
"campaignId": 0,
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-25T13:21:18.452Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"status": "active",
"statusDt": "2023-07-25T13:21:18.452Z",
"campaign": {
"id": 0,
"name": "string",
"msgHash": "string"
}
}
CampaignStats object properties:
Name | Type | Description |
---|---|---|
totalCount | integer | Total number of detected campaigns. |
totalClassified | integer | Total number of classified campaigns. |
totalHits | integer | Total number of messages. |
CampaignCollection object properties:
Name | Type | Description |
---|---|---|
data (required) | array | An array of Campaign objects. |
meta (required) | object | CollectionMeta object. |
Name | Type | Description |
---|---|---|
id | integer | Campaign ID. |
msgHash | string | Campaign hash tag. |
instanceId | integer | Instance ID. |
msgType | string | Possible values: mt, mo. |
msgSender | string | Campaign message sender. |
msgText | string | Campaign message text. |
msgDt | string($date-time) | Campaign message date and time. |
msgCoding | string | Campaign message coding. Possible values: gsm, unicode, binary, unknown. |
smsTotalParts | integer | Indicates if template represents a concatenated message or not. When value is > 0, then this is a concatenated message. |
smsPart | integer | It makes sense only if smsTotalParts > 0, i.e. 0 <= smsPart <= smsTotalParts. |
totalHits | integer | Total number of messages. |
flags | string | Campaign flags. |
name | string | Campaign name. |
insertDt | string($date-time) | Date and time of creation. |
updateDt | string($date-time) | Date and time of update. |
status | string | Possible value: new, active, ignored, inactive, archived. |
statusDt | string($date-time) | Date and time of a status. |
action | string | Action for a campaign to select. Possible value: none, silently-drop, reject-standard, reject-custom. |
priority | string | Priority for a campaign to set. Possible value: low, normal, high, critical. |
lang | string | Campaign language. |
langName | string | Language name. |
groupId | integer | Group ID. |
groupName | string | Group name. |
activeDuration | string | Campaign active duration. Possible value: unknown, unlimited, limited. |
activeUntilDt | string($date-time) | Campaign active until date and time. |
conf | object | CampaignConf object for additional campaign configuration data. |
actionMethod | object | CampaignActionMethod object. |
tags | array | An array of TagRes objects. |
JSON Example
{
"id": 0,
"msgHash": "string",
"instanceId": 0,
"msgType": "mt",
"msgSender": "string",
"msgText": "string",
"msgDt": "2023-07-07T09:47:45.135Z",
"msgCoding": "gsm",
"smsTotalParts": 0,
"smsPart": 0,
"totalHits": 0,
"flags": "string",
"name": "string",
"insertDt": "2023-07-07T09:47:45.135Z",
"updateDt": "2023-07-07T09:47:45.135Z",
"status": "new",
"statusDt": "2023-07-07T09:47:45.135Z",
"action": "none",
"priority": "low",
"lang": "string",
"groupId": 0,
"activeDuration": "unknown",
"activeUntilDt": "2023-07-07T09:47:45.135Z",
"conf": {},
"actionMethod": {
"method": "string",
"object": "string",
"parameters": {
"charge": "string",
"dlrError": "string",
"dlrStatus": "string"
}
},
"group": {
"id": 0,
"name": "string"
},
"langData": {
"id": "string",
"name": "string"
},
"tags": [
{
"id": 0,
"type": "system",
"name": "string"
}
]
}
CampaignActionMethod object properties:
Name | Type | Description |
---|---|---|
method | string | Campaign action method. |
object | string | Campaign action method object. |
parameters | object | CampaignActionMethodParameters object. |
CampaignActionMethodParameters object properties:
Name | Type | Description |
---|---|---|
charge | string | If the selected campaign action method should be charged. Possible values: yes, no. |
dlrError | string | DLR error for the selected action method. |
dlrStatus | string | DLR status. Possible values: undelivered, rejected. |
Name | Type | Description |
---|---|---|
id | integer | Campaign tag ID. |
type | string | Campaign tag type. Possible values: system, custom. |
name | string | Campaign tag name. |
CampaignPatch object properties:
Name | Type | Description |
---|---|---|
status | string | Campaign status. The status of the archived campaign cannot be changed. Possible value: active, ignored, inactive, archived. |
activeDuration | string | Use an activeUntilDt field if this value is equal to 'limited'. Use this only if the status is equal to active or inactive. Possible value: unlimited, limited. |
activeUntilDt | string | Campaign is active until set date and time. This value cannot be in the past and cannot be in the far future. |
action | string | Action for a campaign to select. Possible value: none, silently-drop, reject-standard, reject-custom. |
name | string | Campaign name. maxLength: 255. |
priority | string | Priority for a campaign to set. Possible value: low, normal, high, critical. |
lang | string | Language for a campaign to set. maxLength: 2. |
groupId | integer | Group ID. |
tags | array | An array of CampaignPatchTag objects. |
conf | object | CampaignPatchConf object for additional configuration data. |
actionMethod | object | CampaignActionMethod object. |
CampaignPatchTag object properties:
Name | Type | Description |
---|---|---|
id (required) | integer | Campaign tag ID. |
JSON Example
{
"status": "active",
"activeDuration": "unlimited",
"activeUntilDt": "2023-07-25T12:54:52.547Z",
"action": "none",
"name": "string",
"priority": "low",
"lang": "st",
"groupId": 0,
"tags": [
{
"id": 0
}
],
"conf": {},
"actionMethod": {
"method": "string",
"object": "string",
"parameters": {
"charge": "string",
"dlrError": "string",
"dlrStatus": "string"
}
}
}
CampaignGet object properties:
Name | Type | Description |
---|---|---|
id | integer | Campaign ID. |
msgHash | string | Campaign hash tag. |
instanceId | integer | Instance ID. |
msgType | string | Possible values: mt, mo. |
msgSender | string | Campaign message sender. |
msgText | string | Campaign message text. |
msgDt | string($date-time) | Campaign message date and time. |
msgCoding | string | Campaign message coding. Possible values: gsm, unicode, binary, unknown. |
smsTotalParts | integer | Indicates if template represents a concatenated message or not. When value is > 0, then this is a concatenated message. |
smsPart | integer | It makes sense only if smsTotalParts > 0, i.e. 0 <= smsPart <= smsTotalParts. |
totalHits | integer | Total number of messages. |
flags | string | Campaign flags. |
name | string | Campaign name. |
insertDt | string($date-time) | Date and time of creation. |
updateDt | string($date-time) | Date and time of update. |
status | string | Possible value: new, active, ignored, inactive, archived. |
statusDt | string($date-time) | Date and time of a status. |
action | string | Selected action for a campaign. Possible value: none, silently-drop, reject-standard, reject-custom. |
priority | string | Selected priority for a campaign. Possible value: low, normal, high, critical. |
lang | string | Campaign language. |
groupId | integer | Group ID. |
activeDuration | string | Campaign active duration. Possible value: unknown, unlimited, limited. |
activeUntilDt | string($date-time) | Campaign set date and time of active status. |
conf | object | CampaignConf object for additional campaign configuration data. |
actionMethod | object | CampaignActionMethod object. |
group | object | GroupGet object. |
langData | object | LangData object. |
tags | array | An array of TagRes objects. |
Name | Type | Description |
---|---|---|
id | integer | Group ID. |
name | string | Group name. |
Name | Type | Description |
---|---|---|
id | string | LangData ID. |
name | string | LangData name. |
Name | Type | Description |
---|---|---|
code (required) | integer($int32) | Error code. |
message (required) | string | Error message. |
JSON Example
{
"code": 0,
"message": "string"
}
4.2 Meta
Meta contains data for the number of rows and pages that have been received for a given API call.
CollectionMeta object properties:
Name | Type | Description |
---|---|---|
pagination (required) | object | CollectionMetaPagination object. |
CollectionMetaPagination object properties:
Name | Type | Description |
---|---|---|
total (required) | integer | Total number of rows. |
totalPages (required) | integer | Total number of pages. |
currentPage (required) | integer | The current page number. |
perPage (required) | integer | The maximum rows per page. |
count (required) | integer | A number of rows in the current page. |
JSON Example
"meta": {
"pagination": {
"total": 0,
"totalPages": 0,
"currentPage": 0,
"perPage": 0,
"count": 0
}
}
5. API Call Examples
This section presents a set of sample cURL API calls that shows some of use cases for the API.
Note: A domain is presented with placeholders as https://api{separator}{platform_domain}
, where {separator}
can be a dot (.) or a hyphen (-). Please, replace it with your actual platform domain name.
1. An example of how to get all new detected campaigns is given below:
curl 'https://api{separator}{platform_domain}/bulk/campaign-detector/v1/campaigns?sort=-insertDt&status=new&selectedTab=new' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer ACCESS_TOKEN'
2. An example of how to filter the campaigns results and get all campaigns with status 'Active' is given below:
curl 'https://api{separator}{platform_domain}/bulk/campaign-detector/v1/campaigns?sort=-insertDt&status=active&selectedTab=active' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer ACCESS_TOKEN'
3. An example of how to get all customer accounts used in a campaign with a given CAMPAIGN_ID is given below:
curl 'https://api{separator}{platform_domain}/bulk/campaign-detector/v1/account-counters?campaignId=CAMPAIGN_ID&sort=accountName' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer ACCESS_TOKEN'
4. An example of how to get all supplier gates used in a campaign with a given CAMPAIGN_ID is given below:
curl 'https://api{separator}{platform_domain}/bulk/campaign-detector/v1/gate-counters?campaignId=CAMPAIGN_ID&sort=gateName' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer ACCESS_TOKEN'
5. An example of how to set status to 'Active' and give a name to a new campaign with a given CAMPAIGN_ID is given below:
curl 'https://api{separator}{platform_domain}/bulk/campaign-detector/v1/campaigns/CAMPAIGN_ID' \
-X 'PATCH' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
--data-raw '{"status":"active","activeDuration":"unlimited","name":"CAMPAIGN_NAME","actionMethod":{"method":null,"object":null,"parameters":{"charge":null,"dlrError":null,"dlrStatus":null}}}'