Skip to content

social-dashboard

← All modules

3 endpoints.

GET /api/v1/social-dash/companies

List Companies

The company tabs across the top of the Social dashboard, in display order. Account ids stay server-side; labels honour the site's override.

200 — Successful Response

json
{}

GET /api/v1/social-dash/companies/{company}/adverts

List Adverts

The advert sub-menu for one company: an "All adverts" entry followed by each Meta campaign with activity in the period (most spend first).

Parameters

NameInRequiredTypeDescription
companypathyesstring
daysquerynointeger

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

GET /api/v1/social-dash/companies/{company}/stats

Company Stats

Live ad-performance cards + charts for one company over days, scoped to a single advert (advert = a Meta campaign id) or the whole company (advert=all). Always returns 200; an unmapped/quiet company yields empty cards so the tab degrades gracefully instead of failing the page.

Parameters

NameInRequiredTypeDescription
companypathyesstring
advertquerynostring
daysquerynointeger

200 — Successful Response

json
{}

422 — Validation Error

json
{
  "properties": {
    "detail": {
      "items": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}

Lubb ERP Documentation