Jilster API

Base URL

https://www.jilster.nl/api/v1
Authentication
POST /authenticate
POST /refresh
JSON Web Token (JWT)

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.

Using a token

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”.

Authenticate
POST /authenticate

Authentication

JWT

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
email
string required
password
string required
Examples
{
    "email": "user@jilster.com",
    "password": "abc123"
}

Responses

200 OK
Body
Object
token
string
Examples
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9sb2dpbmV4dGVybmFsIiwiaWF0IjoxNTAzOTI3MzAwLCJleHAiOjE1MDM5MjczNjAsIm5iZiI6MTUwMzkyNzMwMCwianRpIjoiQWd3WXN0d3cwcktzM0NwSyJ9.6xeTPTplwW35-aK_2KBNlzy0tZP6NPkr-X3JJnmO0q8"
}
401 Unauthorized
Body
Object
error
string
Examples
{
    "error": "Invalid credentials"
}
Refresh
POST /refresh

Authentication

JWT

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
token
string required
Examples
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9sb2dpbmV4dGVybmFsIiwiaWF0IjoxNTAzOTI3MzAwLCJleHAiOjE1MDM5MjczNjAsIm5iZiI6MTUwMzkyNzMwMCwianRpIjoiQWd3WXN0d3cwcktzM0NwSyJ9.6xeTPTplwW35-aK_2KBNlzy0tZP6NPkr-X3JJnmO0q8"
}

Responses

200 OK
Body
Object
token
string
Examples
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9qaWxzdGVyLmFwcC9yZWZyZXNoZXh0ZXJuYWwiLCJpYXQiOjE1MDM5MzEwNzEsImV4cCI6MTUwMzkzMTEzNCwibmJmIjoxNTAzOTMxMDc0LCJqdGkiOiJzQm1FejZpeUR0R1BoeHhRIn0.0LL2Ahk_PhlhFkn1Gzwla7vf9m58_SzAFd5DNBnLLj0"
}
401 Unauthorized
Body
Object
error
string
Examples
{
    "error": "Invalid credentials"
}
500 Internal Server Error
Body
Object
error
string
Examples
{
    "error": "Could not refresh token"
}
API methods
Magazines
GET /magazines
GET /magazines/{id}
GET /magazines/{id}/editors
POST /magazines
PUT /magazines/{id}
PUT /magazines/{id}/lock
PUT /magazines/{id}/chiefeditors
PUT /magazines/{id}/removeeditor
PUT /magazines/{id}/addpages
PUT /magazines/{id}/removepages
PUT /magazines/{id}/clearpages
PUT /magazines/{id}/sortpages
DELETE /magazines/{id}
Retrieve magazines
GET /magazines

Authentication

JWT

Request parameters

user_id
integer required

The id of the user to retrieve magazines for

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Array
Object
magazine
Object
id
string uuid
title
string
status
integer
pageCount
integer
showPageNumbers
integer
editorPreview
integer
lastContentChange
string date-time
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
magazineCover
Object
id
string uuid
magazine_id
string uuid
number
integer
type
integer
status
integer
content
string
chunkCount
integer
chunkVersion
integer
urlThumbnail
string
urlFullsize
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity

Required parameter not provided

Retrieve magazine
GET /magazines/{id}

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
string uuid
title
string
status
integer
showPageNumbers
integer
editorPreview
integer
pageCount
integer
lastContentChange
string date-time
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
magazineCover
Object
id
string uuid
magazine_id
string uuid
number
integer
type
integer
status
integer
content
string
chunkCount
integer
chunkVersion
integer
urlThumbnail
string
urlFullsize
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Retrieve magazine editors
GET /magazines/{id}/editors

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
chiefeditor
Object
cochiefeditors
Object
editors
Object
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create magazine
POST /magazines

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
title
string required

The magazine title

pageCount
string

The number of magazinepages to create

Default:
8

Responses

200 OK
Body
Object
success
boolean
data
Object
id
string uuid
title
string
status
integer
showPageNumbers
integer
editorPreview
integer
pageCount
integer
lastContentChange
string date-time
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
422 Unprocessable Entity

Required parameter not provided

