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
    • _id string

      Request ID

    • campaignId string

      Campaign ID

    • createdAt string(date-time)

      Request creation date

    • portalUrl string

      URL of the portal for the main contact

    • status string

      Request status

    • dueDate string
    • privacy string
    • contact object

      Additional properties are allowed.

      Hide contact attributes Show contact attributes object
      • _id string
      • email string(email)
      • firstName string
      • lastName string
      • company string
      • tag array[string]
      • custom array[object]
        Hide custom attributes Show custom attributes object
        • _id string
        • name string
        • variable string
        • value string
    • branding object

      Additional properties are allowed.

      Hide branding attributes Show branding attributes object
      • useBranding boolean
      • brandingId string
    • documents array[object]
      Hide documents attributes Show documents attributes object
      • id string

        Element ID

      • itemId string

        Reference of the element in the campaign

      • name string

        Document name

      • order integer

        Element order

      • visibility boolean

        Visibility of the element on the portal

      • mandatory boolean

        Is document mandatory

      • multipleupload boolean

        Multiple upload allowed

      • extensions array[string]

        Document file extension

    • forms array[object]
      Hide forms attributes Show forms attributes object
      • id string

        Element ID

      • itemId string

        Reference of the element in the campaign

      • name string

        Form name

      • order integer

        Element order

      • visibility boolean

        Visibility of the element on the portal

      • items array[object]
        Hide items attributes Show items attributes object
        • name string

          Field name

        • type string

          Field type

        • id string

          Field ID

    • texts array[object]
      Hide texts attributes Show texts attributes object
      • id string

        Element ID

      • itemId string

        Reference of the element in the campaign

      • name string

        Text block name

      • order integer

        Element order

      • visibility boolean

        Visibility of the element on the portal

    • pages array[object]
      Hide pages attributes Show pages attributes object
      • id string

        Element ID

      • itemId string

        Reference of the element in the campaign

      • name string

        Page name

      • order integer

        Element order

      • visibility boolean

        Visibility of the element on the portal

  • 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.

GET /requests/{requestId}
curl \
 --request 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"
}