List all the requests of a campaign

GET /requests

This endpoint retrieves all the requests of a campaign.

Query parameters

  • campaignId string Required

    Specify the ID of the campaign to retrieve.

  • offset integer

    Specify the ranking number of the first item on the page. Used for pagination.

  • limit integer

    Specify how many results to return. Default is 50 campaigns, maximum is 100 campaigns.

    Maximum value is 100. Default value is 50.

  • filter string

    Filter requests by status. If not specify, will return all the requests except request cancelled, archived and the drafts. Below you will find the data dictionary for the status attribute.

    Status Description
    pending The request has been sent and is not completed.
    completed The request has been sent, all the documents have been uploaded and the forms submitted. If validation is opted-in, the documents and data have been validated too.
    due The request has been sent, is not completed and is due.
    waiting The request has been sent, all the documents have been uploaded and the forms submitted but they have not been validated by the user.
    archived The request has been archived.
    cancelled The request has been cancelled.
    error An error happened when we sent the request.


    You can also use custom status here.

Responses

  • 200 application/json

    List of requests of a campaigns.

    Hide response attributes Show response attributes object
    • _id string
    • campaignId string
    • createdAt string(date-time)
    • portalUrl string
    • status string
    • dueDate string(date-time)
    • 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
  • 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
curl \
 --request GET 'https://api.usecollect.com/v1/requests?campaignId=mYCsdgB4DQoENBaX6'
Response examples (200)
[
  {
    "_id": "NxAHPWu9hRzcyD24m",
    "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"
        }
      ],
      "company": "Tesla",
      "lastName": "Musk",
      "createdAt": "2018-11-22T13:40:26Z",
      "firstName": "Elon",
      "nbRequest": 11,
      "lastActivity": "2021-06-17T17:14:52Z"
    },
    "dueDate": "2022-06-12T22:59:00Z",
    "privacy": "team",
    "branding": {
      "brandingId": "jSEj7vHk3wLG3gRF7",
      "useBranding": true
    },
    "createdAt": "2022-05-22T13:40:26Z",
    "portalUrl": "https://app.usecollect.com/portal/uGFRDeEL3Ct2uYo2c/NxAHPWu9hRzcyD24m",
    "campaignId": "mYCsdgB4DQoENBaX6"
  }
]