REST API Access and documentation
directprint.io contains a number of REST JSON APIs for developers to use.
Developer documentation for the API here: https://directprint.io/apiDocs/
The API is disabled by default, you will need to generate an API key to use the API by visiting this section: https://directprint.io/admin/apiAccess
Check out the video tutorial here:
Using CSV / spreadsheets with directprint.io
Frequently, it's quicker to use a spreadsheet to manage data changes.
We built a web-based CSV <> JSON toolset to help convert data from spreadsheets (or raw CSV) into JSON for use with the directprint.io API.
The directprint.io CSV <> JSON tools automate the process of:
- Converting CSV data into JSON format (see API documentation)
- Selecting the correct REST verb (GET/POST/PUT/DELETE) for the API
- Attaching the API key to authorize API requests
- Handling requests and interpreting responses (success or fail, including partial success row-level errors)
- Formatting response data back into CSV for export.
Accessing the CSV<>JSON tooling
The tooling is accessible at: https://directprint.io/admin/tools/csv2json
Internally, the tooling uses our standard, documented REST API.
If the API is disabled, follow the link to enable it.
Example: Downloading, editing and uploading printer data using a spreadsheet
Step 1: Exporting the printer list
- Within the API navigator screen https://directprint.io/admin/tools/csv2json select the 'Printers' tab
- Click on 'List printers' it will highlight the table row.
- Click 'Prepare API request', you will then see a the 'Send API request' button activate, click 'Send API request'
- The API result window will fill with JSON formatted printer data.
- Click 'Convert JSON to CSV'
- Then click 'Download CSV'
Step 2: Editing data in the spreadsheet (e.g. Sheets or Excel)
A CSV of all printer data will be downloaded to your computer.
To edit an existing printer simply edit the printer's row in the spreadsheet
To create a new printer, create a new row without an ID (1st column entry), using the same column formats as above.
Step 3: Uploading your data
To upload your changes:
- Copy cell A1 to the bottom right of your data to the clipboard (select all data in your sheet)
- Within the API navigator screen https://directprint.io/admin/tools/csv2json select the 'Printers' tab
- Select 'Create/Update printers'
- In the text area entry named 'CSV input - include header row' paste your printer data from your spreadsheet
- Click on 'Prepare API request', this will convert your CSV pasted data to JSON format.
- Click on 'Send request to API'
- Your printers will have been updated/created in directprint.io
If you have any issues with the above, please contact support@directprint.io or book a 15 minute support session at https://directprint.io/calendar