ConnectCloud Developers

Campaign report (tenant:crm:read)

GET /api/crm/v1/reports/campaigns

Module: CRM · operationId: getCampaignReport · Tag: Reports · Auth: access token (Authorization: Bearer <accessToken>)

Leads, converted leads, opportunities, won value, cost and ROI of every campaign.

Responses

  • 200 One entry per campaign (application/json)
  • 401 Missing, invalid or expired token (no body).
  • 403 The token lacks the permission (insufficient permissions) or has no active tenant. (application/json)
  • 500 Unexpected error; details are only logged. (application/json)

Fields of the 200 answer:

  • items (array of CampaignReport, required)
    • campaignId (string (uuid), required): Id of the campaign.
    • convertedLeads (integer, required): Leads of the campaign that were converted.
    • cost (number (double), required): Actual cost of the campaign.
    • leads (integer, required): Leads of the campaign.
    • name (string, required): Name of the campaign.
    • opportunities (integer, required): Opportunities of those leads.
    • roi (number (double), nullable, required): (wonValue - cost) / cost; null while the campaign has no cost.
    • status (CampaignStatus, required): (one of PLANNING, ACTIVE, COMPLETED, CANCELLED)
    • wonValue (number (double), required): Value of those opportunities in a won stage.

Example 200 answer:

{
  "items": [
    {
      "campaignId": "2a4c6e8a-0b2d-4f4a-8c6e-8a0c2e4a6c8e",
      "convertedLeads": 3,
      "cost": 11340,
      "leads": 9,
      "name": "Messe IT-Business Ostbayern",
      "opportunities": 3,
      "roi": 1.522,
      "status": "COMPLETED",
      "wonValue": 28600
    },
    {
      "campaignId": "4c6e8a0c-2d4f-4a6c-8e0a-2c4e6a8c0e2a",
      "convertedLeads": 0,
      "cost": 0,
      "leads": 0,
      "name": "Newsletter Backup-Check",
      "opportunities": 0,
      "roi": null,
      "status": "PLANNING",
      "wonValue": 0
    }
  ]
}

Example request

curl -X GET 'https://api.mbcom.cloud/api/crm/v1/reports/campaigns' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

View as Markdown · Interactive reference · OpenAPI