ClientApi documentation
Some basic information
- Unless communicated differently, the base url for all calls in this documentation is https://clientapi.epublisher.world
- All requests are case sensitive
- Every call fo this API must be authorized with the Creator username and password as Basic Auth headers or a token as Bearer Token header
- All calls are JSON based, unless something else is specifically mentioned
Revisions
- 2021 new documentation format
ePublisher
Contact: Eelco van Delft
All calls to the ClientAPI are done using Basic Auth with your Creator login or clientapi token
The login data is the same as your Creator username and password. Since version 1.2 we support the use if ClientApi tokens which can be sent as Bearer Token
- If this data is not known for your account, then please contact your sales manager.
- All login data is case sensitive
Articles info hier
{userid}
/{startdate}
/{enddate}
/{amount}
/{page}
{startdate}
/{enddate}
{storekey}
/{feedid}
{storekey}
/{feedid}
/{articleid}
{userid}
/{startdate}
/{enddate}
/{amount}
/{page}
Authentication
get all articles for the logged in account (or child account)
- amount and page are required
- When passing a userid, your Creator account needs to have access to the given userid, please check with your accountmanager, he will give you the userid if you do not already have it
- When using dates, always enter both start and end dates
- please keep in mind that longer date gaps and higher amounts will slow the responsetime of this call.
Path variables
when your account allows this, pass a child userid
when set, must be used with enddate
when set, must be used with startdate
amount of results per page
index of current page
get 50 items between 2020-01-01 and 2020-01-02 (1 returned)
GET https://clientapi.epublisher.world/articles/2020-01-01/2020-01-02/50/1 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"valid": true,
"pages": 0,
"pagesize": 50,
"page": 1,
"results": [
{
"id": 436015,
"issuedate": "20191121",
"title": "txt 1",
"author": "",
"content": "<p>HIGHLIGHTS</p><p>...text.</p>",
"intro": "",
"pagepreviewurl": "https://content.epublisher.world/Magazines/27733/background_1.jpg",
"pagenumber": 1,
"date": "2020-01-01T09:17:30",
"editiontitle": "test",
"editionid": 27733
}
]
}
get 10 articles for user_id 123
GET https://clientapi.epublisher.world/articles/123/10/1 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"valid": true,
"pages": 0,
"pagesize": 10,
"page": 1,
"results": [
{
"id": 436015,
"issuedate": "20191121",
"title": "txt 1",
"author": "",
"content": "<p>HIGHLIGHTS</p><p>...text.</p>",
"intro": "",
"pagepreviewurl": "https://content.epublisher.world/Magazines/27733/background_1.jpg",
"pagenumber": 1,
"date": "2020-01-01T09:17:30",
"editiontitle": "test",
"editionid": 27733
}
]
}
user has no access for user_id 111
GET https://clientapi.epublisher.world/articles/111/10/1 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"valid": false,
"pages": 0,
"pagesize": 0,
"page": 0,
"results": []
}
{startdate}
/{enddate}
Authentication
Instead of getting articles as article objects in the api, it is possible to get all the data archived per edition
This call will generate and link downloadable zip files with all the content, this might take some time to be completed
Path variables
Responses
GET https://clientapi.epublisher.world/articles/2019-05-15/2019-07-22 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
[
"https://content.epublisher.world/Generated/1234.zip",
"https://content.epublisher.world/Generated/1235.zip",
"https://content.epublisher.world/Generated/1236.zip"
]
{storekey}
/{feedid}
Authentication
Creating or adding articles is an open system.
This means that there is no preset format for the data that you post. This can be XML or a json string.
Path variables
unique identifier of the store to create the article in
unique identifier of the feed to create the article in
Request body
There is no set format for the body of this post Here are some samples of what could be possible, but this needs to be set validated and configured by your accountmanager When an item with the same ID already exists, this will be updated.
A very basic JSON object
POST https://clientapi.epublisher.world/article/{storekey}/{feedid} HTTP/1.1
Content-Type: application/json
{
"ID": 1,
"Title": "My lovely message",
"Text": "My lovely long text that can contain all kinds of long text and html",
"Date": "2020-01-01 12:12:12",
"Image" : "https://mysite.com/images/1.jpg"
}
A very basic XML object
<item>
<ID>1</ID>
<Title>My lovely message</Title>
<Text><![CDATA[My lovely long text that can contain all kinds og long text and html]]></Text>
<Date>2020-01-01 12:12:12</Date>
<Image>https://mysite.com/images/1.jpg</Image>
</item>
{storekey}
/{feedid}
/{articleid}
Authentication
Delete an article, based on the remote (non epublisher) ID, which is passed as articleid
Path variables
Responses
valid call, but article 123454321 not found returns 0 updated items
GET https://clientapi.epublisher.world/deletearticle//90eee79f-46ee-4f7c-b75f-ce016a4f4bc6/2/123454321 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: text/plain
0
valid call, but article 123454321 found and updated 1 item
GET https://clientapi.epublisher.world/deletearticle//90eee79f-46ee-4f7c-b75f-ce016a4f4bc6/2/123454321 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: text/plain
1
{
"id": 436015,
"issuedate": "20191121",
"title": "txt 1",
"author": "",
"content": "<p>HIGHLIGHTS</p><p>Korte berichten uit praktijk, wetenschap en onderzoek</p><p>Vlerick</p><p>VLERICK van wind- en zonnestroomparken.</p>",
"intro": "",
"pagepreviewurl": "https://content.epublisher.world/Magazines/27733/background_1.jpg",
"pagenumber": 1,
"date": "2019-10-25T09:17:30",
"editiontitle": "test knowly",
"editionid": 27733
}
Body
returns if response is valid (data was found and the user has access)
amount of pages with results
amount of items per page
current page
array of articles