Submissions list
Endpoint GET /projects/:projectId/submissions
Retrieve a list of a project's submissions data.
Path Parameters
Required
projectId
- The project's id.
Query parameters:
limit
- number of submissions to retrieve (default: 10)widgetId
- The widget's id to filter submissions by.
Example Request:
- curl
- Node.js
curl -H "Authorization: Bearer ACCESS_TOKEN" "https://api.commoninja.com/platform/api/v1/projects/894f5aed-29f5-46c5-9f26-022bfccc5292/submissions?limit=5"
const axios = require('axios');
async function getData() {
const response = await axios.get('https://api.commoninja.com/platform/api/v1/projects/894f5aed-29f5-46c5-9f26-022bfccc5292/submissions', {
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
},
params: {
limit: 5,
widgetId: '894f5aed-29f5-46c5-9f26-022bfccc5292'
}
});
return response.data;
}
getData();
Example Response:
{
"total": 5,
"limit": 5,
"offset": 0,
"page": 1,
"pages": 1,
"docs": [
{
"submissionId": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"projectId": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"widgetId": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"type": "submission",
"data": [
{
"id": "894f5aed-29f5-46c5-9f26-022bfccc5292",
"label": "Name",
"value": "John Doe",
"_id": "894f5aed-29f5-46c5-9f26-022bfccc5292"
}
],
"created": "2023-04-25T09:44:42.842Z",
"updated": "2023-04-25T09:44:42.842Z"
}
]
}