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

  • 200 application/json

    Returns a specific element

    One of:
  • Bad Request -- Your request is invalid.

  • Unauthorized -- Your API key is wrong.

  • Forbidden -- The object requested is hidden for administrators only.

  • Not Found -- The specified object could not be found.

  • Too Many Requests -- You're requesting too many objects! Slow down!

  • Internal Server Error -- We had a problem with our server. Try again later.

  • Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

GET /elements/{elementId}
curl \
 -X GET https://api.usecollect.com/v1/elements/{elementId}
Response examples (200)
{
  "id": "eEDJFD5unNQTHoSBZ",
  "name": "ID",
  "type": "docs",
  "order": 3,
  "itemId": "urRJfPK7CfyGBnHg8",
  "status": "approved",
  "request": {
    "_id": "bbbBkrejSaJkHWwDE",
    "campaignId": "7gDq3XyLyixkhqoHa"
  },
  "uploads": [
    {
      "url": "https://collectuseast.s3.amazonaws.com/elon_id.pdf?AWSAccessKeyId=AKIAJTQD6LRBSTO25FSQ&Expires=1561559790&Signature=bglKxNBqqcDKkAeuzmxoBS2IOQQ%3D",
      "name": "Elon's ID.pdf",
      "size": 2414511,
      "createdAt": "2022-02-21T11:27:32Z",
      "scannedOn": "2022-02-21T11:27:52Z",
      "virusScanned": true
    }
  ],
  "mandatory": true,
  "visibility": true,
  "multipleupload": true
}
{
  "id": "2ewEw5L6amQiJ6J2A",
  "name": "Company info",
  "type": "form",
  "items": [
    {
      "name": "What size is your company",
      "type": "dropdown",
      "answer": "50-250 employees"
    },
    {
      "name": "Where is your company located?",
      "type": "multi",
      "answer": [
        "🇺🇸 USA",
        "🇪🇺 Europe"
      ]
    }
  ],
  "order": 0,
  "itemId": "dy8SYGJauWwhDcGrp",
  "status": "open",
  "request": {
    "_id": "GTonevwqoPPJ2PYEy",
    "campaignId": "3ya2sjN9GYwYAHeSi"
  },
  "visibility": true
}
{
  "id": "e6bggjBX7vdWKWYwq",
  "name": "NDA with ACME Corp",
  "type": "sign",
  "order": 2,
  "itemId": "urRJfPK7CfyGBnHg8",
  "status": "signed",
  "request": {
    "_id": "bbbBkrejSaJkHWwDE",
    "campaignId": "7gDq3XyLyixkhqoHa"
  },
  "uploads": [
    {
      "id": "KErM5RgjHWjnBPLXz",
      "url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171409_new_doc_to_sign.pdf",
      "name": "New doc to sign.pdf",
      "size": 199498,
      "createdAt": "2023-04-18T10:19:31Z",
      "scannedOn": "2023-04-18T10:19:51Z",
      "virusScanned": true
    },
    {
      "id": "SjgRfMK9Bnj6JYvTy",
      "url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171675_summary.pdf",
      "name": "Summary.pdf",
      "size": 280284,
      "createdAt": "2023-04-18T10:19:33Z",
      "scannedOn": "2023-04-18T10:19:53Z",
      "virusScanned": true
    }
  ],
  "visibility": true
}
{
  "id": "BKJ95xmpHSyo7KuRC",
  "name": "Text block",
  "text": "Hello World!",
  "type": "text",
  "order": 4,
  "itemId": "7LBBC8LwnBnQoz8ae",
  "request": {
    "_id": "GTonevwqoPPJ2PYEy",
    "campaignId": "3ya2sjN9GYwYAHeSi"
  },
  "visibility": true
}
{
  "id": "XigRzPs4N5vwX3Rks",
  "name": "More details",
  "type": "page",
  "order": 2,
  "itemId": "L3uAmzDRJjWTm2TMR",
  "request": {
    "_id": "GTonevwqoPPJ2PYEy",
    "campaignId": "3ya2sjN9GYwYAHeSi"
  },
  "visibility": true
}