ProfilePilot
Loading…
Developer API

Reputation, Reviews, Red Flags & CSAT API

Query reputation KPIs, paginated customer reviews with business-hours response times, scoped Red Flag alerts, and Customer Satisfaction opt-in cases.

All Reputation endpoints honor your organisation’s configured Business Hours & Public Holidays clock (response_time_bh), enforce Admin Account Sync Scope, and exclude moderated reported_irrelevant and deferred_deleted reviews from pending-reply denominators.

1. Reputation Executive Summary (GET /api/v1/reports/reputation/summary)

Endpoint: GET https://profilepilotapp.com/api/v1/reports/reputation/summary Required Scope: reports:read or reputation:read Required Product Subscription: Locations & Reputation + Developer API Access

Query Parameters:

  • startDate & endDate (YYYY-MM-DD, optional) — Defaults to last 30 days UTC.
  • storeCode or store_code (string, optional) — Filter reviews and sentiment to a single branch.

Performance Metrics & Response Fields:

  • summary.total_reviews (number) — Total reviews ingested in the date range.
  • summary.average_rating (number | null) — Mean star rating (1.00–5.00) across rated reviews.
  • summary.star_distribution (object) — Exact review counts keyed by "1", "2", "3", "4", "5".
  • summary.replied_count (number) & summary.needs_response_count (number) — Actionable reply counts (reported_irrelevant and deferred_deleted reviews do not count as needing a response).
  • summary.response_rate_pct (number) — replied_count / (replied_count + needs_response_count) × 100.
  • summary.avg_response_business_minutes (number | null) & summary.avg_response_time_bh (string) — Mean response duration measured strictly inside your configured business hours (excluding weekends, closed hours, and public holidays).
  • red_flags — { total, open, resolved, by_severity: { red, orange, yellow } } scoped to your active account sync filter.
  • sentiment.pillars[] — Transactional sentiment topic groups (including Service, Quality, Pricing, Hygiene, Stock, and Delivery) with positive/neutral/negative breakdowns.
  • sentiment.keywords[] — Top recurring positive and negative terms extracted from review text.
  • sentiment.optimization_impact & sentiment.recommendations[] — Actionable CX improvement priorities.
curl -sS -X GET "https://profilepilotapp.com/api/v1/reports/reputation/summary?startDate=2026-10-01&endDate=2026-10-20" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "period": { "startDate": "2026-10-01", "endDate": "2026-10-20" },
  "store_code": null,
  "summary": {
    "total_reviews": 340,
    "average_rating": 4.62,
    "star_distribution": { "1": 12, "2": 8, "3": 18, "4": 62, "5": 240 },
    "replied_count": 318,
    "needs_response_count": 19,
    "response_rate_pct": 94.4,
    "avg_response_business_minutes": 42,
    "avg_response_time_bh": "42m"
  },
  "red_flags": {
    "total": 14,
    "open": 2,
    "resolved": 12,
    "by_severity": { "red": 3, "orange": 6, "yellow": 5 }
  },
  "sentiment": {
    "pillars": [
      { "topic": "Customer Service", "positive": 180, "neutral": 14, "negative": 9, "total": 203 },
      { "topic": "Delivery & Fulfilment", "positive": 64, "neutral": 5, "negative": 4, "total": 73 }
    ],
    "keywords": [
      { "word": "friendly", "count": 84, "sentiment": "positive" },
      { "word": "queue", "count": 11, "sentiment": "negative" }
    ],
    "optimization_impact": { "potential_rating_lift": 0.18 },
    "recommendations": [
      "Address peak-hour collection counter queues at flagship branches."
    ]
  },
  "meta": {
    "org_id": "00000000-0000-0000-0000-000000000000",
    "api_usage": { "month": "2026-10", "used": 16, "limit": 500000, "remaining": 499984 }
  }
}

2. Paginated Customer Reviews (GET /api/v1/reputation/reviews)

Endpoint: GET https://profilepilotapp.com/api/v1/reputation/reviews Required Scope: reputation:read or reports:read Required Product Subscription: Locations & Reputation + Developer API Access

Query Parameters:

  • startDate & endDate (YYYY-MM-DD, optional — defaults to last 30 days UTC)
  • storeCode or store_code (string, optional)
  • platform ("google" | "meta" | "instagram", optional)
  • rating (1..5 or "ONE".."FIVE", optional)
  • needsResponse or needs_response ("true" | "false", optional)
  • limit (1–500, default 100) & offset (default 0)

