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
| Field | Type | Description |
|---|---|---|
total | integer | Total responses in the period |
clients | integer | Number of unique clients |
promoter | integer | Number of promoters (NPS 9-10) |
detractor | integer | Number of detractors (NPS 0-6) |
neutral | integer | Number of neutrals (NPS 7-8) |
company | string | Company name |
uf | string | Company state |
nps | integer | Calculated NPS score |
couponsCreated | integer | Number of coupons created |
couponsUsed | integer | Number of coupons used |
criteria | array | NPS by evaluated criterion |
Criterion Structure
| Field | Type | Description |
|---|---|---|
name | string | Criterion name |
nps | integer | Criterion NPS score |
Response Codes
| Code | Description |
|---|---|
| 200 | Report generated successfully |
| 401 | Missing or invalid token |
| 403 | Invalid token or unauthorized user |
| 404 | Integration token not found |
