Push content from external sources
Content sources
Add a new source
Description | Create a new source. A source created using API is automatically visible on all MailUp lists and to all the users who have access to the Content area on the web application |
---|---|
HTTP Method | POST |
URL | |
JSON request (example) | SourceName is the text displayed on the web application. It does not have to be unique and you can change it later IsEnabled should be set to false if you want to avoid automatic campaigns to be triggered when this source is updated { "SourceName": "mySource02", "IsEnabled": true } |
JSON response (example) | An error is returned if you set a null or empty SourceName. Save the returned IdSource value to manage this source or to push content in it. { "CreationDate": "2018-08-17 08:06:35Z", "IdSource": 902, "IsEnabled": true, "SourceName": "mySource02", "SourceType": 2, "UpdateDate": "2018-08-17 08:06:35Z" } |
Paging and filtering (example) |
|
Get all available sources
Description | Read all the available sources At the moment there is not a method to filter by source name. You need to retrieve a list of items and parse it |
---|---|
HTTP Method | GET |
URL | |
JSON request (example) | none |
JSON response (example) | |
Paging and filtering (example) | Pagination GET /Console/ContentProvider/Sources?pageSize={max_items} to limit the number of returned items. Default value is 20. GET /Console/ContentProvider/Sources?pageSize=1&pageNumber=0&orderby="UpdateDate ASC" to get the last modified item Sorting You can sort only by 'IdSource', 'UpdateDate', 'SourceName' (e.g. GET /Console/ContentProvider/Sources?orderby="idSource DESC" ) |
Update a source
Description | Update a source by changing its name or its status |
---|---|
HTTP Method | PUT |
URL | |
JSON request (example) | It is recommended you specify only the fields you want to change. "SourceName" cannot be empty or whitespace. { "IsEnabled": false } |
JSON response (example) | |
Paging and filtering (example) |
|
Remove a source
Description | Delete a source |
---|---|
HTTP Method | DELETE |
URL | |
JSON request (example) | none |
JSON response (example) | |
Paging and filtering (example) |
|
Content
Upload content
Description | Upload one or more content items |
---|---|
HTTP Method | POST |
URL | |
JSON request (example) |
|
JSON response (example) | When successful, a task ID is returned. Please note that content upload is an asynchronous task, hence a successful response does not guarantee that the upload is completed, especially for large content lists. { "IdActivity": 713 } |
Paging and filtering (example) |
|
Get content list
Description | Retrieve a list of content items related to a source |
---|---|
HTTP Method | GET |
URL | |
JSON request (example) | none |
JSON response (example) |
|
Paging and filtering (example) | Paging Default page size is 20, page numbers start with zero (e.g. GET /Console/ContentProvider/Sources/{source_id}/Content?pageSize=100&pagenumber=0) Sorting You can sort only by 'ContentKey', 'ContentLoadingDate', 'ContentDate', 'Title' (e.g. GET /Console/ContentProvider/Sources/{source_id}/Content?orderBy="ContentDate DESC" ) Filtering Search for items that match the provided input (e.g. GET /Console/ContentProvider/Sources/{source_id}/Content?searchBy="ContentKey"&searchText="1229c6d6" to get all the items whose ContentKey contains "1229c6d6" Concatenated conditions Use '&' to link together a series of conditions |