API - Category

Description
These APIs are used to perform CRUD operations on Categories.
Get All
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/categories?page=0&size=10
Parameters Values
page 0
size 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, 
		  "name": "string",
		  "systemDefined": true
		}
	],
	"page": { 
		"hasNext": true, 
		"hasPrev": true, 
		"pageNumber": 0, 
		"size": 0, 
		"totalElements": 0, 
		"totalPages": 0 
	}
}

Get
GET /Campaign/api/interact/rest/v2/channels/{icIdOrName}/categories/{categoryIdOrName}
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,
  "name": "string",
  "systemDefined": true
}
Create
POST /Campaign/api/interact/rest/v2/channels/{icIdOrName}/categories
Input
Body Parameter – Content-Type: application/json
{
  "categories": [
    {
      "description": "string",
      "id": 0,
      "name": "string",
      "systemDefined": true
    }
  ]
}
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}/categories/{categoryIdOrName}
Input
Body Parameter – Content-Type: application/json
{
  "description": "string",
  "id": 0,
  "name": "string",
  "systemDefined": true
}
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,
  "name": "string",
  "systemDefined": true
}
Delete
DELETE /Campaign/api/interact/rest/v2/channels/{icIdOrName}/categories/{categoryIdOrName}
Output
Table 5. Response Codes
Success 204 No Content
Error 400 Bad Request
Server Error 500 Internal/Server Error
Delete Multiple
DELETE /Campaign/api/interact/rest/v2/channels/{icIdOrName}/categories
Input
Body Parameter – Content-Type: application/json
{"ids":[0]}
Output
Table 6. Response Codes
Success 204 No Content
Error 400 Bad Request
Server Error 500 Internal/Server Error