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

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