Introduction
A CommunicationCollection (hence forth called a collection), is a collection of multiple CommunicationTemplates. Each collection can can have a parent collection, meaning that there is a recursive relation between communication collections. The idea is, that if a child does not have a template for a specific EventType, it will also have access to templates owned by the parent collection. The relation between the two entities can be seen in the diagram below.
Properties
Name |
Type |
Mandatory |
Default |
Example |
Description |
---|---|---|---|---|---|
communicationCollectionGuid |
STRING |
NO |
|
d68275c8-9b53-4167-a3cb-8b0e0a4c484a |
Unique GUID of the collection. |
merchantId |
STRING |
NO |
|
“onlinefundraising” |
The name of the Merchant who owns the collection. |
collectionName |
STRING |
YES |
|
“collection” |
The name of the collection. |
createdTs |
TIMESTAMP |
NO |
Current time value (now). |
2020-01-01 13:05:00 +0100 |
Time at which a collection was created. |
parentGuid |
STRING |
NO |
|
cf3d305b-f386-4fa0-ad8e-7c5e57a94ebd |
The GUID of the parent collection of the collection. |
editable |
BOOLEAN |
NO |
True |
true |
Defines whether or not the collection is editable. |
defaultCollection |
BOOLEAN |
NO |
False |
false |
Defines whether or not the collection is a default collection. |
Endpoints
GET/communicationCollections
Get a list of communicationCollections
Response
HTTP |
Description |
---|---|
200 |
OK |
HTTP 200 Example
[
{
"communicationCollectionGuid": "18c281b2-2efe-4765-8dc0-xxxxxxxxxxxx",
"merchantId": "onlinefundraising",
"collectionName": "Thank you",
"createdTs": "2019-07-10 14:53:54 +0200",
"parentGuid": "65b97165-0fe0-4161-ba16-xxxxxxxxxxxx",
"defaultCollection": false
},
{
"communicationCollectionGuid": "18c281b2-2efe-4765-8dc0-xxxxxxxxxxxx",
"merchantId": "onlinefundraising",
"collectionName": "Thank you very much!",
"createdTs": "2019-07-10 14:53:54 +0200",
"parentGuid": "65b97165-0fe0-4161-ba16-xxxxxxxxxxxx",
"defaultCollection": false
}
]
GET /communicationCollection/{communicationCollectionGuid}
Get a single communicationCollection
Response
HTTP |
Description |
---|---|
200 |
OK |
404 |
The collection was not found |
HTTP 200 Example
{
"communicationCollectionGuid": "18c281b2-2efe-4765-8dc0-xxxxxxxxxxxx",
"collectionName": "Thank you",
"createdTs": "2019-07-10 14:53:54 +0200",
"parentGuid": "65b97165-0fe0-4161-ba16-xxxxxxxxxxxx",
"defaultCollection": false
}
PUT /communicationCollection/{communicationCollectionGuid}
Updates a collection.
Request
The following is an example request body:
{
"collectionName": "Adam",
"parentGuid": null,
"editable": "true",
"defaultCollection": "false"
}
Response
HTTP |
Description |
---|---|
200 |
Updated |
400 |
Bad request |
404 |
Collection was not found |
HTTP 201 Example
{
"communicationCollectionGuid": "18369ccc-b53e-42c8-bc85-ba9b660e69b0",
"merchantId": "onlinefundraising",
"collectionName": "Test",
"createdTs": "2022-01-10 15:16:17",
"editable": true,
"defaultCollection": false
}
POST /communicationCollection
Create a collection.
Request
The following must be provided as the request body:
{
"collectionName": "collection"
}
Response
HTTP |
Description |
---|---|
201 |
Created |
400 |
Bad request |
HTTP 201 Example
{
"communicationCollectionGuid": "3ef8cbea-6a7b-4995-ad78-adc27069b5c3",
"merchantId": "1",
"collectionName": "collection",
"createdTs": "2022-01-14 11:19:25",
"editable": true,
"defaultCollection": false
}
DELETE /communicationCollection/{communicationCollectionGuid}
Deletes the collection specified in the url path.
Response
HTTP |
Description |
---|---|
200 |
OK |
400 |
The collection has children depending on it, so it could not be deleted |