Get a specific campaign

GET /campaigns/{campaignId}

Retrieve all the details of a specific campaign.

Path parameters

  • campaignId string Required

    The ID of the campaign to retrieve.

Responses

  • 200 application/json

    Campaign details

    Hide response attributes Show response attributes object
    • _id string

      Campaign ID

    • createdAt string(date-time)

      Campaign creation date

    • status string

      Campaign status

    • documents array[object]
      Hide documents attributes Show documents attributes object
    • 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
    • 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 /campaigns/{campaignId}
curl \
 -X GET https://api.usecollect.com/v1/campaigns/{campaignId} \
 --user "username:password"
Response examples (200)
{
  "_id": "DP7Sj7stsmXbKCKbK",
  "createdAt": "2022-12-22 14:24:29 UTC",
  "status": "open",
  "documents": [
    {
      "id": "Gwm5sHv6tzikK65We",
      "name": "ID",
      "order": 0,
      "mandatory": false,
      "multipleupload": true
    },
    {
      "id": "4PQd5HKQcBk5BZmsB",
      "name": "Bank statement",
      "order": "1,",
      "mandatory": true,
      "extensions": [
        "pdf"
      ],
      "multipleupload": true
    }
  ],
  "forms": [
    {
      "id": "sDmmcMFRRbnizYsQp",
      "name": "Client contacts",
      "order": 3,
      "items": [
        {
          "id": "6878fzc9KPi9ZkMPG",
          "name": "First Name",
          "type": "shortText"
        },
        {
          "id": "sAEPkpyYr7SRisJWv",
          "name": "Last Name",
          "type": "shortText"
        },
        {
          "id": "F3ov9Qnr2zPJNKkL8",
          "name": "Business Industry",
          "type": "multi"
        }
      ]
    }
  ],
  "texts": [
    {
      "id": "2qcE5ibXgdkjvpkp2",
      "name": "Text block",
      "order": 4
    }
  ],
  "pages": [
    {
      "id": "DCd4FDZ5EBN2pgWmj",
      "name": "Details",
      "order": 2
    }
  ]
}