API – Zone and Interaction Point wrapper

Description
These APIs are used to perform CRUD operations on zones and interaction points.
Get All Zones
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/zones?page=0&size=10
Request Parameters
Parameters Description Default value
page

number, nth page to retrieve records.

0
size number of records per page. 10
Output
Table 1. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal/Server Error
Example: Content-Type: application/json
{
	"content": [  
		{ "description": "string", 
		  "id": 0, 
		  "interactionPoints": [ 
			{ "defaultString": "string", 
			  "description": "string", 
			  "id": 0, "name": "string"
			} 
		  ],
		 "learningMode": 0, 
		 "learningModelID": 0, 
		 "name": "string", 
		 "percentRandom": 0, 
		 "ruleGroupResolutionType": 0
		}
	],
	"page": { 
		"hasNext": true, 
		"hasPrev": true, 
		"pageNumber": 0, 
		"size": 0, 
		"totalElements": 0, 
		"totalPages": 0 
	}
}
Get a Zone by ID or Name
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/zones/{zoneIdOrName}
Output
Table 2. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal/Server Error
Example: Content-Type: application/json
{
  "description": "string",
  "id": 0,
  "interactionPoints": [
    {
      "defaultString": "string",
      "description": "string",
      "id": 0,
      "name": "string"
    }
  ],
  "learningMode": 0,
  "learningModelID": 0,
  "name": "string",
  "percentRandom": 0,
  "ruleGroupResolutionType": 0
}
Create
POST /Campaign/api/interact/rest/v2/channels/{icIdOrName}/zones
Input
Body Parameter – Content-Type: application/json
{
  "zones": [
    {
      "description": "string",
      "id": 0,
      "interactionPoints": [
        {
          "defaultString": "string",
          "description": "string",
          "id": 0,
          "name": "string"
        }
      ],
      "learningMode": 0,
      "learningModelID": 0,
      "name": "string",
      "percentRandom": 0,
      "ruleGroupResolutionType": 0
    }
  ]
}
Output
Table 3. Response Codes
Success 201 Created
Miscellaneous 207 Status code for batch request
Error 400 Bad request
Server Error 500 Internal server error
Example: Content-Type: application/json
[
    {
        "headers": {},
        "body": <entity>/<error-msg>,
        "status": 201/400/500
    }
]
Update
PUT /Campaign/api/interact/rest/v2/channels/{icIdOrName}/zones/{zoneName}
Input
Body Parameter – Content-Type: application/json
{
  "description": "string",
  "id": 0,
  "interactionPoints": [
    {
      "defaultString": "string",
      "description": "string",
      "id": 0,
      "name": "string"
    }
  ],
  "learningMode": 0,
  "learningModelID": 0,
  "name": "string",
  "percentRandom": 0,
  "ruleGroupResolutionType": 0
}
Output
Table 4. Response Codes
Success 202 Accepted
Error 400 Bad Request
Server Error 500 Internal/Server Error
Example: Content-Type: application/json
{
  "description": "string",
  "id": 0,
  "interactionPoints": [
    {
      "defaultString": "string",
      "description": "string",
      "id": 0,
      "name": "string"
    }
  ],
  "learningMode": 0,
  "learningModelID": 0,
  "name": "string",
  "percentRandom": 0,
  "ruleGroupResolutionType": 0
}
Delete a Zone or Interaction Points
DELETE /Campaign/api/interact/rest/v2/channels/{icIdOrName}/zones/{zoneIdOrName}

Request Parameters

Parameters Description Default value
onlyIP Delete only interaction points from zone. false
Output
Table 5. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal/Server Error
Delete Multiple Zones
DELETE /Campaign/api/interact/rest/v2/channels/{icIdOrName}/zones

Request Parameters

Parameters Description
ids Comma separated Zone IDs to be deleted.
Output
Table 6. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal/Server Error