Responses & Data API
Response Statistics
GET /api/responses/:surveyId/stats
Returns aggregate counts by response status.
{
"success": 1,
"data": {
"total": 1500,
"complete": 1247,
"partial": 203,
"screened_out": 50
}
}
Data Grid
GET /api/responses/:surveyId/grid
Returns the full response dataset in spreadsheet format (columns + rows). Used by the data grid view.
Single Question Data
GET /api/responses/:surveyId/question/:questionId
Returns response data for a specific question.
Value Distribution
GET /api/responses/:surveyId/distribution/:columnCode
Returns frequency distribution for a specific variable.
Row Operations
Batch Update Rows
POST /api/responses/:surveyId/rows/batch
Update multiple response rows at once.
Update Single Row
PATCH /api/responses/:surveyId/rows/:responseId
Restore Original Values
POST /api/responses/:surveyId/restore-originals
Reverts modified values back to their original responses.
Bulk Actions
POST /api/responses/:surveyId/bulk
Perform bulk operations (delete, update status) on selected responses.
Find and Replace
POST /api/responses/:surveyId/find-replace
| Field | Type | Description |
|---|---|---|
column_code |
string | Target column |
find |
string | Value to find |
replace |
string | Replacement value |
Data Transformations
Recode Values
POST /api/responses/:surveyId/transform/recode
Map existing values to new values (e.g., collapse scale points).
Normalize
POST /api/responses/:surveyId/transform/normalize
Normalize numeric data to a 0-1 range.
Z-Scores
POST /api/responses/:surveyId/transform/z-scores
Calculate standardized z-scores for numeric columns.
Bin Values
POST /api/responses/:surveyId/transform/bin
Group continuous values into discrete bins/ranges.
Text Transformation
POST /api/responses/:surveyId/transform/text
Apply text transformations (lowercase, trim, remove punctuation).
Computed Columns
POST /api/responses/:surveyId/computed-columns
Create new calculated columns from expressions.
Weighting
Preview Weighting
POST /api/responses/:surveyId/weighting/preview
Preview the effect of a weighting scheme before applying it.
Create Weighting
POST /api/responses/:surveyId/weighting/create
Apply rim weighting (iterative proportional fitting) to the dataset.
Quality Checks
POST /api/responses/:surveyId/quality-check
Run automated quality checks: speeders, straightliners, duplicate detection.
Comments
List Comments
GET /api/responses/:surveyId/comments
Add Comment
POST /api/responses/:surveyId/comments
| Field | Type | Description |
|---|---|---|
response_id |
integer | Response row ID |
comment_text |
string | Comment content |
Export
POST /api/responses/:surveyId/export
| Field | Type | Description |
|---|---|---|
format |
string | csv, xlsx, or spss |
filters |
object | Optional filter criteria |
columns |
array | Optional column selection |
Example:
curl -X POST \
-H "X-API-Key: tp_your_key" \
-H "Content-Type: application/json" \
-d '{"format": "csv"}' \
https://tabularpro.com/api/responses/1/export
Test Data
Seed Test Responses
POST /api/responses/:surveyId/seed
Generate synthetic test responses for development.
Delete Test Responses
DELETE /api/responses/:surveyId/seed
Remove all seeded test responses.