Articles
Create article
POST - https://printenbind.nl/api/v1/orders/articles
Automatically creates a new order, and then creates and places a new article.
JSON Params
Property | Type | Description |
---|---|---|
product | String | The type of the product. A list of possible products can be found in the sidebar, under the header 'Articles' |
add_file_method | String | The type of file uploading used for this product. Possible values are: 'url', 'email', 'wetransfer' and 'upload'. |
filenames | String | The filenames that are going to be used for this product. The filenames have to exist within your 'Documents' folder, which you can find on your profile page. If multiple files are used, they are to be seperated by comma's. This is only mandatory when 'upload' is chosen as 'add_file_method'. |
file_url | String / Array | A link to a PDF document that is going to be used for this product. The URL has to contain the HTTP protocol that is used by given site. This is only mandatory when 'url' or 'wetransfer' is chosen as 'add_file_method'. When 'url' is chosen as 'add_file_method', the URL has to contain the HTTP or FTP protocol, and if an FTP URL is used the format of the FTP URL should be like 'ftp://path', the FTP credentials should be entered manually into your profile. If multiple file_urls are used, they are to be seperated by comma's. |
file_overwrite | Boolean | This is only mandatory when 'url' is chosen as 'add_file_method'. We will overwrite any document with the same filename. By default we will return a message that we use the document from our servers if the document already exists. |
... | The remaining mandatory keys for the chosen product. The mandatory and optional keys of a product can be found in the sidebar, by clicking one of the articles. |
Response
Returns a 201 CREATED
response, with as value of the location header the URI to the newly made article.
Response Example
date: Fri, 15 Dec 2017 13:13:37 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l x-ratelimit-remaining: 10 content-type: text/html location: orders/113/articles/106195 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 content-length: 0 status: 201 Created response-text:
Create article and add it to the given order ID
POST - https://printenbind.nl/api/v1/orders/{orderid}/articles
Creates and places a new article in the specified order.
JSON Params
Property | Type | Description |
---|---|---|
product | String | The type of the product. A list of possible products can be found in the sidebar, under the header 'Articles' |
add_file_method | String | The type of file uploading used for this product. Possible values are: 'email', 'wetransfer' and 'upload'. |
filenames | String | The filenames that are going to be used for this product. The filenames have to exist within your 'Documents' folder, which you can find on your profile page. If multiple files are used, they are to be seperated by comma's. This is only mandatory when 'upload' is chosen as 'add_file_method'. |
file_url | String / Array | A link to a PDF document that is going to be used for this product. The URL has to contain the HTTP protocol that is used by given site. This is only mandatory when 'wetransfer' is chosen as 'add_file_method' |
file_overwrite | Boolean | This is only mandatory when 'url' is chosen as 'add_file_method'. We will overwrite any document with the same filename. By default we will return a message that we use the document from our servers if the document already exists. |
... | The remaining mandatory keys for the chosen product. The mandatory and optional keys of a product can be found in the sidebar, by clicking one of the articles. |
Response
Returns a 201 CREATED
response, with as value of the location header the URI to the newly made article.
Response Example
date: Fri, 15 Dec 2017 13:13:37 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l x-ratelimit-remaining: 10 content-type: text/html location: orders/113/articles/106195 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 content-length: 0 status: 201 Created response-text:
Get articles
GET - https://printenbind.nl/api/v1/orders/{orderid}/articles
Returns all existing articles within a order.
Response
An Array
of article objects. Refer to Get article for the object structure of an article.
Response Example
date: Fri, 15 Dec 2017 13:14:06 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l transfer-encoding: chunked content-type: application/json x-ratelimit-remaining: 10 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=99 status: 200 OK response-text: [{"id":106195,"product":"boek","size":"a5","number":50,"color":"none","spine":"blanco","papertype_cover":"350","copies":8,"borderless":"1","printside":"double","papertype":"80","finishing":"garenloos inbinden","add_file_method":"upload","check_doc":"standard","creation_datetime":"2017-12-15 14:13:37"},{"id":106196,"product":"boek","size":"a5","number":50,"color":"none","spine":"blanco","papertype_cover":"350","copies":8,"borderless":"1","printside":"double","papertype":"80","finishing":"garenloos inbinden","add_file_method":"upload","check_doc":"standard","creation_datetime":"2017-12-15 14:14:00"}]
Get article
GET - https://printenbind.nl/api/v1/orders/{orderid}/articles/{articleid}
Returns a single article within a order.
Response
Property | Type | Description |
---|---|---|
id | Int | The unique ID of the article. |
product | String | The type of product that was selected. |
add_file_method | String | The type of file uploading used for this product. |
filenames | String | The filenames that are used for this product, seperated by comma. This is omitted if no filenames were specified. |
price_total | Float | The total price of this product, excluding tax |
total_tax | Float | The total amount of tax of this product. |
price_total_incl | Float | The total price of this product, including tax |
creation_datetime | Datetime | The date and time of when the article was created. |
... | The remaining specified keys for the chosen product. The mandatory and optional keys of a product can be found in the sidebar, by clicking one of the articles. |
Response Example
date: Fri, 15 Dec 2017 13:15:09 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l transfer-encoding: chunked content-type: application/json x-ratelimit-remaining: 10 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 status: 200 OK response-text: {"id":106196,"product":"boek","size":"a5","number":50,"color":"none","spine":"blanco","papertype_cover":"350","copies":8,"borderless":"1","printside":"double","papertype":"80","finishing":"garenloos inbinden","add_file_method":"upload","check_doc":"standard","creation_datetime":"2017-12-15 14:14:00"}
Update article
PUT - https://printenbind.nl/api/v1/orders/{orderid}/articles/{articleid}
Updates the information of an already existing article. Atleast one of the JSON parameters have to be specified.
JSON Params
Property | Type | Description |
---|---|---|
product | String | The type of the product. A list of possible products can be found in the sidebar, under the header 'Articles' |
... | The remaining mandatory keys for the chosen product. The mandatory and optional keys of a product can be found in the sidebar, by clicking one of the articles. |
Response
Returns an empty 204 NO CONTENT
response on success.
Response Example
date: Fri, 15 Dec 2017 13:15:35 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l x-ratelimit-remaining: 10 content-type: text/html location: orders/113/articles/106196 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 content-length: 0 status: 201 Created response-text:
Delete article
DELETE - https://printenbind.nl/api/v1/orders/{orderid}/articles/{articleid}
Deletes an article.
Response
Returns an empty 204 NO CONTENT
response on success.
Response Example
date: Fri, 15 Dec 2017 13:17:15 GMT x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 x-ratelimit-remaining: 10 server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l content-type: application/json status: 204 No Content response-text:
Get article status
GET - https://printenbind.nl/api/v1/orders/{orderid}/articles/{articleid}/status
Returns the production status of an article.
Response
The status of the article as a string.
Response Example
date: Fri, 15 Dec 2017 13:16:01 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l transfer-encoding: chunked content-type: application/json x-ratelimit-remaining: 10 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 status: 200 OK response-text: "aangemaakt"