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} \
 --user "username:password"
Response examples (200)
{
  "_id": "NxAHPWu9hRzcyD24m",
  "campaignId": "mYCsdgB4DQoENBaX6",
  "createdAt": "2020-01-22 13:40:26 UTC",
  "portalUrl": "https://app.usecollect.com/portal/uGFRDeEL3Ct2uYo2c/NxAHPWu9hRzcyD24m",
  "status": "due",
  "dueDate": "2020-01-29 22:59:00 UTC",
  "privacy": "team",
  "contact": {
    "_id": "uBJadNFcjrC6emRom",
    "email": "elon@example.com",
    "firstName": "Elon",
    "lastName": "Musk",
    "nbRequest": 11,
    "tag": [],
    "custom": [
      {
        "_id": "yw6XDyeFvbqr86yA6",
        "name": "Favorite color",
        "variable": "color",
        "value": "Blue"
      },
      {
        "_id": "CqdFwGX3yitk9zf8z",
        "name": "Country",
        "variable": "country",
        "value": "US"
      }
    ],
    "createdAt": "2021-11-22 13:40:26 UTC",
    "lastActivity": "2020-01-24 17:14:52 UTC"
  },
  "branding": {
    "useBranding": true,
    "brandingId": "jSEj7vHk3wLG3gRF7"
  },
  "documents": [
    {
      "id": "dfgZmo7SdijHMkwx5",
      "itemId": "gKLyBTL3RyzqTnoHc",
      "name": "ID",
      "status": "waiting",
      "order": 1,
      "visibility": true,
      "extensions": [
        "pdf"
      ],
      "multipleupload": true,
      "uploads": [
        {
          "createdAt": "2020-01-23 14:01:31 UTC",
          "name": "Elon's ID.pdf",
          "url": "https://collectuseast.s3.amazonaws.com/elon_id.pdf?AWSAccessKeyId=AKIAJTQD6LRBSTO25FSQ&Expires=1561559790&Signature=bglKxNBqqcDKkAeuzmxoBS2IOQQ%3D",
          "size": 2414511,
          "scannedOn": "2020-01-23 14:01:51 UTC",
          "virusScanned": true
        }
      ]
    },
    {
      "id": "MnDf76Dmp9LzG32PG",
      "itemId": "rpBjtem4kkPnFa3rH",
      "name": "Bank statement",
      "status": "waiting",
      "order": 2,
      "visibility": true,
      "extensions": [
        "zip",
        "rar",
        "gzip",
        "gz"
      ],
      "multipleupload": true,
      "sample": {
        "name": "bank_statement.pdf",
        "url": "https://collectsamples.s3.amazonaws.com/bank_statement.pdf"
      },
      "uploads": [
        {
          "createdAt": "2020-01-23 15:59:36 UTC",
          "name": "bank_statement.zip",
          "size": 42573459,
          "scannedOn": "2020-01-23 15:59:58 UTC",
          "virusScanned": true,
          "quarantine": true
        }
      ]
    }
  ],
  "forms": [
    {
      "id": "BWXwpuhhjkoJ4PyBt",
      "itemId": "buBLLGP3WczFCrNBh",
      "name": "Client contacts",
      "status": "completed",
      "order": 0,
      "visibility": true,
      "items": [
        {
          "name": "First Name",
          "type": "shortText",
          "answer": "Elon"
        },
        {
          "name": "Last Name",
          "type": "shortText",
          "answer": "Musk"
        },
        {
          "name": "Business industry",
          "type": "multi",
          "answer": [
            "Cars",
            "Space"
          ]
        }
      ]
    }
  ]
}