submissions_data_create
POST
/api/submissions/{submission_pk}/data
const url = 'https://example.com/api/submissions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/data';const options = { method: 'POST', headers: { 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"data_objects":[{"data":"7244ff48-7fcc-4ebf-9682-c78cd8b786e7","datalink":"26eb68be-0d58-4e92-b269-b0102e082785"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/submissions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/data \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "data_objects": [ { "data": "7244ff48-7fcc-4ebf-9682-c78cd8b786e7", "datalink": "26eb68be-0d58-4e92-b269-b0102e082785" } ] }'Create a new submission_data object.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”submission_pk
required
string format: uuid
Header Parameters
Section titled “Header Parameters”X-Workspace
required
string format: uuid
Workspace ID
Request Bodyrequired
Section titled “Request Bodyrequired”Serializer for the create endpoint of submission data.
object
data_objects
required
Array<object>
Serializer for data_objects in the create body.
object
data
required
string
datalink
required
string
Examples
ExampleDefaultRequestBody
Default request body
{ "data_objects": [ { "data": "7244ff48-7fcc-4ebf-9682-c78cd8b786e7", "datalink": "26eb68be-0d58-4e92-b269-b0102e082785" } ]}Serializer for the create endpoint of submission data.
object
data_objects
required
Array<object>
Serializer for data_objects in the create body.
object
data
required
string
datalink
required
string
Example generated
data_objects=%7B%22data%22%3A%22example%22%2C%22datalink%22%3A%22example%22%7DSerializer for the create endpoint of submission data.
object
data_objects
required
Array<object>
Serializer for data_objects in the create body.
object
data
required
string
datalink
required
string
Responses
Section titled “Responses”Media typeapplication/json
Serializer for the create endpoint of submission data.
object
data_objects
required
Array<object>
Serializer for data_objects in the create body.
object
data
required
string
datalink
required
string
Example generated
{ "data_objects": [ { "data": "example", "datalink": "example" } ]}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "body_validation_error", "message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.", "details": [ { "parameter": "datalink", "code": "does_not_exist", "message": "Could not find data: <datalink_id>." } ]}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "forbidden", "message": "You do not have permission to perform this operation. Check the `details` property for more details.", "details": [ { "parameter": "submission", "code": "not_allowed", "message": "You are not a member of this submission." } ]}Media typeapplication/json
object
code
required
string
message
required
string
details
required
Array<object>
object
parameter
string
code
string
message
string
Example
{ "code": "object_not_found", "message": "Object not found. Check the `details` property for more details.", "details": [ { "parameter": "<id>", "code": "does_not_exist", "message": "\"<id>\" does not exist." } ]}
