Print farm quickstart
The print farm API lets a production partner read the orders allocated to its farm, report their progress, and read the products, stocks and materials it produces.
The print farm API keeps the conventions it was built with: numbered pages instead of cursors, and its own error body. Its ids and field names are its own too, so the conventions in the designer and integrator guides do not apply here.
The base URL
Every path starts with /v1/print-farm. The examples read the API base URL from DAPI_API_URL and your key from DAPI_API_KEY.
export DAPI_API_URL="<the API base URL>"
export DAPI_API_KEY="<your API key>"All requests and responses are JSON over HTTPS.
API keys and permissions
Send an API key in the x-api-key header. Keys are created in the print farm dashboard. Each operation needs one of the permissions it lists; a key with FULL has them all.
Permissions: READ_ORDERS, WRITE_ORDERS, SKU, READ_STOCK, WRITE_STOCK, FULL.
Create and revoke keys on the API keys page of your dashboard. Keep them on your server.
Make your first request
List your orders returns the orders allocated to your farm, newest first. It is the quickest way to check that a key works.
curl "https://public-api.dapi.digital/v1/print-farm/orders" \
-H "x-api-key: $DAPI_API_KEY"Pages
Lists are numbered pages. Ask for one with these query parameters:
- pageinteger
1-based page index.
- page_sizeinteger
Page size (max 100).
Next to the items, a list response says where you are:
- pagenumber
Page number returned, matching the
pagequery parameter. - page_sizenumber
Number of items per page, matching the
page_sizequery parameter. - totalnumber
Total number of orders across all pages (after filters are applied).
Errors
Errors have the body { "statusCode", "error", "message" }. message is a string, or a list of strings when the request failed validation.
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid or inactive API key."
}Rate limits
Requests are limited to 500 per 60-second window per API key. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.