ClientApi documentation

Client Api
https://clientapi.epublisher.world
Getting Started

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

dev@epublisher-world.com

Authentication

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
Editions

Magazines / publications are referred to as Editions

GET /datapackage/{id}
GET /edition/all/{storekey}
GET /edition/find/{startdate}/{enddate}
GET /edition/stores
Data Package
GET /datapackage/{id}

Authentication

Creator Login

This will output the packaged data to be saved locally

Path variables

id
string required

the edition id

Example:
48042

Responses

200 OK

Valid output, the data will be output

400 Bad Request

If anything is incorrect (wrong ID or not in account), the response will be a 400 Bad Request

Valid data package
GET https://clientapi.epublisher.world/datapackage/48042 HTTP/1.1 
All Editions
GET /edition/all/{storekey}

Authentication

Creator Login

This endpoint will retreive all editions for the given storekey for the authenticated account.

Path variables

storekey
string required

the storekey of editions to load or leave empty for main store

Responses

200 edition response
Body
Array of Edition Data
Examples
[
    {
        "Id": 1,
        "Title": "",
        "Description": "",
        "Thumbnail": "",
        "Price": 1,
        "Publicationdate": "2020-01-22T15:00:00Z",
        "Version": 1,
        "Pagecount": 1,
        "Storenames": [
            ""
        ],
        "Active": true,
        "Storekeys": [
            ""
        ],
        "Storeids": [
            1
        ],
        "WebID": "null or 1234abcdef",
        "pagedata": "",
        "articledata": "",
        "package_ios": "https://content.epublisher.world/Magazines/XXXXX//Resources/package/ios.zip",
        "package_android": "https://content.epublisher.world/Magazines/XXXXX//Resources/package/ios.zip"
    }
]
Find Editions
GET /edition/find/{startdate}/{enddate}

Authentication

Creator Login

Find editions that have a publication date between the given start- end end-date

Path variables

startdate
string required

date in format yyyy-mm-dd (eg 2001-12-25)

enddate
string required

date in format yyyy-mm-dd (eg 2001-12-25)

Responses

200 edition response
Body
Array of Edition Data
Examples
[
    {
        "Id": 1,
        "Title": "",
        "Description": "",
        "Thumbnail": "",
        "Price": 1,
        "Publicationdate": "2020-01-22T15:00:00Z",
        "Version": 1,
        "Pagecount": 1,
        "Storenames": [
            ""
        ],
        "Active": true,
        "Storekeys": [
            ""
        ],
        "Storeids": [
            1
        ],
        "WebID": "null or 1234abcdef",
        "pagedata": "",
        "articledata": "",
        "package_ios": "https://content.epublisher.world/Magazines/XXXXX//Resources/package/ios.zip",
        "package_android": "https://content.epublisher.world/Magazines/XXXXX//Resources/package/ios.zip"
    }
]
All Stores
GET /edition/stores

Authentication

Creator Login

Retreive all available stores for the logged in account

Responses

200 stores response
Body
Array of Store Data
Public Objects
Edition Data
Object
Id
integer

The main ID

Title
string

The title

Description
string

The (html) description

Thumbnail
string

The url for a thumbnail image

Price
number double

The price values (-1 in subscription only, 0=free, any valid double like 0.99 is a set price)

Publicationdate
string

The date of publication

Example:
2020-01-22T15:00:00Z
Version
integer

The version

Pagecount
integer

The amount of pages

Storenames
Array of string

An array of store names which the edition is published in

Active
boolean

The status, when false has been deleted

Storekeys
Array of string

similar to storenames, but the unique storekeys

Example:
0000000-0000-000-0000-000000000000
Storeids
Array of number

similar to storenames, but the actual ids

Example:
my store name in text
WebID
string

the id required for the webreader (or null if not available for web)

Example:
null or 1234abcdef
pagedata
string

list of pages

articledata
string

list of articles

package_ios
string

url to the ios data package (if setup for account)

Example:
https://content.epublisher.world/Magazines/XXXXX//Resources/package/ios.zip
package_android
string

url to the android data package (if setup for account)

Example:
https://content.epublisher.world/Magazines/XXXXX//Resources/package/ios.zip
Example 1
{
    "Id": 1,
    "Title": "",
    "Description": "",
    "Thumbnail": "",
    "Price": 1,
    "Publicationdate": "2020-01-22T15:00:00Z",
    "Version": 1,
    "Pagecount": 1,
    "Storenames": [
        ""
    ],
    "Active": true,
    "Storekeys": [
        ""
    ],
    "Storeids": [
        1
    ],
    "WebID": "null or 1234abcdef"
}
Store Data
Object
Id
integer

The ID

Title
string

The Title

Storekey
string

The unique ID for api connection

Ismain
boolean

When true, this is the main storekey for the account and can also be required for other api calls (there can be only 1 set to Ismain)

Example 1
Example 2
{
    "Id": 1,
    "Title": "An Awesome store name filled with editions",
    "Storekey": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "Ismain": true
}
{
    "Id": 32,
    "Title": "Another store in the same account",
    "Storekey": "aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa",
    "Ismain": false
}
Data items