Print Hub API Documentation

1. General API Information

Our RESTful API enables interaction with the Print Hub.


Setup and Requirements:

  • Generate API tokens from your dashboard
  • Use API tokens for authentication (see Authentication section).
  • Multiple companies may be associated with one account.


Responses:

  • All responses are in JSON format.
  • Standard HTTP status codes are used.


Common status codes:

Code Meaning
200 Success
201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Server Error

Error responses include details about the issue in JSON format.

2. Authentication

Our API uses token-based authentication.

Key points:

  • Tokens can be generated from the dashboard
  • Include the token in all API requests via the Authorization header:
Authorization: Bearer YOUR_API_TOKEN

Security notes:

  • Keep your token confidential.
  • Don't expose it in client-side code.
  • Contact support immediately if you suspect token compromise.
  • Tokens don't expire automatically.
  • We'll notify you if token regeneration is necessary.

For token rotation or authentication questions, contact our support team.

3. Company IDs

Companies can be created manually from the dashboard

Key points:

  • Company IDs are unique identifiers for your stores.
  • Company ID should be included in api calls if different from current/default company of that user.
  • Use the following parameter in your API calls:
Parameter Description
company_id Your company identifier

4. Order Endpoints

4.1 Create Order (POST)

Endpoint: https://print-hub.customiser.online/api/v1/orders
Creates a new order in the system.


Parameters

Parameter Required Type Description
company_id No string Your store identifier. If not provided default company is used
title No string Custom order title
template_config Yes string Template config generated from customiser. It's urlencoded json string
thumbnails Yes array Array of strings representing thumbnail URLs
dpi No int Custom DPI number. Default is 72
external_order_id No string Your custom order reference in your system
note No string Additional notes for the order


Response

A successful request will return the created order details.

{
  "order_id": "ORDER_ID"
}