Jilster API
Base URL
The authentication method used by the Jilster API is JSON Web Token (JWT). JWT is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed.
A JWT consist of three parts separated by dots, which are:
- Header
- Payload
- Signature
Example:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9sb2dpbiIsImlhdCI6MTUwMzkxODE0NSwiZXhwIjoxNTAzOTE4MjA1LCJuYmYiOjE1MDM5MTgxNDUsImp0aSI6Ikd1anZ1RnBmVFVqWnB6UlAifQ.uVLVN6X8eJOvbgZCtAhl1u11zbwom6kQaJRE-mxUhKs
Header
The header consists of two parts: the type of the token, which is JWT, and the hashing algorithm being used, such as HMAC SHA256 or RSA. Our JWTs are signed using a secret with the HMAC algorithm.
Example:
{
"typ": "JWT",
"alg": "HS256"
}
The header is Base64Url encoded to form the first part of the JWT.
Payload
The second part of the token is the payload, which contains the claims. Claims are statements about an entity (in our case, the user) and additional metadata. The claims used by our JWTs are: sub (subject), iss (issuer), iat (issued at), exp (expiration time), nbf (not before) and jti (JWT id).
Example:
{
"sub": 1,
"iss": "https://www.jilster.com/authenticate",
"iat": 1503918145,
"exp": 1503918205,
"nbf": 1503918145,
"jti": "sBmEz6iyDtGPhxxQ"
}
The payload is Base64Url encoded to form the second part of the JWT.
Signature
To create the signature part you have to take the encoded header, the encoded payload, a secret, the algorithm specified in the header, and sign that. In our case, the signature will be created in the following way:
HMACSHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
secret)
The signature is Base64Url encoded to form the third part of the JWT.
Acquiring
To be able to use the Jilster API, an account at the Jilster website is necessary. The registration page can be used to create an account. A token can be acquired by providing valid credentials to the Authenticate API method. The acquired token should be stored in the client side, either in a cookie, the localStorage or the sessionStorage.
Refreshing
A token is valid for 2 minutes, but is refreshable for 12 hours. The expiration date can be determined by decoding the token in the client side. If the token is expired, it can be refreshed by providing it to the Refresh API method. The acquired replacement token should again be stored in the client side, overwriting the expired token.
Including
All API calls except the ones to Authenticate and Refresh should include the token in the Authorization header using the Bearer schema. Example:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9sb2dpbiIsImlhdCI6MTUwMzkxODE0NSwiZXhwIjoxNTAzOTE4MjA1LCJuYmYiOjE1MDM5MTgxNDUsImp0aSI6Ikd1anZ1RnBmVFVqWnB6UlAifQ.uVLVN6X8eJOvbgZCtAhl1u11zbwom6kQaJRE-mxUhKs
Calling the API without including a token will result in the 400 error “Token not provided”.
Authentication
Request body
Examples
{
"email": "user@jilster.com",
"password": "abc123"
}
Responses
Body
Examples
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9sb2dpbmV4dGVybmFsIiwiaWF0IjoxNTAzOTI3MzAwLCJleHAiOjE1MDM5MjczNjAsIm5iZiI6MTUwMzkyNzMwMCwianRpIjoiQWd3WXN0d3cwcktzM0NwSyJ9.6xeTPTplwW35-aK_2KBNlzy0tZP6NPkr-X3JJnmO0q8"
}
Body
Examples
{
"error": "Invalid credentials"
}
Authentication
Request body
Examples
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9sb2dpbmV4dGVybmFsIiwiaWF0IjoxNTAzOTI3MzAwLCJleHAiOjE1MDM5MjczNjAsIm5iZiI6MTUwMzkyNzMwMCwianRpIjoiQWd3WXN0d3cwcktzM0NwSyJ9.6xeTPTplwW35-aK_2KBNlzy0tZP6NPkr-X3JJnmO0q8"
}
Responses
Body
Examples
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9yZWZyZXNoZXh0ZXJuYWwiLCJpYXQiOjE1MDM5MzEwNzEsImV4cCI6MTUwMzkzMTEzNCwibmJmIjoxNTAzOTMxMDc0LCJqdGkiOiJzQm1FejZpeUR0R1BoeHhRIn0.0LL2Ahk_PhlhFkn1Gzwla7vf9m58_SzAFd5DNBnLLj0"
}
Body
Examples
{
"error": "Invalid credentials"
}
Body
Examples
{
"error": "Could not refresh token"
}
{id}
{id}
/editors{id}
{id}
/lock{id}
/chiefeditors{id}
/removeeditor{id}
/addpages{id}
/removepages{id}
/clearpages{id}
/sortpages{id}
Authentication
Request parameters
The id of the user to retrieve magazines for
Responses
Body
Examples
{
"success": true,
"data": [
{
"magazine": {
"id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"title": "Test Magazine",
"status": 1,
"showPageNumbers": 1,
"editorPreview": 0,
"pageCount": 8,
"lastContentChange": "2016-10-12 12:01:30",
"created_at": "2016-06-12 12:35:43",
"updated_at": "2016-06-17 21:45:03",
"deleted_at": null
},
"magazineCover": {
"id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"number": 1,
"type": 1,
"status": 1,
"content": "",
"chunkCount": 1,
"chunkVersion": 4,
"urlThumbnail": "https:\/\/s3-eu-west-1.amazonaws.com\/php.jilster.nl\/production_pages\/bf98c980-c7f7-4eb7-97d2-26d5baf8771d\/png_thumbnail\/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"urlFullsize": "https:\/\/s3-eu-west-1.amazonaws.com\/php.jilster.nl\/production_pages\/bf98c980-c7f7-4eb7-97d2-26d5baf8771d\/png_fullsize\/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"created_at": "2017-04-07 23:48:39",
"updated_at": "2017-04-07 23:48:39",
"deleted_at": null
}
}
]
"message": "Magazines retrieved successfully"
}
{id}
Authentication
Path variables
The id of the magazine to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"title": "Test Magazine",
"status": 1,
"showPageNumbers": 1,
"editorPreview": 0,
"pageCount": 8,
"lastContentChange": "2016-10-12 12:01:30",
"created_at": "2016-06-12 12:35:43",
"updated_at": "2016-06-17 21:45:03",
"deleted_at": null,
"magazineCover": {
"id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"number": 1,
"type": 1,
"status": 1,
"content": "",
"chunkCount": 1,
"chunkVersion": 4,
"urlThumbnail": "https:\/\/s3-eu-west-1.amazonaws.com\/php.jilster.nl\/production_pages\/bf98c980-c7f7-4eb7-97d2-26d5baf8771d\/png_thumbnail\/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"urlFullsize": "https:\/\/s3-eu-west-1.amazonaws.com\/php.jilster.nl\/production_pages\/bf98c980-c7f7-4eb7-97d2-26d5baf8771d\/png_fullsize\/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"created_at": "2017-04-07 23:48:39",
"updated_at": "2017-04-07 23:48:39",
"deleted_at": null
}
}
"message": "Magazine retrieved successfully"
}
{id}
/editorsAuthentication
Path variables
The id of the magazine to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"chiefeditor": {
"id": 1,
"active": 1,
"email": "frank.amsterdam@jilster.nl",
"firstName": "Frank",
"lastName": "Amsterdam",
"nickName": "Frank",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-30 11:46:24",
"deleted_at": "2017-08-30 11:46:24"
},
"cochiefeditors": [{
"id": 1,
"active": 1,
"email": "frank.amsterdam@jilster.nl",
"firstName": "Frank",
"lastName": "Amsterdam",
"nickName": "Frank",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-30 11:46:24",
"deleted_at": "2017-08-30 11:46:24"
}],
"editors": [{
"id": 1,
"active": 1,
"email": "frank.amsterdam@jilster.nl",
"firstName": "Frank",
"lastName": "Amsterdam",
"nickName": "Frank",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-30 11:46:24",
"deleted_at": "2017-08-30 11:46:24"
}]
},
"message": "Magazine editors retrieved successfully"
}
Authentication
Request headers
Request body
The magazine title
The number of magazinepages to create
Responses
Body
Examples
{
"success": true,
"data": {
"id": "8e2eaade-7e0c-11e7-9d22-080027c30a85",
"title": "Test Magazine",
"status": 1,
"showPageNumbers": 1,
"editorPreview": 0,
"pageCount": 8,
"lastContentChange": "",
"created_at": "2017-08-10 22:43:24",
"updated_at": "2017-08-10 22:43:24",
"deleted_at": ""
},
"message": "Magazine created successfully"
}
{id}
Authentication
Path variables
The id of the magazine to update
Request headers
Request body
Examples
{
"title": "Test Magazine",
"status": 1,
"showPageNumbers": 1,
"editorPreview": 0
}
Responses
Body
Examples
{
"success": true,
"data": {
"id": "8e2eaade-7e0c-11e7-9d22-080027c30a85",
"title": "Test Magazine",
"status": 1,
"showPageNumbers": 1,
"editorPreview": 0,
"pageCount": 8,
"lastContentChange": "2016-10-12 12:01:30",
"created_at": "2017-08-10 22:43:24",
"updated_at": "2017-08-10 22:43:24",
"deleted_at": null
},
"message": "Magazine updated successfully"
}
{id}
/lockAuthentication
Path variables
The id of the magazine to remove magazinepages from
Notes
A magazine must always have a number of pages divisible by 4 for printing purposes. Because of that it is not allowed to remove a single page. This API method is used to delete pages instead of a DELETE to /magazinepages.
Request headers
Request body
Formatted as Y-m-d H:i:s
Examples
{
"lastContentChange": "2018-12-06 09:50:00"
}
Responses
Body
Examples
{
"success": false,
"message": "Parameter 'pageCount' not divisible by 4"
}
{
"success": false,
"message": "Minimum number of pages is 4"
}
{id}
/chiefeditorsAuthentication
Path variables
The id of the magazine to update the chiefeditors for
Request headers
Request body
The id of the user that is chiefeditor for this magazine
The comma-seperated id’s of the users that are cochiefeditors for this magazine
Examples
{
"chiefeditor_id": 1,
"cochiefeditor_ids": "3,7,11,24"
}
{id}
/removeeditorAuthentication
Path variables
The id of the magazine to remove the editor from
Request headers
Request body
The id of the editor that is to be removed from the magazine
Examples
{
"editor_id": 1
}
{id}
/addpagesAuthentication
Path variables
The id of the magazine to add magazinepages to
Notes
A magazine must always have a number of pages divisible by 4 for printing purposes. Because of that it is not allowed to add a single page. This API method is used to create pages instead of a POST to /magazinepages.
Request headers
Request body
Examples
{
"pageCount": 4
}
Responses
Body
Examples
{
"success": false,
"message": "Parameter 'pageCount' not divisible by 4"
}
{
"success": false,
"message": "Maximum number of pages is 120"
}
{id}
/removepagesAuthentication
Path variables
The id of the magazine to remove magazinepages from
Notes
A magazine must always have a number of pages divisible by 4 for printing purposes. Because of that it is not allowed to remove a single page. This API method is used to delete pages instead of a DELETE to /magazinepages.
Request headers
Request body
Examples
{
"pageCount": 4
}
Responses
Body
Examples
{
"success": false,
"message": "Parameter 'pageCount' not divisible by 4"
}
{
"success": false,
"message": "Minimum number of pages is 4"
}
{id}
/clearpagesAuthentication
Path variables
The id of the magazine to clear magazinepages in
Request headers
Request body
Examples
{
"pageCount": 4
}
Responses
Body
Examples
{
"success": false,
"message": "Parameter 'pageCount' not divisible by 4"
}
{
"success": false,
"message": "Minimum number of pages is 4"
}
{id}
/sortpagesAuthentication
Path variables
The id of the magazine to sort the pages in
Request headers
Request body
The comma-seperated id’s of the magazinepages in the desired order
{id}
Authentication
Path variables
The id of the magazine to delete
{id}
{id}
{id}
/editors{id}
/status{id}
/restoreAuthentication
Request body
The id of the user to retrieve magazinepages for
The id of the magazine to retrieve magazinepages from
Whether or not to include pages previews for editors. 0 for no and 1 for yes. The editorPreview attribute of the Magazine should be set to 1 for the preview to work.
Examples
{
"user_id": 1,
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d"
}
Responses
Body
Examples
{
"success": true,
"data": [
{
"id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"number": 1,
"type": 1,
"status": 1,
"content": "",
"chunkCount": 1,
"chunkVersion": 4,
"urlThumbnail": "https:\/\/s3-eu-west-1.amazonaws.com\/php.jilster.nl\/production_pages\/bf98c980-c7f7-4eb7-97d2-26d5baf8771d\/png_thumbnail\/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"urlFullsize": "https:\/\/s3-eu-west-1.amazonaws.com\/php.jilster.nl\/production_pages\/bf98c980-c7f7-4eb7-97d2-26d5baf8771d\/png_fullsize\/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"created_at": "2017-04-07 23:48:39",
"updated_at": "2017-04-07 23:48:39",
"deleted_at": null
}
],
"message": "Magazinepages retrieved successfully"
}
{id}
Authentication
Path variables
The id of the magazinepage to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"number": 1,
"type": 1,
"status": 1,
"content": "",
"chunkCount": 1,
"chunkVersion": 4,
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/png_thumbnail/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"urlFullsize": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/png_fullsize/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"created_at": "2017-04-07 23:48:39",
"updated_at": "2017-04-07 23:48:39",
"deleted_at": null
},
"message": "Magazinepage retrieved successfully"
}
{id}
Authentication
Path variables
The id of the magazinepage to update
Request headers
Request body
Examples
{
"status": 1,
"content": "",
"chunkCount": 1,
"chunkVersion": 4
}
Responses
Body
Examples
{
"success": true,
"data": {
"id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"number": 1,
"type": 1,
"status": 1,
"content": "",
"chunkCount": 1,
"chunkVersion": 4,
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/png_thumbnail/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"urlFullsize": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/png_fullsize/e4eaaaf2-d142-11e1-b3e4-080027620cdd.png",
"created_at": "2017-04-07 23:48:39",
"updated_at": "2017-04-07 23:48:39",
"deleted_at": null
},
"message": "Magazinepage updated successfully"
}
{id}
/editorsAuthentication
Path variables
The id of the magazinepage to update the editors for
Request headers
Request body
The comma-seperated id’s of the users that are editors for this magazinepage
Examples
{
"editor_ids": "2,4,18,33"
}
{id}
/statusAuthentication
Path variables
The id of the magazinepage to update the status for
Request headers
Request body
The status of the magazinepage
Examples
{
"status": 1
}
{id}
/restoreAuthentication
Path variables
The id of the magazinepage to be restored
Request headers
Request body
The version to be restored
Examples
{
"version": 20170509173425
}
{id}
{email}
{id}
{id}
{id}
Authentication
Path variables
The id of the user to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1,
"active": 1,
"email": "john.doe@jilster.nl",
"firstName": "John",
"lastName": "Doe",
"nickName": "John Doe",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-25 12:40:46",
"deleted_at": null
},
"message": "User retrieved successfully"
}
{email}
Authentication
Path variables
The email of the user to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1,
"active": 1,
"email": "john.doe@jilster.nl",
"firstName": "John",
"lastName": "Doe",
"nickName": "John Doe",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-25 12:40:46",
"deleted_at": null
},
"message": "User retrieved successfully"
}
Authentication
Request headers
Request body
Examples
{
"email": "john.doe@jilster.nl",
"password": "123abc"
"firstName": "John",
"lastName": "Doe",
"nickName": "John Doe"
}
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1,
"active": 1,
"email": "john.doe@jilster.nl",
"firstName": "John",
"lastName": "Doe",
"nickName": "John Doe",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-25 12:40:46",
"deleted_at": null
},
"message": "User created successfully"
}
Body
Examples
{
"success": false,
"message": "No email provided"
}
{
"success": false,
"message": "No password provided"
}
Body
Examples
{
"success": false,
"message": "User already exists"
}
{id}
Authentication
Path variables
The id of the user to update
Request headers
Request body
Examples
{
"active": 1,
"email": "john.doe@jilster.nl",
"password": "secret",
"firstName": "John",
"lastName": "Doe",
"nickName": "John Doe"
}
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1,
"active": 1,
"email": "john.doe@jilster.nl",
"firstName": "John",
"lastName": "Doe",
"nickName": "John Doe",
"created_at": "2015-01-01 00:30:00",
"updated_at": "2017-08-25 12:40:46",
"deleted_at": null
},
"message": "User updated successfully"
}
{id}
Authentication
Path variables
The id of the magazine to delete
{id}
{id}
{id}
Authentication
Path variables
The id of the document to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 63,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": 1,
"fileName": "5ba087a2-8d63-11e7-8166-080027c30a85.pdf",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/thumbnails/5bfa494a-8d63-11e7-93ed-080027c30a85.png",
"urlFullsize": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/fullsize/5bfa494a-8d63-11e7-93ed-080027c30a85.png",
"urlHighres": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/pages/5bfa494a-8d63-11e7-93ed-080027c30a85.png",
"created_at": "2017-08-30 11:12:34",
"updated_at": "2017-08-30 11:12:34",
"deleted_at": ""
},
"message": "Document retrieved successfully"
}
Authentication
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"id": 63,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": 1,
"fileName": "5ba087a2-8d63-11e7-8166-080027c30a85.pdf",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/thumbnails/5bfa494a-8d63-11e7-93ed-080027c30a85.png",
"urlFullsize": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/fullsize/5bfa494a-8d63-11e7-93ed-080027c30a85.png",
"urlHighres": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/pages/5bfa494a-8d63-11e7-93ed-080027c30a85.png",
"created_at": "2017-08-30 11:12:34",
"updated_at": "2017-08-30 11:12:34",
"deleted_at": ""
},
"message": "Document created successfully"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
{id}
Authentication
Path variables
The id of the document to delete
{id}
{id}
Authentication
Request parameters
Responses
Body
Examples
{
"success": true,
"data": [
{
"id": 188,
"document_id": 64,
"active": 1,
"type": 1,
"pageNumber": 1,
"fileName": "d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/thumbnails/d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"urlFullsize": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/fullsize/d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"urlHighres": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/pages/d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"created_at": "2017-08-30 12:06:04",
"updated_at": "2017-08-30 12:06:04",
"deleted_at": ""
}
],
"message": "Documentpages retrieved successfully"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{id}
Authentication
Path variables
The id of the documentpage to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 188,
"document_id": 64,
"active": 1,
"type": 1,
"pageNumber": 1,
"fileName": "d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/thumbnails/d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"urlFullsize": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/fullsize/d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"urlHighres": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_pdfdocuments/03542544-8332-11e7-9332-080027c30a85/pages/d34579be-8d6a-11e7-b4b1-080027c30a85.png",
"created_at": "2017-08-30 12:06:04",
"updated_at": "2017-08-30 12:06:04",
"deleted_at": ""
},
"message": "Documentpage retrieved successfully"
}
{id}
Authentication
Path variables
The id of the documentpage to delete
{id}
{id}
{id}
Authentication
Request parameters
Responses
Body
Examples
{
"success": true,
"data": [
{
"id": 109,
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"active": 1,
"type": "custom",
"title": "Images",
"imageCount": 136,
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/local_customimages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/thumbnails/1c4c6c82-6c58-11e7-a93a-080027c30a85.png",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
}
],
"message": "Imagedirectories retrieved successfully"
}
{id}
Authentication
Path variables
The id of the imagedirectory to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 109,
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"active": 1,
"type": "custom",
"title": "Images",
"imageCount": 136,
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/local_customimages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/thumbnails/1c4c6c82-6c58-11e7-a93a-080027c30a85.png",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
},
"message": "Imagedirectory retrieved successfully"
}
Authentication
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"id": 109,
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"active": 1,
"type": "custom",
"title": "Images",
"imageCount": 136,
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/local_customimages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/thumbnails/1c4c6c82-6c58-11e7-a93a-080027c30a85.png",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
},
"message": "Imagedirectory created successfully"
}
{id}
Authentication
Path variables
The id of the imagedirectory to update
Request headers
Responses
Body
Examples
{
"success": true,
"data": {
"id": 109,
"magazine_id": "bf98c980-c7f7-4eb7-97d2-26d5baf8771d",
"active": 1,
"type": "custom",
"title": "Images",
"imageCount": 136,
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/local_customimages/bf98c980-c7f7-4eb7-97d2-26d5baf8771d/thumbnails/1c4c6c82-6c58-11e7-a93a-080027c30a85.png",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
},
"message": "Imagedirectory updated successfully"
}
{id}
Authentication
Path variables
The id of the imagedirectory to delete
{id}
{id}
{id}
/move{id}
/crop{id}
Authentication
Request parameters
Responses
Body
Examples
{
"success": true,
"data": [
{
"id": 1465,
"imagedirectory_id": 123,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": "custom",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.jpg",
"url": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/thumbnails/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
}
],
"message": "Images retrieved successfully"
}
{id}
Authentication
Path variables
The id of the image to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"imagedirectory_id": 123,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": "custom",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.jpg",
"url": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/thumbnails/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Image retrieved successfully"
}
Authentication
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"imagedirectory_id": 123,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": "custom",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.jpg",
"url": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/thumbnails/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Image created successfully"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
{id}
Authentication
Path variables
The id of the image to update
Request headers
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"imagedirectory_id": 123,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": "custom",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.jpg",
"url": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/thumbnails/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Image updated successfully"
}
{id}
/moveAuthentication
Path variables
The id of the image to move
Request parameters
The id of the imagedirectory to move the image to
Request headers
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"imagedirectory_id": 123,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": "modified",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.jpg",
"url": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/thumbnails/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Image moved successfully"
}
{id}
/cropAuthentication
Path variables
The id of the image to crop
Request parameters
The fileName of the image to crop, used in combination with id = 0
The left offset of the area to crop
The top offset of the area to crop
The width of the area to crop
The height of the area to crop
Request headers
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"imagedirectory_id": 123,
"magazine_id": "03542544-8332-11e7-9332-080027c30a85",
"active": 1,
"type": "modified",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.jpg",
"url": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"urlThumbnail": "https://s3-eu-west-1.amazonaws.com/php.jilster.nl/production_customimages/03542544-8332-11e7-9332-080027c30a85/thumbnails/7848947e-877f-11e7-86e4-080027c30a85.jpg",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Image cropped successfully"
}
{id}
Authentication
Path variables
The id of the image to delete
{id}
{id}
{id}
Authentication
Responses
Body
Examples
{
"success": true,
"data": [
{
"id": 109,
"active": 1,
"title": "Shapes",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
}
],
"message": "Shapedirectories retrieved successfully"
}
{id}
Authentication
Path variables
The id of the imagedirectory to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 109,
"active": 1,
"title": "Shapes",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
},
"message": "Shapedirectory retrieved successfully"
}
Authentication
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"id": 109,
"active": 1,
"title": "Shapes",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
},
"message": "Shapedirectory created successfully"
}
{id}
Authentication
Path variables
The id of the imagedirectory to update
Request headers
Responses
Body
Examples
{
"success": true,
"data": {
"id": 109,
"active": 1,
"title": "Shapes",
"created_at": "2017-03-28 12:58:33",
"updated_at": "2017-03-28 12:58:33",
"deleted_at": ""
},
"message": "Shapedirectory updated successfully"
}
{id}
Authentication
Path variables
The id of the imagedirectory to delete
{id}
{id}
{id}
Authentication
Request parameters
Responses
Body
Examples
{
"success": true,
"data": [
{
"id": 1465,
"shapedirectory_id": 123,
"active": 1,
"type": "polygon",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 167 158.9\" style=\"enable-background:new 0 0 167 158.9;\" xml:space=\"preserve\">
<style type=\"text/css\">
.st0{fill:#DDF1FC;stroke:#7C8282;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;}
</style>
<polygon class=\"st0\" points=\"83.5,1.2 102.9,61 165.9,61 115,98 134.4,157.8 83.5,120.9 32.6,157.8 52,98 1.1,61 64.1,61 \"/>
</svg>",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.png",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
}
],
"message": "Shapes retrieved successfully"
}
{id}
Authentication
Path variables
The id of the shape to retrieve
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"shapedirectory_id": 123,
"active": 1,
"type": "polygon",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 167 158.9\" style=\"enable-background:new 0 0 167 158.9;\" xml:space=\"preserve\">
<style type=\"text/css\">
.st0{fill:#DDF1FC;stroke:#7C8282;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;}
</style>
<polygon class=\"st0\" points=\"83.5,1.2 102.9,61 165.9,61 115,98 134.4,157.8 83.5,120.9 32.6,157.8 52,98 1.1,61 64.1,61 \"/>
</svg>",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.png",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Shape retrieved successfully"
}
Authentication
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"shapedirectory_id": 123,
"active": 1,
"type": "polygon",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 167 158.9\" style=\"enable-background:new 0 0 167 158.9;\" xml:space=\"preserve\">
<style type=\"text/css\">
.st0{fill:#DDF1FC;stroke:#7C8282;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;}
</style>
<polygon class=\"st0\" points=\"83.5,1.2 102.9,61 165.9,61 115,98 134.4,157.8 83.5,120.9 32.6,157.8 52,98 1.1,61 64.1,61 \"/>
</svg>",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.png",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Shape created successfully"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
{id}
Authentication
Path variables
The id of the shape to update
Request headers
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1465,
"shapedirectory_id": 123,
"active": 1,
"type": "polygon",
"content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 167 158.9\" style=\"enable-background:new 0 0 167 158.9;\" xml:space=\"preserve\">
<style type=\"text/css\">
.st0{fill:#DDF1FC;stroke:#7C8282;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2;}
</style>
<polygon class=\"st0\" points=\"83.5,1.2 102.9,61 165.9,61 115,98 134.4,157.8 83.5,120.9 32.6,157.8 52,98 1.1,61 64.1,61 \"/>
</svg>",
"fileName": "7848947e-877f-11e7-86e4-080027c30a85.png",
"sortOrder": 1,
"created_at": "2017-08-22 23:18:47",
"updated_at": "2017-08-22 23:18:47",
"deleted_at": ""
},
"message": "Shape updated successfully"
}
{id}
Authentication
Path variables
The id of the shape to delete
{id}
{id}
Authentication
Path variables
The id of the job to retrieve
Notes
Only users with an administrator role are allowed to use this API method. A 401 response is sent to users that don’t have this role.
The possible values for the status are:
- dispatched
- processing
- processed
- failed
Responses
Body
Examples
{
"success": true,
"data": {
"id": 1,
"name": "CreateMagazineScreenPDF",
"entity": "magazine",
"entity_id": "3dea9ffc-9d28-11e7-a35a-080027c30a85",
"status": "processed",
"fileUrl": "https://s3.eu-west-1.amazonaws.com/php.jilster.nl/production_magazines/pdf_screen/3dea9ffc-9d28-11e7-a35a-080027c30a85.pdf",
"created_at": "2018-03-16 18:10:53",
"updated_at": "2018-03-16 18:12:40"
},
"message": "Job retrieved succesfully"
}
Authentication
Notes
Only users with an administrator role are allowed to use this API method. A 401 response is sent to users that don’t have this role.
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"job_id": 1
},
"message": "Job dispatched"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
Authentication
Notes
Only users with an administrator role are allowed to use this API method. A 401 response is sent to users that don’t have this role.
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"job_id": 1
},
"message": "Job dispatched"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
Authentication
Notes
Only users with an administrator role are allowed to use this API method. A 401 response is sent to users that don’t have this role.
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"job_id": 1
},
"message": "Job dispatched"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
Authentication
Notes
Only users with an administrator role are allowed to use this API method. A 401 response is sent to users that don’t have this role.
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"job_id": 1
},
"message": "Job dispatched"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
Authentication
Notes
Only users with an administrator role are allowed to use this API method. A 401 response is sent to users that don’t have this role.
Request headers
Request body
Responses
Body
Examples
{
"success": true,
"data": {
"job_id": 1
},
"message": "Job dispatched"
}
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
{
"success": false,
"message": "Type unsupported"
}
{
"success": true,
"message": "Invalid filetype"
}
{
"success": true,
"message": "Invalid filesize"
}
Operation executed successfully
Body
Examples
{
"success": true,
"data": [
"3e6e718c-0e3b-11e7-b1b3-080027c30a85",
"3d9deec0-184c-11e7-91e0-080027c30a85",
"311dfda2-1851-11e7-9f47-080027c30a85",
"6254a504-1853-11e7-b85a-080027c30a85"
],
"message": "Operation executed successfully"
}
Method for entity not accessible for current user
Body
Examples
{
"success": false,
"message": "Method for entity not accessible for current user"
}
Entity not found
Body
Examples
{
"success": false,
"message": "Entity not found"
}
Method not allowed
Body
Examples
{
"success": false,
"message": "Method not allowed"
}
Required parameter not provided
Body
Examples
{
"success": false,
"message": "Required parameter not provided"
}
Bearer <token>
application/x-www-form-urlencoded
multipart/form-data; boundary=<boundary>
form-data; name=“file”; filename="<filename>"