REST API
All routes live under orravo-templates/v1 and require the manage_options capability (Orv_Tpl_REST::can_manage). Editing a specific post additionally requires edit_post on that post (can_manage_post).
Endpoints
GET /orravo-templates/v1/catalog
GET /orravo-templates/v1/catalog/{key}
POST /orravo-templates/v1/import
POST /orravo-templates/v1/import/{key}
GET /orravo-templates/v1/requirements/{key}
GET /orravo-templates/v1/template/{key}/sections
POST /orravo-templates/v1/template/{key}/page
POST /orravo-templates/v1/template/{key}/append/{post_id}
POST /orravo-templates/v1/sync
POST /orravo-templates/v1/cloud-optoutExamples
Fetch the merged catalog (bundled + cloud):
bashcurl -X GET \
-H 'X-WP-Nonce: <wp_rest nonce>' \
'https://your-site/wp-json/orravo-templates/v1/catalog'Import a template:
bashcurl -X POST \
-H 'X-WP-Nonce: <wp_rest nonce>' \
-H 'Content-Type: application/json' \
-d '{"key":"agency-northwind","status":"draft"}' \
'https://your-site/wp-json/orravo-templates/v1/import'Force a fresh cloud sync (bypasses the transient cache):
bashcurl -X POST -H 'X-WP-Nonce: <wp_rest nonce>' \
'https://your-site/wp-json/orravo-templates/v1/sync'Other plugins can bundle templates
The core init fires do_action( 'orv_tpl_ready' ). Hook in and add to the catalog via the orv_tpl_extra_paths filter.

