Get a specific element
This endpoint retrieves all the details of a specific element including the answers of the forms and the documents that have been uploaded.
Path parameters
-
elementId string Required
The ID of the element to retrieve
Query parameters
-
expires integer
Optionally specify the period of validity of the url to access the uploaded documents. Should be an integer, default is
900
(15 minutes) and maximum is3600
(1 hour).
Responses
-
• 200 object
Returns a specific element
-
• 400
Bad Request -- Your request is invalid.
-
• 401
Unauthorized -- Your API key is wrong.
-
• 403
Forbidden -- The object requested is hidden for administrators only.
-
• 404
Not Found -- The specified object could not be found.
-
• 429
Too Many Requests -- You're requesting too many objects! Slow down!
-
• 500
Internal Server Error -- We had a problem with our server. Try again later.
-
• 503
Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
curl \
-X GET https://api.usecollect.com/v1/elements/{elementId} \
--user "username:password"
{
"id": "eEDJFD5unNQTHoSBZ",
"itemId": "urRJfPK7CfyGBnHg8",
"name": "ID",
"order": 3,
"visibility": true,
"status": "approved",
"mandatory": true,
"multipleupload": true,
"uploads": [
{
"createdAt": "2022-02-21 11:27:32 UTC",
"name": "Elon's ID.pdf",
"url": "https://collectuseast.s3.amazonaws.com/elon_id.pdf?AWSAccessKeyId=AKIAJTQD6LRBSTO25FSQ&Expires=1561559790&Signature=bglKxNBqqcDKkAeuzmxoBS2IOQQ%3D",
"size": 2414511
}
],
"type": "docs",
"request": {
"_id": "bbbBkrejSaJkHWwDE",
"campaignId": "7gDq3XyLyixkhqoHa"
}
}
{
"id": "2ewEw5L6amQiJ6J2A",
"itemId": "dy8SYGJauWwhDcGrp",
"name": "Company info",
"order": 0,
"visibility": true,
"status": "open",
"items": [
{
"name": "What size is your company",
"type": "dropdown",
"answer": "50-250 employees"
},
{
"name": "Where is your company located?",
"type": "multi",
"answer": [
"🇺🇸 USA",
"🇪🇺 Europe"
]
}
],
"type": "form",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
}
}
{
"id": "e6bggjBX7vdWKWYwq",
"itemId": "urRJfPK7CfyGBnHg8",
"name": "NDA with ACME Corp",
"order": 2,
"visibility": true,
"status": "signed",
"uploads": [
{
"id": "KErM5RgjHWjnBPLXz",
"createdAt": "2023-04-18 10:19:31 UTC",
"name": "New doc to sign.pdf",
"url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171409_new_doc_to_sign.pdf",
"size": 199498
},
{
"id": "SjgRfMK9Bnj6JYvTy",
"createdAt": "2023-04-18 10:19:33 UTC",
"name": "Summary.pdf",
"url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171675_summary.pdf",
"size": 280284
}
],
"type": "sign",
"request": {
"_id": "bbbBkrejSaJkHWwDE",
"campaignId": "7gDq3XyLyixkhqoHa"
}
}
{
"id": "BKJ95xmpHSyo7KuRC",
"itemId": "7LBBC8LwnBnQoz8ae",
"name": "Text block",
"order": 4,
"visibility": true,
"type": "text",
"text": "Hello World!",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
}
}
{
"id": "XigRzPs4N5vwX3Rks",
"itemId": "L3uAmzDRJjWTm2TMR",
"name": "More details",
"order": 2,
"visibility": true,
"type": "page",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
}
}