Submission
Endpoint GET /projects/:projectId/submissions/:submissionId
Retrieve a project's submission data by id.
Path Parameters
Required
projectId
- The project's id.submissionId
- The submission's id.
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/894f5aed-29f5-46c5-9f26-022bfccc5292"
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/894f5aed-29f5-46c5-9f26-022bfccc5292', {
headers: {
'Authorization': 'Bearer ACCESS_TOKEN'
},
});
return response.data;
}
getData();
Example Response:
{
"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"
}