Skip to content

Pro API ​

Endpoints added by WP Social Ninja Pro, registered in Pro's app/Http/Routes/api.php. Pro reuses core policy classes (passed as fully-qualified strings) β€” it ships no policies of its own. Several route groups are additionally gated on WPSOCIALREVIEWS_DB_VERSION >= 121.

Base URL: https://your-site.com/wp-json/wpsocialreviews/v2


Managers ​

Prefix pro/settings Β· Policy: SettingsPolicy (core) Β· additionally gated on the wpsn_full_access capability inside the controller. Handler: ManagersController.

MethodEndpointHandlerInputsResponse
GET/pro/settings/managers@getManagersβ€”{ "managers": { "data": [{id,email,permissions}], "total" }, "permissions" }
POST/pro/settings/managers@addManagersformData{ email, permissions[] }{ "message" } (or 423 if user not found)
PUT/pro/settings/managers@updateManagersformData{ email, permissions[] }{ "message" }
DELETE/pro/settings/managers/{id}@removeManagerspath {id} (user ID){ "message" }

Imports & Quick Setup ​

Prefix pro/settings Β· Policy: SettingsPolicy (core). Handler: SettingsController (Pro). Quick-setup routes require WPSOCIALREVIEWS_DB_VERSION >= 121.

MethodEndpointHandlerPurposeResponse
POST/pro/settings/woocommerce/import-reviews@triggerWooImportStart a WooCommerce reviews batch import{ "success", "message" }
POST/pro/settings/woocommerce/restart-import-reviews@restartWooImportReset & restart the import{ "success", "message" }
GET/pro/settings/woocommerce/import-progress@getWooImportProgressImport progress{ "success", "message", "data" }
POST/pro/settings/fluent-cart/connect-all-products@fluentCartProductConnectionConnect all FluentCart products{ "success", "message", "data": { connected_count, skipped_count, errors } }
POST/pro/settings/woocommerce/quick-setup@wooQuickSetupOne-click WooCommerce review-hub setup{ "success", "message", "data" }
POST/pro/settings/fluent-cart/quick-setup@fluentCartQuickSetupOne-click FluentCart setup{ "success", "message", "data" }

These validate that the relevant plugin (WooCommerce / FluentCart) is active and the user has permission, returning 400/403/500 envelopes otherwise.

Review-collection QR codes

The pro/settings/get-reviews/qr-code… endpoints are also on this prefix but are handled by the core SettingsController β€” see Settings β†’ QR Codes.


Captcha & FluentCRM Tag ​

Prefix pro/settings Β· Policy: ReviewsPlatformsSettingsPolicy (core). Handler: SettingsController (Pro).

MethodEndpointHandlerInputsResponse
GET/pro/settings/review-form-captcha@getReviewFormCaptchaSettingsβ€”{ "success", "data" }
POST/pro/settings/review-form-captcha@saveReviewFormCaptchaSettingstype, settingsservice result (or 422)
DELETE/pro/settings/review-form-captcha@clearReviewFormCaptchaSettingstypeservice result (or 422)
GET/pro/settings/fluentcrm-review-tag@getFluentCrmReviewTagSettingsβ€”{ "success", "data": { has_fluentcrm, tags, … } }
POST/pro/settings/fluentcrm-review-tag@saveFluentCrmReviewTagSettingsenabled (bool), tag_name{ "success", "message", "data" } (or 422)

Review Forms ​

Prefix pro/review-forms Β· Policy: ReviewFormPolicy (core). Handler: ReviewFormController. Registered only when WPSOCIALREVIEWS_DB_VERSION >= 121. These back the [wpsr_review_form] shortcode.

MethodEndpointHandlerInputsResponse
GET/pro/review-forms@indexsearch, page, per_page (≀100){ "message": "success", "items": { data, total }, "total_items" }
POST/pro/review-forms@storetitle, schema{}, settings{ general, spam }, status{ "message", "form" }
GET/pro/review-forms/{id}@showpath {id}{ "message": "success", "form" } (or 404)
PUT/pro/review-forms/{id}@updatepath {id}, title, schema, settings, status{ "message", "form" }
PUT/pro/review-forms/status-update@statusUpdateids[], status (enable/disable){ "message" }
DELETE/pro/review-forms@bulkDestroyids[]{ "message" }
POST/pro/review-forms/{id}/duplicate@duplicatepath {id}{ "message", "form" }

Form schema β€” field types: text, email, rating, textarea, media, privacy_policy, content_permission, hidden. Settings β€” general{ submit_button_text, success_message, duplicate_message, require_login, one_review_per_email, target_platform(native_form/fluent-cart/woocommerce) }, spam{ honeypot, captcha_type }.

Front-end submission (admin-ajax, not REST) ​

Visitors never reach the routes above. Submission and media upload go through admin-ajax.php so guests can post:

ActionHandlerRegistered for
wpsr_submit_review_formReviewFormAjaxController@submitwp_ajax_ and wp_ajax_nopriv_
wpsr_review_form_uploadTempFileUploader@uploadwp_ajax_ and wp_ajax_nopriv_

The JS serializes every field into a single URL-encoded data string, which the controller expands with parse_str() and merges back β€” so $request->get('field_name') keeps working. form_id is posted separately. Nonce, honeypot, captcha, and rate limiting are all enforced inside SubmissionHandler, not the controller.

Media arrives in two out-of-band maps, deliberately outside the data blob so the array contract is explicit rather than relying on parse_str() bracket-notation handling of URL-encoded keys:

FieldShapePurpose
wpsr_media_tokensJSON mapUpload tokens for the submitted media
wpsr_upload_session_idstringA single upload session
wpsr_upload_sessions 4.4.0JSON mapOne session per media field

Why wpsr_upload_sessions was added

A form with several media fields previously posted wpsr_upload_session_id once, so only the last value survived and the other fields' buckets were never claimed. The JSON map lets the submission claim every bucket. Each value is run through TempFileUploader::sanitizeSessionId(); entries that do not sanitize are dropped, and a non-array payload is ignored entirely.

Source: Pro app/Http/Controllers/ReviewForms/ReviewFormAjaxController.php, app/Hooks/Handlers/ReviewFormHandler.php


Custom Sources ​

Prefix pro/custom-sources Β· Policy: CustomSourcesPolicy (core). Handler: CustomSourcesController.

MethodEndpointHandlerInputsResponse
GET/pro/custom-sources@indexsearch, filter, page, per_page{ "message": "success", "items", "all_valid_platforms", "total_items" }
POST/pro/custom-sources@storename, label, type (custom), form_id, is_manual_form (bool), native_form_id{ "message", "source_id" } (or 422/423)
DELETE/pro/custom-sources@deleteids[]{ "message", "deleted_count", "total_count", "errors"? }
GET/pro/custom-sources/{id}@getSettingspath {id}source settings (or 404)
POST/pro/custom-sources/{id}/settings@saveSettingspath {id}, settings{ "message" } (or 422/404)
GET/pro/custom-sources/forms/templates@getTemplatesβ€”available Fluent Forms templates

WP Social Ninja Developer Documentation