Get a specific element

GET /elements/{elementId}

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 is 3600 (1 hour).

Responses

GET /elements/{elementId}
curl \
 -X GET https://api.usecollect.com/v1/elements/{elementId} \
 --user "username:password"
Response examples (200)
{
  "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"
  }
}