Skip to content

submissions_data_create

POST
/api/submissions/{submission_pk}/data
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.

submission_pk
required
string format: uuid
X-Workspace
required
string format: uuid

Workspace ID

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
nullable

Examples

ExampleDefaultRequestBody

Default request body

{
"data_objects": [
{
"data": "7244ff48-7fcc-4ebf-9682-c78cd8b786e7",
"datalink": "26eb68be-0d58-4e92-b269-b0102e082785"
}
]
}
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
nullable

Example generated

{
"data_objects": [
{
"data": "example",
"datalink": "example"
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
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
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
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
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
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."
}
]
}