Skip to content

Exports

Endpoints for exporting consolidated reports.

Export Consolidated Report

GET /api/exports

Generates a consolidated report with clients, responses, and coupons from the last 90 days.

Included data:

  • Total responses per company
  • NPS classification (Promoters, Neutrals, Detractors)
  • Coupons created and used
  • NPS by criterion (Service, Environment, etc.)

Use cases:

  • Generate management reports
  • Feed external dashboards
  • Consolidated performance analysis

Request Example

bash
curl -X GET "https://api-b2s.experienciab2s.com/api/exports" \
     -H "Authorization: Bearer YOUR_TOKEN"

Success Response (200)

json
[
  {
    "total": 80,
    "clients": 0,
    "promoter": 80,
    "detractor": 0,
    "neutral": 0,
    "company": "Company 1",
    "uf": "MG",
    "nps": 100,
    "couponsCreated": 0,
    "couponsUsed": 0,
    "criteria": [
      { "name": "Service", "nps": 100 },
      { "name": "Environment", "nps": 75 },
      { "name": "Wait time", "nps": 95 }
    ]
  }
]

Response Structure

FieldTypeDescription
totalintegerTotal responses in the period
clientsintegerNumber of unique clients
promoterintegerNumber of promoters (NPS 9-10)
detractorintegerNumber of detractors (NPS 0-6)
neutralintegerNumber of neutrals (NPS 7-8)
companystringCompany name
ufstringCompany state
npsintegerCalculated NPS score
couponsCreatedintegerNumber of coupons created
couponsUsedintegerNumber of coupons used
criteriaarrayNPS by evaluated criterion

Criterion Structure

FieldTypeDescription
namestringCriterion name
npsintegerCriterion NPS score

Response Codes

CodeDescription
200Report generated successfully
401Missing or invalid token
403Invalid token or unauthorized user
404Integration token not found

Integration Documentation