REST API reference
Two APIs live side by side: the WordPress REST veyop/v1 namespace (used by addons and the storefront) and a lighter portable API that powers the core admin single-page app.
The veyop/v1 namespace
Registered with native register_rest_route(), but gated behind one central dispatch — core fires a single veyop_register_rest_routes action from its own rest_api_init handler, and every addon registers its routes there instead of adding a separate rest_api_init hook of its own:
<?php
// plugins/my-addon/inc/api-endpoints.php
VeyopHooks::addAction('veyop_register_rest_routes', function () {
register_rest_route('veyop/v1', '/my-addon/settings', [
'methods' => 'GET',
'callback' => 'my_addon_get_settings',
'permission_callback' => 'my_addon_can_manage',
]);
});
Example addon routes
| Addon | Route | Purpose |
|---|---|---|
| Dynamic Pricing | GET/POST /veyop/v1/pricing/rules | List / create pricing rules. |
| Dynamic Pricing | POST /veyop/v1/pricing/rules/delete | Delete a pricing rule. |
| Dynamic Pricing | POST /veyop/v1/pricing/quote | Evaluate all applicable rules and return a price quote for a design. |
| Templates & Smart Layouts | GET/POST /veyop/v1/design-templates | List / create design templates. |
| Templates & Smart Layouts | GET /veyop/v1/design-templates/{id} | Fetch a single template. |
| Templates & Smart Layouts | GET /veyop/v1/design-templates/designer-config | Config payload the designer panel uses to list available templates. |
| Templates & Smart Layouts | GET /veyop/v1/design-templates/quick-config | Quick Personalization config for a given woo_product_id — drives the shop-grid panel. |
| Templates & Smart Layouts | GET/DELETE /veyop/v1/design-templates/assignment | Read or remove a template's assignment to a Woo product. |
| Templates & Smart Layouts | POST /veyop/v1/design-templates/assignment/mockup | Save a captured product mockup image for an assignment. |
| Templates & Smart Layouts | POST /veyop/v1/design-templates/{id}/assign | Assign a template to a Woo product (powers the Change Product flow). |
| Smart Configurator | GET /veyop/v1/smart-configurator/{product_id} | Fetch the option-to-layer mapping configuration for a product. |
| Smart Configurator | POST /veyop/v1/smart-configurator/apply | Apply a selected option's mapped layer changes to a design. |
| Print Queue | GET /veyop/v1/print-queue | List print queue jobs, filterable by state. |
| Print Queue | GET/POST /veyop/v1/print-queue/settings | Read / update hotfolder configuration. |
| Print Queue | POST /veyop/v1/print-queue/{id}/retry · /process | Retry or manually process a job. |
| Print Queue | GET /veyop/v1/print-queue/{id}/download/{type} | Download a job's artifact, ticket, or barcode (type = artifact | ticket | barcode). |
| Print Queue | POST /veyop/v1/print-queue/bulk-download | Bulk-download completed jobs as a ZIP. |
Portable admin API (api/v1/*)
The core admin single-page app is powered by a lighter, portable API — not the WordPress REST API — so the same admin UI can run against a future non-WordPress platform. These endpoints sit behind the platform services abstraction rather than register_rest_route().
| Resource | Covers |
|---|---|
fonts | Enabled Google Fonts and uploaded custom fonts. |
colors | The global color palette for text and cliparts. |
cliparts, categories | Clipart library and its categories. |
text_style_cards | Reusable text style presets. |
settings | General settings — custom CSS, sharing toggles, upload limits. |
customer_designs | Saved customer designs, for the admin design library. |
addons | GET /api/v1/addons (list + state), POST /api/v1/addons/state (enable/disable), POST /api/v1/addons/upload (install a ZIP). |
license | License key activation and status. |
dashboard | Admin dashboard summary data. |
icc_profiles | CMYK / print color profile management. |
media | Media upload handling used across the admin. |
printing, products | Printing method and product configuration data. |
Both APIs sit behind the same platform services facade (settings, database, routes, auth, etc. — see the requiresServices manifest field), so addons requesting the same services get consistent behavior whichever API style they use.
pricing/quote) are scoped to the current cart/session and re-validate everything server-side — never trust a price or design payload sent from the browser.
Addon package endpoints
| Endpoint | Contract |
|---|---|
GET /api/v1/addons | Installed version, source/trust metadata, latest official version, update availability, and update_delivery: my_orders. |
POST /api/v1/addons/upload | Multipart file; optional license_key, allow_unsigned_custom=1. Restore adds replace_custom=1 and expected_slug. |
POST /api/v1/addons/state | Explicit array of active addon directories. New uploads are not auto-activated. |
Official restore requires a trusted signed ZIP whose verified slug matches expected_slug. Paid Veyo slugs require their addon key or an Everything Bundle key. Third-party/free custom slugs do not require Lemon Squeezy.