Performance Metrics & Response Fields (`reviews[]`):

  • id (string), platform (string), store_code (string | null), location_id (string | null), location_name (string humanized store display name).
  • star_rating (1–5 number | null) & star_rating_enum ("ONE".."FIVE" | null).
  • reviewer_display_name (string | null), comment (string | null), created_at (string ISO-8601).
  • moderation_status (string | null), manual_topic_tags (string[]), needs_response (boolean).
  • reply ({ comment, created_at, updated_at } | null).
  • response_time_bh ({ business_minutes: number | null, formatted: string | null }, e.g. { "business_minutes": 38, "formatted": "38m" }).
curl -sS -X GET "https://profilepilotapp.com/api/v1/reputation/reviews?rating=1&needsResponse=true&limit=50" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "period": { "startDate": "2026-10-01", "endDate": "2026-10-20" },
  "total": 19,
  "limit": 50,
  "offset": 0,
  "returned": 1,
  "reviews": [
    {
      "id": "rev_987654321",
      "platform": "google",
      "store_code": "CPT-001",
      "location_id": "locations/123456789",
      "location_name": "Cape Town Flagship",
      "star_rating": 1,
      "star_rating_enum": "ONE",
      "comment": "Waited 25 minutes at the collection counter.",
      "reviewer_display_name": "Alex M.",
      "moderation_status": null,
      "manual_topic_tags": ["wait_time"],
      "needs_response": true,
      "created_at": "2026-10-18T11:20:00Z",
      "reply": null,
      "response_time_bh": {
        "business_minutes": null,
        "formatted": null
      }
    }
  ]
}

3. Red Flag Alerts (GET /api/v1/reputation/red-flags)

Endpoint: GET https://profilepilotapp.com/api/v1/reputation/red-flags Required Scope: reputation:read or reports:read Required Product Subscription: Locations & Reputation + Developer API Access

Query Parameters:

  • startDate & endDate (YYYY-MM-DD, optional — defaults to last 30 days UTC)
  • status ("open" | "resolved" | "all", optional, default "all")
  • severity ("red" | "orange" | "yellow", optional)
  • limit (1–500, default 100) & offset (default 0)

Performance Metrics & Response Fields (`red_flags[]`):

  • id, review_id, location_id, location_name (humanized store name), platform ("google" | "facebook" | "instagram").
  • alert_level ("red" | "orange" | "yellow"), category (string | null), matched_keywords (string[]).
  • review_rating (string | null), review_text (string | null).
  • is_resolved (boolean), resolved_at (string | null), resolution_notes (string | null), created_at (string).
curl -sS -X GET "https://profilepilotapp.com/api/v1/reputation/red-flags?status=open&severity=red&limit=100" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "period": { "startDate": "2026-10-01", "endDate": "2026-10-20" },
  "status": "open",
  "severity": "red",
  "total": 2,
  "limit": 100,
  "offset": 0,
  "returned": 1,
  "red_flags": [
    {
      "id": "rf_112233",
      "review_id": "rev_987654321",
      "location_id": "locations/123456789",
      "location_name": "Cape Town Flagship",
      "platform": "google",
      "alert_level": "red",
      "category": "Customer Service Escalation",
      "matched_keywords": ["waited", "counter"],
      "review_rating": "ONE",
      "review_text": "Waited 25 minutes at the collection counter.",
      "is_resolved": false,
      "resolved_at": null,
      "resolution_notes": null,
      "created_at": "2026-10-18T11:21:00Z"
    }
  ]
}

4. Customer Satisfaction / Review Perks Triage Queue (GET /api/v1/reputation/csat)

Endpoint: GET https://profilepilotapp.com/api/v1/reputation/csat Required Scope: reputation:read or reports:read Required Product Subscription: Locations & Reputation + Developer API Access

Query Parameters:

  • status ("pending_outreach" | "under_investigation" | "outreach_sent" | "resolved" | "closed", optional)
  • storeCode or store_code (string, optional)
  • limit (1–500, default 100) & offset (default 0)

Performance Metrics & Response Fields:

  • sla — Configured CSAT outreach targets: { firstContactSlaHours, resolutionSlaHours }.
  • status_counts — Live queue totals across { pending_outreach, under_investigation, outreach_sent, resolved, closed }.
  • cases[] — Individual customer opt-in cases (id, email, mobile_number, order_number, source, created_at, review_id, case_status, case_notes, status_updated_at, linked_red_flag_id, and nested review: { reviewer_name, star_rating, location_name, comment }).
