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

# Get revenue

> Umsatz-Attribution-Berichtsdaten für eine bestimmte Kampagne abrufen


export const ScopesList = ({scopes = [], description = "Diese API erfordert einen der folgenden Bereiche:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

export const SupportedProducts = ({marketing, sales, service, cms, marketingLevel, salesLevel, serviceLevel, cmsLevel}) => {
  const translations = {
    header: "Unterstützte Produkte",
    description: "Erfordert eines der folgenden Produkte oder höher.",
    productNames: {
      marketing: "Marketing Hub",
      sales: "Sales Hub",
      service: "Service Hub",
      cms: "Content Hub"
    },
    tiers: {
      free: "Kostenlos",
      starter: "Starter",
      professional: "Professional",
      enterprise: "Enterprise"
    }
  };
  const translateTier = tier => {
    if (!tier) return '';
    const lowerTier = tier.toLowerCase();
    return translations.tiers[lowerTier] || tier;
  };
  const products = [{
    name: marketing ? translations.productNames.marketing : '',
    level: translateTier(marketingLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/marketing-bolt.svg",
    alt: "Marketing Hub"
  }, {
    name: sales ? translations.productNames.sales : '',
    level: translateTier(salesLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/sales-star.svg",
    alt: "Sales Hub"
  }, {
    name: service ? translations.productNames.service : '',
    level: translateTier(serviceLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/service-heart.svg",
    alt: "Service Hub"
  }, {
    name: cms ? translations.productNames.cms : '',
    level: translateTier(cmsLevel),
    icon: "https://mintlify-assets.b-cdn.net/Icons/content-play.svg",
    alt: "Content Hub"
  }].filter(product => product.name && product.level);
  if (products.length === 0) return null;
  return <div>
      <div className="text-sm mb-2">{translations.description}</div>
      <div className={`grid ${products.length === 1 ? 'grid-cols-1' : 'grid-cols-2'} gap-1.5`}>
        {products.map((product, index) => <div key={index} style={{
    display: 'flex',
    alignItems: 'center'
  }}>
            <img src={product.icon} alt={product.alt} className="w-3.5 h-3.5 mr-1.5 mt-2.5 mb-2.5 flex-shrink-0 align-middle" />
            <span className="font-medium mr-1 text-sm">{product.name} -</span>
            <span className="text-sm">{product.level}</span>
          </div>)}
      </div>
    </div>;
};

<AccordionGroup>
  <Accordion title="Supported products" defaultOpen="true" icon="cubes">
    <SupportedProducts marketing={true} sales={true} service={true} cms={true} marketingLevel="PROFESSIONAL" salesLevel="FREE" serviceLevel="FREE" cmsLevel="FREE" />
  </Accordion>

  <Accordion title="Required Scopes" icon="key">
    <ScopesList
      scopes={[
  'marketing.campaigns.revenue.read'
]}
    />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml specs/legacy/v3/marketing-campaigns-public-api-v3.json GET /marketing/v3/campaigns/{campaignGuid}/reports/revenue
openapi: 3.0.1
info:
  title: Marketing Campaigns Public Api
  description: Basepom for all HubSpot Projects
  version: v3
  x-hubspot-product-tier-requirements:
    marketing: PROFESSIONAL
    sales: FREE
    service: FREE
    cms: FREE
    commerce: FREE
    crmHub: FREE
    dataHub: FREE
  x-hubspot-related-documentation:
    - name: Campaigns
      url: https://developers.hubspot.com/docs/guides/api/marketing/campaigns
servers:
  - url: https://api.hubapi.com
security: []
tags:
  - name: Assets
  - name: Basic
  - name: Batch
  - name: Budget
  - name: Metrics
  - name: Spend
paths:
  /marketing/v3/campaigns/{campaignGuid}/reports/revenue:
    get:
      tags:
        - Metrics
      summary: Umsatz abrufen
      description: |
        Umsatz-Attribution-Berichtsdaten für eine bestimmte Kampagne abrufen
      operationId: get-/marketing/v3/campaigns/{campaignGuid}/reports/revenue
      parameters:
        - name: campaignGuid
          in: path
          description: Die eindeutige ID der Kampagne
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: attributionModel
          in: query
          description: >-
            Das Umsatz-Attribution-Modell, das zur Berechnung des
            Dealumsatzanteils verwendet wird. Wenn nicht angegeben, wird
            standardmäßig LINEAR verwendet. Enum-Werte: LINEAR,
            FIRST_INTERACTION, LAST_INTERACTION, FULL_PATH, U_SHAPED, W_SHAPED,
            TIME_DECAY, J_SHAPED, INVERSE_J_SHAPED
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: endDate
          in: query
          description: Enddatum zum Abrufen der Attribution-Daten, JJJJ-MM-TT
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: startDate
          in: query
          description: Startdatum zum Abrufen der Attribution-Daten, JJJJ-MM-TT
          required: false
          style: form
          explode: true
          schema:
            type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevenueAttributionAggregate'
        default:
          $ref: '#/components/responses/Error'
          description: ''
      security:
        - oauth2:
            - marketing.campaigns.revenue.read
        - oauth2:
            - marketing.campaigns.revenue.lite.read
        - oauth2:
            - marketing.campaigns.revenue.full.read
components:
  schemas:
    RevenueAttributionAggregate:
      type: object
      properties:
        contactsNumber:
          type: integer
          description: Die Anzahl der der Kampagne zugeordneten Kontakte.
          format: int32
        currencyCode:
          type: string
          description: "Der für die Umsatzattribution verwendete Währungscode, zulässige Werte sind u.\_a. AED, AFN, ALL."
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BOV
            - BRL
            - BSD
            - BTN
            - BWP
            - BYN
            - BZD
            - CAD
            - CDF
            - CHE
            - CHF
            - CHW
            - CLF
            - CLP
            - CNY
            - COP
            - COU
            - CRC
            - CUC
            - CUP
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRU
            - MUR
            - MVR
            - MWK
            - MXN
            - MXV
            - MYR
            - MZN
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STN
            - SVC
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - USN
            - UYI
            - UYU
            - UZS
            - VEF
            - VND
            - VUV
            - WST
            - XAF
            - XAG
            - XAU
            - XBA
            - XBB
            - XBC
            - XBD
            - XCD
            - XDR
            - XOF
            - XPD
            - XPF
            - XPT
            - XSU
            - XUA
            - YER
            - ZAR
            - ZMW
            - ZWL
        dealAmount:
          type: number
          description: Die Gesamtanzahl der der Kampagne zugeordneten Deals.
        dealsNumber:
          type: integer
          description: Die Anzahl der der Kampagne zugeordneten Deals.
          format: int32
        revenueAmount:
          type: number
          description: Der Gesamtumsatz, der der Kampagne zugeordnet wurde.
    Error:
      required:
        - category
        - correlationId
        - message
      type: object
      properties:
        category:
          type: string
          description: Die Fehlerkategorie
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Kontext zur Fehlerbedingung
          example: >-
            {invalidPropertyName=[propertyValue], missingScopes=[scope1,
            scope2]}
        correlationId:
          type: string
          description: >-
            Eine eindeutige ID für die Anfrage. Berücksichtigen Sie diesen Wert
            in Fehlerberichten oder Support-Tickets.
          format: uuid
          example: aeb5f871-7f07-4993-9211-075dc63e7cbf
        errors:
          type: array
          description: Weitere Informationen zum Fehler
          items:
            $ref: '#/components/schemas/ErrorDetail'
        links:
          type: object
          additionalProperties:
            type: string
          description: >-
            Eine Zuordnung der Namen von Links zu zugeordneten URIs mit einer
            Dokumentation zum Fehler oder empfohlenen Abhilfemaßnahmen
        message:
          type: string
          description: >-
            Eine für Menschen lesbare Nachricht mit einer Beschreibung des
            Fehlers und ggf. Abhilfemaßnahmen
          example: An error occurred
        subCategory:
          type: string
          description: Eine spezifische Kategorie, die genauere Details zum Fehler enthält
      example:
        message: Invalid input (details will vary based on the error)
        correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf
        category: VALIDATION_ERROR
        links:
          knowledge-base: https://www.hubspot.com/products/service/knowledge-base
    ErrorDetail:
      required:
        - message
      type: object
      properties:
        code:
          type: string
          description: Der Statuscode, der dem Fehlerdetail zugeordnet ist
        context:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Kontext zur Fehlerbedingung
          example: '{missingScopes=[scope1, scope2]}'
        in:
          type: string
          description: >-
            Der Name des Felds oder Parameters, in dem der Fehler gefunden
            wurde.
        message:
          type: string
          description: >-
            Eine für Menschen lesbare Nachricht mit einer Beschreibung des
            Fehlers und ggf. Abhilfemaßnahmen
        subCategory:
          type: string
          description: Eine spezifische Kategorie, die genauere Details zum Fehler enthält
  responses:
    Error:
      description: An error occurred.
      content:
        '*/*':
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.hubspot.com/oauth/authorize
          tokenUrl: https://api.hubapi.com/oauth/v1/token
          scopes:
            marketing.campaigns.read: ''
            marketing.campaigns.revenue.full.read: ''
            marketing.campaigns.revenue.read: ''
            marketing.campaigns.write: ''

````