Introduction
The Calaméo API allows you to manage your Calaméo account from your own applications: publish documents, retrieve and update your publications, and manage the subscribers who can access your private publications.
Data model
The API handles the following objects:
- Account: your Calaméo account. See getAccountInfos.
- Folders: your account is organized in folders, which contain your publications. Folders are called "subscriptions" in the API method names (for example getSubscriptionInfos).
- Publications: the documents published on Calaméo. See the Publication object.
- Subscribers: readers who can access your private publications. Subscribers belong to a folder. See the Subscriber object.
- Subscribers DRM: the access rights granted to a subscriber: unit, period or series DRMs. See the Subscribers DRM objects.
Requests
All requests are sent to the API endpoint. Each request contains:
action: the name of the method to call, prefixed withAPI.(for exampleAPI.fetchAccountBooks). See the list of methods.apikey: your API public key.signature: the signature of the request. See How to sign your requests.expires(optional): UNIX timestamp (GMT) of the request expiration.output(optional): the format of the response, eitherXML(default),JSONorPHP.- The parameters specific to the method, described on each method page.
See a complete example request.
Responses
Every response is wrapped in a response object containing:
status:okif the request succeeded.content: the result of the method, when it returns data.requestid,versionandrequests: technical information about the request.
If the request fails, the response contains an error instead of the result. See Error codes.
Pagination
Methods that return lists (for example fetchAccountBooks) are paginated with the start and step parameters: start is the position of the first item (default 0) and step the number of items to return (50 maximum). The content of the response gives the total number of items, so that you can fetch the next pages.
Most lists can also be sorted with the order and way parameters. See Sorting.