curl -sS -X GET "https://profilepilotapp.com/api/v1/reputation/csat?status=pending_outreach&limit=100" \
  -H "Authorization: Bearer ppapi_your_secret_key"
{
  "ok": true,
  "store_code": null,
  "status": "pending_outreach",
  "sla": { "firstContactSlaHours": 4, "resolutionSlaHours": 24 },
  "status_counts": {
    "pending_outreach": 3,
    "under_investigation": 2,
    "outreach_sent": 4,
    "resolved": 28,
    "closed": 5
  },
  "total": 3,
  "limit": 100,
  "offset": 0,
  "returned": 1,
  "cases": [
    {
      "id": "cs_556677",
      "email": "customer@example.com",
      "mobile_number": "+27820001122",
      "order_number": "ORD-10492",
      "source": "review_perks",
      "created_at": "2026-10-18T11:25:00Z",
      "review_id": "rev_987654321",
      "case_status": "pending_outreach",
      "case_notes": null,
      "status_updated_at": null,
      "linked_red_flag_id": "rf_112233",
      "review": {
        "reviewer_name": "Alex M.",
        "star_rating": "ONE",
        "location_name": "Cape Town Flagship",
        "comment": "Waited 25 minutes at the collection counter."
      }
    }
  ]
}

5. Troubleshooting & Common Scenarios

  • Why is `response_time_bh.business_minutes` lower than wall-clock time? ProfilePilot measures review response SLA strictly during your organisation’s configured business hours (and pauses the clock overnight, on weekends, and on regional public holidays).
  • Why is `needs_response: false` on an unreplied review? If a review’s moderation_status is reported_irrelevant or deferred_deleted, it is excluded from needs_response and from response_rate_pct denominators so spam does not penalize store managers.
  • Account Sync Scope filtering: Red Flag alerts and reviews automatically respect the organisation’s Admin Account Sync Scope (sync_included_accounts_*), matching Mission Control and the portal.
Typical Tasks
  • Call GET /api/v1/reports/reputation/summary for star ratings, reply rate %, and BH response time
  • Poll GET /api/v1/reputation/reviews?needsResponse=true for actionable unresponded reviews
  • Poll GET /api/v1/reputation/red-flags?status=open for unresolved critical alerts
  • Call GET /api/v1/reputation/csat for Customer Satisfaction outreach cases

Developer API Reference

All Developer & Reporting API Modules

Manage API Keys →
Store Sync
locations:readlocations:write

Enterprise Store Locations API

Push and query your canonical store master records (up to 100 stores per batch) by store_code.

POST/api/v1/locations
GET/api/v1/locations
GET/api/v1/locations/{store_code}
DELETE/api/v1/locations/{store_code}
Local Presence & SEO
reports:readlocations:read

Locations Metrics & Local SEO Geo-Grid API

Pull Google Business Profile impressions, website clicks, phone calls, direction requests, peak footfall days, Meta store metrics, and Geo-Grid Share of Voice.

GET/api/v1/reports/locations/metrics
GET/api/v1/reports/seo-grid
Reputation & CX
reputation:readreports:read

Reputation, Reviews, Red Flags & CSAT API

Export star ratings, customer reviews, reply rates, business-hours response times, Red Flag alerts, and Customer Satisfaction cases.

GET/api/v1/reports/reputation/summary
GET/api/v1/reputation/reviews
GET/api/v1/reputation/red-flags
GET/api/v1/reputation/csat
WhatsApp Commerce
whatsapp:readreports:read

WhatsApp Commerce, Orders, Finance & Usage API

Export WhatsApp orders with normalized line items, fulfilment SLAs, paid GMV analytics, metered message volume, Auth OTP challenges, and loyalty balances.

GET/api/v1/whatsapp/orders
GET/api/v1/whatsapp/orders/{id}
GET/api/v1/whatsapp/reports/finance
GET/api/v1/whatsapp/reports/usage
Email & Marketing
email:readmarketing:readreports:read

Email Marketing, Workflows & Omnichannel Campaigns API

Pull active eligible subscriber counts, email campaign & automation engagement rates, WhatsApp marketing campaigns, and multi-platform social posts.

GET/api/v1/email/reports/overview
GET/api/v1/email/campaigns
GET/api/v1/email/workflows
GET/api/v1/marketing/campaigns
Inbox & Social Care
inbox:readsocial:readreports:read

Smart Inbox SLA & Social Inbox Engagement API

Export Smart Inbox ticket volumes and business-hours SLA metrics alongside Facebook & Instagram comment sentiment and actionable response rates.

GET/api/v1/inbox/reports/sla
GET/api/v1/social-inbox/reports
Insights & BI
insights:readreports:read

Insights Paid Media, GA4, Search Console & Attribution API

Pull paid media performance (Google Ads & Meta Ads), GA4 sessions and conversions, Google Search Console metrics, and True Attribution revenue.

GET/api/v1/insights/overview