Direct Order
Create direct order
POST - https://printenbind.nl/api/v1/orders/direct
Creates a direct order by making automatic requests to the endpoints /api/v1/orders/articles, /api/v1/delivery/{orderid} and /api/v1/orders/{orderid}/finish.
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. |
... | 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. | |
full_address | String | The full delivery address in the format of: [Full name] [Street name] [House number] [Postal code] [City]. Example: 'Printenbind \n Kabelweg 44A \n 1014BB Amsterdam' Note that the newlines are intended and required by the API to read the format. |
country | String | A valid ISO 3166-1 alpha-2 country code. |
delivery_method | String | The type of the delivery. Possible options are:
|
delivery_option | String | The sub type of the delivery. Not required if delivery_method is set to 'mailbox' or 'international'.
|
delivery_option_data | String | Extra data for the sub type of the delivery. Not required if delivery_option is set to 'local'. This option is optional for delivery_method 'parcel'.
|
blanco | Boolean | Whether to hide the sender address on the package. |
production_method | String | The type of the production. Possible values are: 'fast', 'standard', 'budget' |
Response
Returns a 201 CREATED
response, with as value of the location header the URI to the newly made order.
Response Example
date: Fri, 22 Dec 2017 11:32:13 GMT server: Apache/2.4.27 (Win32) PHP/7.1.9 OpenSSL/1.0.2l transfer-encoding: chunked content-type: application/json location: orders/113 x-ratelimit-remaining: 10 x-ratelimit-limit: 10 connection: Keep-Alive keep-alive: timeout=5, max=100 status: 201 CREATED response-text: