Appearance
Shoppable API โ
Manage shoppable feed settings and per-feed shoppable data on templates.
Base URL: https://your-site.com/wp-json/wpsocialreviews/v2
Policy: ShoppablePolicy
Handler: ShoppablesController.
Get Posts โ
GET/shoppable/postsReturn posts for a given post type (used to attach products to shoppable feeds).
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
postType | string | query | Yes | Post type to list |
Response: { "posts": [] }
Global Settings โ
GET/shoppable ยท PUT /shoppable ยท DELETE /shoppable| Method | Handler | Inputs | Response |
|---|---|---|---|
| GET | @index | postType | { "settings", "has_item", "post_types" } |
| PUT | @update | settings (JSON; hashtags required) | { "message" } |
| DELETE | @delete | settings (JSON) | { "message" } |
Store Template Settings โ
PUT/shoppable/template-settings/{id}Save per-feed shoppable data into a template. Fires update_editor_settings_{platform}.
Handler: @storeTemplateSettings
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
id | integer | path | Yes | Template (post) ID |
platform | string | body | Yes | Platform slug |
shoppable_fields | object (JSON) | body | Yes | Product mappings |
settings | object (JSON) | body | No | Feed settings |
feed | object (JSON) | body | No | { username, id } |

