Get a specific request

GET /requests/{requestId}

This endpoint retrieves all the details of a specific request including the answers of the forms and the documents that have been uploaded.

Path parameters

  • requestId string Required

    The ID of the request to retrieve.

Query parameters

  • expires integer

    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

    Specific Request.

    Hide response attributes Show response attributes object
  • 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 /requests/{requestId}
curl \
 -X GET https://api.usecollect.com/v1/requests/{requestId}
Response examples (200)
{
  "_id": "NxAHPWu9hRzcyD24m",
  "forms": [
    {
      "id": "BWXwpuhhjkoJ4PyBt",
      "name": "Client contacts",
      "items": [
        {
          "name": "First Name",
          "type": "shortText",
          "answer": "Elon"
        },
        {
          "name": "Last Name",
          "type": "shortText",
          "answer": "Musk"
        },
        {
          "name": "Business industry",
          "type": "multi",
          "answer": [
            "Cars",
            "Space"
          ]
        }
      ],
      "order": 0,
      "itemId": "buBLLGP3WczFCrNBh",
      "status": "completed",
      "visibility": true
    }
  ],
  "status": "due",
  "contact": {
    "_id": "uBJadNFcjrC6emRom",
    "tag": [],
    "email": "elon@example.com",
    "custom": [
      {
        "_id": "yw6XDyeFvbqr86yA6",
        "name": "Favorite color",
        "value": "Blue",
        "variable": "color"
      },
      {
        "_id": "CqdFwGX3yitk9zf8z",
        "name": "Country",
        "value": "US",
        "variable": "country"
      }
    ],
    "lastName": "Musk",
    "createdAt": "2021-11-22T13:40:26Z",
    "firstName": "Elon",
    "nbRequest": 11,
    "lastActivity": "2020-01-24T17:14:52Z"
  },
  "dueDate": "2020-01-29T22:59:00Z",
  "privacy": "team",
  "branding": {
    "brandingId": "jSEj7vHk3wLG3gRF7",
    "useBranding": true
  },
  "createdAt": "2020-01-22T13:40:26Z",
  "documents": [
    {
      "id": "dfgZmo7SdijHMkwx5",
      "name": "ID",
      "order": 1,
      "itemId": "gKLyBTL3RyzqTnoHc",
      "status": "waiting",
      "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": "2020-01-23T14:01:31Z",
          "scannedOn": "2020-01-23T14:01:51Z",
          "virusScanned": true
        }
      ],
      "extensions": [
        "pdf"
      ],
      "visibility": true,
      "multipleupload": true
    },
    {
      "id": "MnDf76Dmp9LzG32PG",
      "name": "Bank statement",
      "order": 2,
      "itemId": "rpBjtem4kkPnFa3rH",
      "sample": {
        "url": "https://collectsamples.s3.amazonaws.com/bank_statement.pdf",
        "name": "bank_statement.pdf"
      },
      "status": "waiting",
      "uploads": [
        {
          "name": "bank_statement.zip",
          "size": 42573459,
          "createdAt": "2020-01-23T15:59:36Z",
          "scannedOn": "2020-01-23T15:59:58Z",
          "quarantine": true,
          "virusScanned": true
        }
      ],
      "extensions": [
        "zip",
        "rar",
        "gzip",
        "gz"
      ],
      "visibility": true,
      "multipleupload": true
    }
  ],
  "portalUrl": "https://app.usecollect.com/portal/uGFRDeEL3Ct2uYo2c/NxAHPWu9hRzcyD24m",
  "campaignId": "mYCsdgB4DQoENBaX6"
}