Contents
On this page

Get Share Set - Plugixa Easy Social Share Buttons

GET /plugixa-social-share/v1/sets/{id}

One share set: its networks, its look and where it appears.

An account with the plugixa_social_share_view capability. Administrators hold it; no other role does until you grant it.

Request

GET https://your-site.example/wp-json/plugixa-social-share/v1/sets/2

Path parameters

Name Type Description
id integer The share set’s number, the one typed in [plugixa_share id="2"]

Responses

200 OK.

{
  "success": true,
  "data": {
    "item": {
      "id": 2,
      "name": "Footer row",
      "instance": {
        "networks": [
          "facebook",
          "x",
          "copy"
        ],
        "template": "pill",
        "layout": "icon",
        "align": "start",
        "counts": false,
        "total": false,
        "label": "",
        "vertical": false,
        "size": "medium",
        "size_mobile": "inherit",
        "count_pos": "after",
        "total_pos": "after",
        "more": false,
        "color": "",
        "ink": ""
      },
      "placements": {
        "post": {
          "content": "content_bottom",
          "extra": []
        }
      },
      "created": 1794475800,
      "modified": 1794475800,
      "label": "Footer row"
    }
  }
}
Field Type Meaning
data.item.id integer The set’s number. Never reused, even after the set is deleted
data.item.name string The name as saved, empty when the set is unnamed
data.item.label string The name, or “Share set N” when the set is unnamed
data.item.instance object The look: see The instance object
data.item.placements object Where the set appears on its own, keyed by post type. {} when it is placed by hand only
data.item.created integer Unix time the set was created
data.item.modified integer Unix time of the last save

Errors

Status Code When
404 plugixa_social_share_not_found No share set with that number. It may have been deleted.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-social-share/v1/sets/2" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-social-share/v1/sets/2');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-social-share/v1/sets/2', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share