Update magazine
PUT /magazines/{id}

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to update

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
title
string
status
integer
showPageNumbers
integer
editorPreview
integer
Examples
{
    "title": "Test Magazine",
    "status": 1,
    "showPageNumbers": 1,
    "editorPreview": 0
}

Responses

200 OK
Body
Object
success
boolean
data
Object
id
string uuid
title
string
status
integer
showPageNumbers
integer
editorPreview
integer
pageCount
integer
lastContentChange
string date-time
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Lock magazine
PUT /magazines/{id}/lock

Authentication

JWT

Path variables

id
string uuid required

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

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
lastContentChange
string date-time

Formatted as Y-m-d H:i:s

Examples
{
    "lastContentChange": "2018-12-06 09:50:00"
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

412 Precondition Failed
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Parameter 'pageCount' not divisible by 4"
}
{
    "success": false,
    "message": "Minimum number of pages is 4"
}
Update magazine chiefeditors
PUT /magazines/{id}/chiefeditors

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to update the chiefeditors for

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
chiefeditor_id
integer required

The id of the user that is chiefeditor for this magazine

cochiefeditor_ids
string

The comma-seperated id’s of the users that are cochiefeditors for this magazine

Examples
{
    "chiefeditor_id": 1,
    "cochiefeditor_ids": "3,7,11,24"
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Remove magazine editor
PUT /magazines/{id}/removeeditor

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to remove the editor from

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
editor_id
integer required

The id of the editor that is to be removed from the magazine

Examples
{
    "editor_id": 1
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Add magazinepages
PUT /magazines/{id}/addpages

Authentication

JWT

Path variables

id
string uuid required

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

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
pageCount
integer
Default:
4
Examples
{
    "pageCount": 4
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Parameter 'pageCount' not divisible by 4"
}
{
    "success": false,
    "message": "Maximum number of pages is 120"
}
Remove magazinepages
PUT /magazines/{id}/removepages

Authentication

JWT

Path variables

id
string uuid required

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

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
pageCount
integer
Default:
4
Examples
{
    "pageCount": 4
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Parameter 'pageCount' not divisible by 4"
}
{
    "success": false,
    "message": "Minimum number of pages is 4"
}
Clear magazinepages
PUT /magazines/{id}/clearpages

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to clear magazinepages in

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
pageCount
integer
Default:
4
Examples
{
    "pageCount": 4
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Parameter 'pageCount' not divisible by 4"
}
{
    "success": false,
    "message": "Minimum number of pages is 4"
}
Sort magazinepages
PUT /magazines/{id}/sortpages

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to sort the pages in

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
magazinepage_ids
string

The comma-seperated id’s of the magazinepages in the desired order

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Delete magazine
DELETE /magazines/{id}

Authentication

JWT

Path variables

id
string uuid required

The id of the magazine to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Magazinepages
GET /magazinepages
GET /magazinepages/{id}
PUT /magazinepages/{id}
PUT /magazinepages/{id}/editors
PUT /magazinepages/{id}/status
PUT /magazinepages/{id}/restore
Retrieve magazinepages
GET /magazinepages

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Request body

Object
user_id
integer required

The id of the user to retrieve magazinepages for

magazine_id
string uuid required

The id of the magazine to retrieve magazinepages from

preview
integer

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

200 OK
Body
Object
success
boolean
data
Array
Object
id
string uuid
magazine_id
string uuid
number
integer
type
integer
status
integer
content
string
chunkCount
integer
chunkVersion
integer
urlThumbnail
string
urlFullsize
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity

Required parameter not provided

Retrieve magazinepage
GET /magazinepages/{id}

Authentication

JWT

Path variables

id
string uuid required

The id of the magazinepage to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
string uuid
magazine_id
string uuid
number
integer
type
integer
status
integer
content
string
chunkCount
integer
chunkVersion
integer
urlThumbnail
string
urlFullsize
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Update magazinepage
PUT /magazinepages/{id}

Authentication

JWT

Path variables

id
string uuid required

The id of the magazinepage to update

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
status
integer
content
string
chunkCount
integer
chunkVersion
integer
Examples
{
    "status": 1,
    "content": "",
    "chunkCount": 1,
    "chunkVersion": 4
}

Responses

200 OK
Body
Object
success
boolean
data
Object
id
string uuid
magazine_id
string uuid
number
integer
type
integer
status
integer
content
string
chunkCount
integer
chunkVersion
integer
urlThumbnail
string
urlFullsize
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Update magazinepage editors
PUT /magazinepages/{id}/editors

Authentication

JWT

Path variables

id
string uuid required

The id of the magazinepage to update the editors for

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
editor_ids
string required

The comma-seperated id’s of the users that are editors for this magazinepage

Examples
{
    "editor_ids": "2,4,18,33"
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Update magazinepage status
PUT /magazinepages/{id}/status

Authentication

JWT

Path variables

id
string uuid required

The id of the magazinepage to update the status for

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
status
integer required

The status of the magazinepage

Examples
{
    "status": 1
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Restore magazinepage
PUT /magazinepages/{id}/restore

Authentication

JWT

Path variables

id
string uuid required

The id of the magazinepage to be restored

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
version
integer required

The version to be restored

Examples
{
    "version": 20170509173425
}

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Users
GET /users/{id}
GET /users/{email}
POST /users
PUT /users/{id}
DELETE /users/{id}
Retrieve user (by id)
GET /users/{id}

Authentication

JWT

Path variables

id
integer required

The id of the user to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
email
string
firstName
string
lastName
string
nickName
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Retrieve user (by email)
GET /users/{email}

Authentication

JWT

Path variables

email
string required

The email of the user to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
email
string
firstName
string
lastName
string
nickName
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create user
POST /users

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
email
string required
password
string required
firstName
string
lastName
string
nickName
string
Examples
{
    "email": "john.doe@jilster.nl",
    "password": "123abc"
    "firstName": "John",
    "lastName": "Doe",
    "nickName": "John Doe"
}

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
email
string
firstName
string
lastName
string
nickName
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
400 Bad Request
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "No email provided"
}
{
    "success": false,
    "message": "No password provided"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "User already exists"
}
Update user
PUT /users/{id}

Authentication

JWT

Path variables

id
string required

The id of the user to update

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
active
integer
email
string
password
string
firstName
string
lastName
string
nickName
string
Examples
{
    "active": 1,
    "email": "john.doe@jilster.nl",
    "password": "secret",
    "firstName": "John",
    "lastName": "Doe",
    "nickName": "John Doe"
}

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
email
string
firstName
string
lastName
string
nickName
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Delete user
DELETE /users/{id}

Authentication

JWT

Path variables

id
string required

The id of the magazine to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Documents
GET /documents/{id}
POST /documents
DELETE /documents/{id}
Retrieve document
GET /documents/{id}

Authentication

JWT

Path variables

id
string required

The id of the document to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
magazine_id
string uuid
active
integer
type
integer
fileName
string
urlThumbnail
string
urlFullsize
string
urlHighres
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create document
POST /documents

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required
type
integer
file
unknown required

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
magazine_id
string uuid
active
integer
type
integer
fileName
string
urlThumbnail
string
urlFullsize
string
urlHighres
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Delete document
DELETE /documents/{id}

Authentication

JWT

Path variables

id
string required

The id of the document to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Documentpages
GET /documentpages
GET /documentpages/{id}
DELETE /documentpages/{id}
Retrieve documentpages
GET /documentpages

Authentication

JWT

Request parameters

document_id
integer required
magazine_id
string uuid required
type
integer required

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Array
Object
id
integer
document_id
integer
active
integer
type
integer
pageNumber
integer
fileName
string
urlThumbnail
string
urlFullsize
string
urlHighres
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
Retrieve documentpage
GET /documentpages/{id}

Authentication

JWT

Path variables

id
string required

The id of the documentpage to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
document_id
integer
active
integer
type
integer
pageNumber
integer
fileName
string
urlThumbnail
string
urlFullsize
string
urlHighres
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Delete documentpage
DELETE /documentpages/{id}

Authentication

JWT

Path variables

id
string required

The id of the documentpage to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Imagedirectories
GET /imagedirectories
GET /imagedirectories/{id}
POST /imagedirectories
PUT /imagedirectories/{id}
DELETE /imagedirectories/{id}
Retrieve imagedirectories
GET /imagedirectories

Authentication

JWT

Request parameters

type
string required
magazine_id
string uuid optional

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Array
Object
id
integer
magazine_id
string uuid
active
integer
type
string
title
string
imageCount
integer
urlThumbnail
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity

Required parameter not provided

Retrieve imagedirectory
GET /imagedirectories/{id}

Authentication

JWT

Path variables

id
string required

The id of the imagedirectory to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
magazine_id
string uuid
active
integer
type
string
title
string
imageCount
integer
urlThumbnail
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create imagedirectory
POST /imagedirectories

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
magazine_id
string uuid
type
integer
title
string

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
magazine_id
string uuid
active
integer
type
string
title
string
imageCount
integer
urlThumbnail
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity

Required parameter not provided

Update imagedirectory
PUT /imagedirectories/{id}

Authentication

JWT

Path variables

id
string required

The id of the imagedirectory to update

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
magazine_id
string uuid
active
integer
type
string
title
string
imageCount
integer
urlThumbnail
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Delete imagedirectory
DELETE /imagedirectories/{id}

Authentication

JWT

Path variables

id
string required

The id of the imagedirectory to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Images
GET /images
GET /images/{id}
POST /images
PUT /images/{id}
PUT /images/{id}/move
PUT /images/{id}/crop
DELETE /images/{id}
Retrieve images
GET /images

Authentication

JWT

Request parameters

imagedirectory_id
integer required
type
integer required
magazine_id
string uuid optional

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Array
Object
id
integer
imagedirectory_id
integer
magazine_id
string uuid
active
integer
type
integer
fileName
string
url
string
urlThumbnail
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Retrieve image
GET /images/{id}

Authentication

JWT

Path variables

id
string required

The id of the image to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
imagedirectory_id
string
magazine_id
string uuid
active
integer
type
string
fileName
string
url
string
urlThumbnail
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create image
POST /images

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required
type
string
file
unknown required
imagedirectory_id
integer required

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
imagedirectory_id
integer
magazine_id
string uuid
active
integer
type
string
fileName
string
url
string
urlThumbnail
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Update image
PUT /images/{id}

Authentication

JWT

Path variables

id
string required

The id of the image to update

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
imagedirectory_id
integer
magazine_id
string uuid
active
integer
type
integer
fileName
string
url
string
urlThumbnail
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Move image
PUT /images/{id}/move

Authentication

JWT

Path variables

id
string required

The id of the image to move

Request parameters

imagedirectory_id
string optional

The id of the imagedirectory to move the image to

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
imagedirectory_id
integer
magazine_id
string uuid
active
integer
type
integer
fileName
string
url
string
urlThumbnail
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Crop image
PUT /images/{id}/crop

Authentication

JWT

Path variables

id
string required

The id of the image to crop

Request parameters

fileName
string optional

The fileName of the image to crop, used in combination with id = 0

left
integer optional

The left offset of the area to crop

top
integer optional

The top offset of the area to crop

width
integer optional

The width of the area to crop

height
integer optional

The height of the area to crop

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
imagedirectory_id
integer
magazine_id
string uuid
active
integer
type
integer
fileName
string
url
string
urlThumbnail
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Delete image
DELETE /images/{id}

Authentication

JWT

Path variables

id
string required

The id of the image to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Shapedirectories
GET /shapedirectories
GET /shapedirectories/{id}
POST /shapedirectories
PUT /shapedirectories/{id}
DELETE /shapedirectories/{id}
Retrieve shapedirectories
GET /shapedirectories

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Array
Object
id
integer
active
integer
title
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity

Required parameter not provided

Retrieve shapedirectory
GET /shapedirectories/{id}

Authentication

JWT

Path variables

id
string required

The id of the imagedirectory to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
title
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create shapedirectory
POST /shapedirectories

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

application/x-www-form-urlencoded

Request body

Object
title
string

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
title
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

422 Unprocessable Entity

Required parameter not provided

Update shapedirectory
PUT /shapedirectories/{id}

Authentication

JWT

Path variables

id
string required

The id of the imagedirectory to update

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
active
integer
title
string
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Delete shapedirectory
DELETE /shapedirectories/{id}

Authentication

JWT

Path variables

id
string required

The id of the imagedirectory to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Shapes
GET /shapes
GET /shapes/{id}
POST /shapes
PUT /shapes/{id}
DELETE /shapes/{id}
Retrieve shapes
GET /shapes

Authentication

JWT

Request parameters

shapedirectory_id
integer required

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Array
Object
id
integer
shapedirectory_id
integer
active
integer
content
string
type
integer
fileName
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

422 Unprocessable Entity

Required parameter not provided

Retrieve shape
GET /shapes/{id}

Authentication

JWT

Path variables

id
string required

The id of the shape to retrieve

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
shapedirectory_id
string
active
integer
type
string
content
string
fileName
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create shape
POST /shapes

Authentication

JWT

Request headers

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
file
unknown required
shapedirectory_id
integer required

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
shapedirectory_id
integer
active
integer
type
string
content
string
fileName
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Update shape
PUT /shapes/{id}

Authentication

JWT

Path variables

id
string required

The id of the shape to update

Request headers

Content-Type
string required

application/x-www-form-urlencoded

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
shapedirectory_id
integer
active
integer
type
integer
content
string
fileName
string
sortOrder
integer
created_at
string date-time
updated_at
string date-time
deleted_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Delete shape
DELETE /shapes/{id}

Authentication

JWT

Path variables

id
string required

The id of the shape to delete

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK

Operation executed successfully

401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Jobs
GET /jobs/{id}
POST /jobs/magazinepage/screenpdf
POST /jobs/magazinepage/printpdf
POST /jobs/magazine/screenpdf
POST /jobs/magazine/coverpdf
POST /jobs/magazine/printorder
Retrieve job
GET /jobs/{id}

Authentication

JWT

Path variables

id
string required

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

Request headers

Authorization
string required

Bearer <token>

Responses

200 OK
Body
Object
success
boolean
data
Object
id
integer
name
string
entity
string
entity_id
string
status
string
fileUrl
string
created_at
string date-time
updated_at
string date-time
message
string
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"
}
401 Unauthorized

Method for entity not accessible for current user

404 Not Found

Entity not found

Create magazinepage screen PDF
POST /jobs/magazinepage/screenpdf

Authentication

JWT

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

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required
magazinepage_id
string uuid required

Responses

202 Accepted
Body
Object
success
boolean
data
Object
job_id
integer
message
string
Examples
{
    "success": true,
    "data": {
        "job_id": 1
    },
    "message": "Job dispatched"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Create magazinepage print PDF
POST /jobs/magazinepage/printpdf

Authentication

JWT

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

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required
magazinepage_id
string uuid required

Responses

202 Accepted
Body
Object
success
boolean
data
Object
job_id
integer
message
string
Examples
{
    "success": true,
    "data": {
        "job_id": 1
    },
    "message": "Job dispatched"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Create magazine screen PDF
POST /jobs/magazine/screenpdf

Authentication

JWT

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

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required

Responses

202 Accepted
Body
Object
success
boolean
data
Object
job_id
integer
message
string
Examples
{
    "success": true,
    "data": {
        "job_id": 1
    },
    "message": "Job dispatched"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Create magazine cover PDF
POST /jobs/magazine/coverpdf

Authentication

JWT

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

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required

Responses

202 Accepted
Body
Object
success
boolean
data
Object
job_id
integer
message
string
Examples
{
    "success": true,
    "data": {
        "job_id": 1
    },
    "message": "Job dispatched"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Create magazine print order
POST /jobs/magazine/printorder

Authentication

JWT

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

Authorization
string required

Bearer <token>

Content-Type
string required

multipart/form-data; boundary=<boundary>

Content-Disposition
string required

form-data; name=“file”; filename="<filename>"

Request body

Object
magazine_id
string uuid required
order_id
integer required
proof
integer

Responses

202 Accepted
Body
Object
success
boolean
data
Object
job_id
integer
message
string
Examples
{
    "success": true,
    "data": {
        "job_id": 1
    },
    "message": "Job dispatched"
}
422 Unprocessable Entity
Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Required parameter not provided"
}
{
    "success": false,
    "message": "Type unsupported"
}
{
    "success": true,
    "message": "Invalid filetype"
}
{
    "success": true,
    "message": "Invalid filesize"
}
Common API responses
200 OK

Operation executed successfully

Body
Object
success
boolean
data
Array of unknown
message
string
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"
}
405 Method Not Allowed

Method not allowed

Body
Object
success
boolean
message
string
Examples
{
    "success": false,
    "message": "Method not allowed"
}
Common request headers