Appearance
Platforms API โ
Manage which platforms are enabled, read connection statuses and dashboard notices, activate companion plugins, and handle the review/feed connection (OAuth) flow.
Base URL: https://your-site.com/wp-json/wpsocialreviews/v2
Policy: PlatformPolicy (applies to every endpoint on this page)
List Platforms โ
GET/platformsReturn the list of all valid platforms.
Handler: PlatformController@index
Response โ
json
{
"message": "success",
"platforms": { "google": { }, "facebook": { } }
}Example โ
bash
curl -X GET "https://example.com/wp-json/wpsocialreviews/v2/platforms" \
-H "X-WP-Nonce: <nonce>" --cookie "wordpress_logged_in_xxx=..."Enabled Platforms โ
GET/platforms/enabledReturn the enabled platform map (reviews + feeds, plus a social_wall key) and any admin error notices.
Handler: PlatformController@enabledPlatforms
Response โ
json
{
"notices": [],
"platforms": { "reviews": {}, "feeds": {}, "social_wall": {} }
}Get Statuses โ
GET/platforms/get-statusesRead the per-platform enable/disable statuses (stored in the wpsr_statuses option).
Handler: PlatformController@getStatuses
Response โ
json
{
"statuses": {
"platforms_statuses": {
"feeds": { "instagram": true },
"reviews": { "google": true },
"chats": { "whatsapp": true }
}
}
}Update Statuses โ
POST/platforms/update-statusesPersist platform statuses.
Handler: PlatformController@updateStatuses
Parameters โ
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
statuses | object | body | Yes | { feeds: {slug: bool}, reviews: {slug: bool}, chats: {slug: bool} } |
Response โ
json
{ "message": "success" }Returns an error envelope { "message": "Invalid statuses" } if the payload is malformed.
Dashboard Notices โ
GET/platforms/dashboard-notices ยท POST /platforms/dashboard-noticesRead or update dashboard notice / newsletter flags.
Handlers: PlatformController@getDashboardNotices / updateDashboardNotices
GET response โ
json
{
"displayNotice": true,
"displayOptInNotice": false,
"displayProUpdateNotice": false,
"userData": { "name": "Jane", "email": "jane@example.com" },
"displayNewsletter": true,
"customNotices": []
}POST parameters โ
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
args | object | body | Yes | { notice_type: string, value: bool } |
Subscribe โ
POST/platforms/subscribeSubscribe an email to the newsletter.
Handler: PlatformController@processSubscribeQuery
Parameters โ
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
args | object | body | Yes | { email: string, name: string } |
Response โ
json
{ "status": "success", "message": "...", "displayNewsletter": false }Activate an Add-on โ
POST/platforms/addonsInstall/activate a companion plugin (TikTok feed or Fluent Forms). Requires the install_plugins capability.
Handler: AddonController@activePlugin
Parameters โ
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
platform | string | body | Yes | tiktok or fluent_forms |
Response โ
json
{ "message": "...", "is_installed": true }Review Connection Configs โ
Nested under /platforms/reviews. Handler: Platforms/Reviews/ConfigsController.
Get Configs โ
GET/platforms/reviews/configsLoad a review platform's stored credentials and business info.
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
platform | string | query | Yes | Platform slug |
page / per_page | integer | query | No | Opt-in pagination |
Response:
json
{
"credential": {},
"additional_info": {},
"business_info": {},
"pagination": { "page": 1, "per_page": 10, "total": 0, "total_pages": 0 }
}Prepare / Consume (OAuth) โ
POST/platforms/reviews/configs/prepare ยท POST /platforms/reviews/configs/consumeStart and complete a platform's authentication flow.
| Parameter | Type | Where | Notes |
|---|---|---|---|
platform, provider, flow, return_url, source | mixed | body | prepare inputs |
platform, result_id, flow_id, payload | mixed | body | consume inputs |
Return 423 ({ "message": ... }) when platform is missing. The JSON body is produced by the platform's auth handler.
Save / Sync / Delete โ
| Method | Endpoint | Handler | Key inputs |
|---|---|---|---|
| POST | /platforms/reviews/configs | @store | platform, verificationData |
| POST | /platforms/reviews | @saveReviews | settings{ api_key, source_id, product_name, count, platform, url_value, credentialsType, language }, plus the Booking.com fields below |
| POST | /platforms/reviews/configs/manually-sync-reviews | @manuallySyncReviews | platform, credentials{...} |
| DELETE | /platforms/reviews/configs | @delete | platform, sourceId (use clear-locations to clear all) โ { "message": "Clear Configurations" } |
TIP
store, saveReviews, and manuallySyncReviews return no direct body โ they fire the platform's *_{platform} action, and the connected service (Google/Airbnb in core, others in Pro) produces the response. See Platform Services.
Booking.com fields on saveReviews 4.5.0: Booking.com connects by hotel ID, and the editor sends these inside settings:
| Field | Sanitizer | Meaning |
|---|---|---|
hotel_id | intval | Booking's hotel id |
ufi | intval | Booking's city id for the hotel |
hotel_name, hotel_country, hotel_location | sanitize_text_field | Hotel details stored with the connection |
legacy_choice | sanitize_text_field | Which saved property this hotel replaces, or new for none |
Feed Connection Configs โ
Nested under /platforms/feeds. Handler: Platforms/Feeds/ConfigsController.
| Method | Endpoint | Handler | Key inputs |
|---|---|---|---|
| GET | /platforms/feeds/configs | @index | platform |
| POST | /platforms/feeds/configs | @store | platform, settings (JSON) |
| POST | /platforms/feeds/configs/prepare | @prepare | platform, provider, flow, return_url, source |
| POST | /platforms/feeds/configs/consume | @consume | platform, result_id, flow_id, payload |
| DELETE | /platforms/feeds/configs | @delete | platform, user_id (Instagram) |
Like the review configs, these fire the feed platform's *_{platform} actions; the response body comes from the platform handler.

