Appearance
Templates API โ
Create and manage templates (the saved configurations rendered by [wp_social_ninja]), and read/update their per-platform meta for reviews and feeds.
Base URL: https://your-site.com/wp-json/wpsocialreviews/v2
Policy: TemplatePolicy
List Templates โ
GET/templatesHandler: TemplatesController@index
Parameters โ
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
exclude_woocommerce | bool | query | No | Exclude WooCommerce templates |
templateType | string | query | No | Filter by type |
search | string | query | No | Search text |
filter | string | query | No | Additional filter |
Response โ
json
{
"message": "success",
"connected_platform_sections": {},
"all_valid_platforms": {},
"items": { "data": [], "total": 0 },
"total_items": 0
}Create ยท Duplicate ยท Delete ยท Rename โ
| Action | Method | Endpoint | Handler | Inputs | Response |
|---|---|---|---|---|---|
| Create | POST | /templates | @create | platform, onboarding, form_id, form_type | { "template_id": 55 } |
| Duplicate | POST | /templates/duplicate | @duplicate | ids[] | { "message", "item", "item_id" } |
| Delete | DELETE | /templates | @delete | ids[] | { "message" } |
| Rename | PUT | /templates/title/{id} | @updateTitle | path {id}, template_title | { "message", "title", "id", "result" } |
Reviews Template Meta โ
Nested under /templates/meta/reviews. Handler: Platforms/Reviews/MetaController.
Load editor data โ
GET/templates/meta/reviews/{id}GET /templates/meta/reviews/{id}/first-round/{isFirstRound}Initial load for the review-template editor. Returns a large payload:
json
{
"message": "...",
"template_id": 55,
"business_info": {},
"filtered_reviews": [],
"template_details": {},
"template_meta": {},
"country_list": [],
"post_types": [],
"all_business_info": {},
"categories": [],
"elements": {},
"errors": [],
"resized_images": {},
"image_settings": {},
"needs_immediate_update": false,
"can_enable_ai_summary": true,
"review_forms": []
}Other reviews-meta endpoints โ
| Method | Endpoint | Handler | Inputs | Response |
|---|---|---|---|---|
| GET | /templates/meta/reviews/{id}/can-enable-ai-summary | @canUserEnableAISummary | path {id} | { "can_enable": true, "message" } |
| PUT | /templates/meta/reviews/{id} | @update | path {id}, template_meta (JSON) | { "message", "template_id", "template_meta" } |
| POST | /templates/meta/reviews/{id}/edit | @edit | path {id}, template_meta | Live-preview recompute (filtered_reviews, business_info, resize_data, โฆ) |
| POST | /templates/meta/reviews/{id}/load-more | @loadMore | path {id}, page, template_meta | { "message", "reviews", "has_more", "current_page", "total_reviews" } |
Feeds Template Meta โ
Nested under /templates/meta/feeds. Handler: Platforms/Feeds/MetaController. These fire the feed platform's *_editor_settings_{platform} actions; the response body is produced by the platform handler.
| Method | Endpoint | Handler | Inputs |
|---|---|---|---|
| GET | /templates/meta/feeds/{id} | @index | path {id}, platform, postType |
| PUT | /templates/meta/feeds/{id} | @update | path {id}, platform, settings (JSON) |
| POST | /templates/meta/feeds/{id}/edit | @edit | path {id}, platform, settings (JSON) |

