> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Campaign Goal

> Goal target + **live** actuals.

``CampaignGoal.actual_count`` and ``actual_revenue_cents`` are stored
columns left over from Phase 2 D6 with no writer attached — so they
sat at 0 even when opportunities piled up. Until a writer ships (Phase 3
follow-up alongside the multi-touch attribution job), compute the
actuals on read from live ``Opportunity`` + ``Charge`` data and overlay them
on the stored row. The stored columns are ignored for display.



## OpenAPI

````yaml get /opportunity/campaign/{campaign_id}/goal
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /opportunity/campaign/{campaign_id}/goal:
    get:
      tags:
        - Campaigns
      summary: Get Campaign Goal
      description: >-
        Goal target + **live** actuals.


        ``CampaignGoal.actual_count`` and ``actual_revenue_cents`` are stored

        columns left over from Phase 2 D6 with no writer attached — so they

        sat at 0 even when opportunities piled up. Until a writer ships (Phase 3

        follow-up alongside the multi-touch attribution job), compute the

        actuals on read from live ``Opportunity`` + ``Charge`` data and overlay
        them

        on the stored row. The stored columns are ignored for display.
      operationId: get_campaign_goal_opportunity_campaign__campaign_id__goal_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            title: Campaign Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CampaignGoalSummary'
                  - type: 'null'
                title: >-
                  Response Get Campaign Goal Opportunity Campaign  Campaign Id 
                  Goal Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CampaignGoalSummary:
      properties:
        id:
          type: string
          title: Id
        campaignId:
          type: string
          title: Campaignid
        goalEvent:
          type: string
          title: Goalevent
        targetCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Targetcount
        actualCount:
          type: integer
          title: Actualcount
          default: 0
        targetRevenueCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Targetrevenuecents
        actualRevenueCents:
          type: integer
          title: Actualrevenuecents
          default: 0
        targetCplCents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Targetcplcents
        targetRoas:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Targetroas
      type: object
      required:
        - id
        - campaignId
        - goalEvent
      title: CampaignGoalSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````