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

# Calculate Profile Aggregations

> A `GET` to the `/profiles/{profile}/aggregations/calculate` endpoint allows your application to calculate profile aggregations.



## OpenAPI

````yaml get /v3/profiles/{profile}/aggregations/calculate
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/profiles/{profile}/aggregations/calculate:
    get:
      tags:
        - Profile Aggregation
      summary: Calculate Profile Aggregations
      description: >-
        A `GET` to the `/profiles/{profile}/aggregations/calculate` endpoint
        allows your application to calculate profile aggregations.
      operationId: profileAggregation.calculate
      parameters:
        - name: profile
          in: path
          required: true
          description: The profile ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: '`ProfileAggregation`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProfileAggregation'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  schemas:
    ProfileAggregation:
      type: object
      properties:
        profile_id:
          type: string
        shop_days:
          type: string
        spend_12m:
          type: string
        spend_12m_now:
          type: string
        spend_all:
          type: string
        spend_atv_12m:
          type: string
        spend_atv_all:
          type: string
        discount_avg:
          type: string
        spend_first_date:
          type: string
        spend_last_date:
          type: string
        dimension_frequency:
          type: string
        dimension_recency:
          type: string
        dimension_join:
          type: string
        channel:
          type: string
        shop_count:
          type: string
        total_referred:
          type: string
        store_join:
          $ref: '#/components/schemas/Location'
        likely_country:
          type: string
        likely_country_score:
          type: string
        purchased_brands:
          type: string
        total_shop_days:
          type: string
        first_shop_days:
          type: string
        second_shop_days:
          type: string
        latest_shop_days:
          type: string
        average_shop_days:
          type: string
        second_shop_date:
          type: string
        previous_shop_date:
          type: string
        at_risk_date:
          type: string
        most_transacted_location:
          $ref: '#/components/schemas/Location'
        most_spend_location:
          $ref: '#/components/schemas/Location'
        most_spend_12m_location:
          $ref: '#/components/schemas/Location'
        latest_shop_spend:
          type: string
        latest_shop_currency:
          $ref: '#/components/schemas/Currency'
        latest_transacted_location:
          $ref: '#/components/schemas/Location'
        transacted_locations:
          type: string
        likely_country_iso:
          type: string
        likely_country_iso_score:
          type: string
        likely_state_iso:
          type: string
        likely_state_iso_score:
          type: string
        likely_region:
          type: string
        likely_region_score:
          type: string
        top_historic_status:
          $ref: '#/components/schemas/StatusOriginal'
      required:
        - profile_id
        - shop_days
        - spend_12m
        - spend_12m_now
        - spend_all
        - spend_atv_12m
        - spend_atv_all
        - discount_avg
        - spend_first_date
        - spend_last_date
        - dimension_frequency
        - dimension_recency
        - dimension_join
        - channel
        - shop_count
        - total_referred
        - store_join
        - likely_country
        - likely_country_score
        - purchased_brands
        - total_shop_days
        - first_shop_days
        - second_shop_days
        - latest_shop_days
        - average_shop_days
        - second_shop_date
        - previous_shop_date
        - at_risk_date
        - most_transacted_location
        - most_spend_location
        - most_spend_12m_location
        - latest_shop_spend
        - latest_shop_currency
        - latest_transacted_location
        - transacted_locations
        - likely_country_iso
        - likely_country_iso_score
        - likely_state_iso
        - likely_state_iso_score
        - likely_region
        - likely_region_score
        - top_historic_status
      title: ProfileAggregation
    Location:
      type: object
      properties:
        id:
          type: integer
        type:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        handle:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        timezone:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        is_published:
          type: boolean
        is_permanently_closed:
          type: boolean
        address:
          $ref: '#/components/schemas/Address'
        normal_hours:
          type: array
          items:
            $ref: '#/components/schemas/LocationHour'
        special_hours:
          type: array
          items:
            $ref: '#/components/schemas/LocationHour'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        custom_fields:
          type: object
          additionalProperties: {}
        icon:
          type:
            - string
            - 'null'
        country_iso_3:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
        departments:
          type: array
          items:
            $ref: '#/components/schemas/Department'
      required:
        - id
        - type
        - name
        - handle
        - description
        - phone
        - email
        - timezone
        - external_id
        - external_code
        - is_published
        - is_permanently_closed
        - address
        - normal_hours
        - special_hours
        - tags
        - custom_fields
        - icon
        - country_iso_3
        - image_url
        - created_at
        - updated_at
        - departments
      title: Location
    Currency:
      type: object
      properties:
        id:
          type: integer
        from:
          type: string
        to:
          type: string
        rate:
          type: number
        is_system:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - from
        - to
        - rate
        - is_system
        - created_at
        - updated_at
      title: Currency
    StatusOriginal:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        handle:
          type: string
        sort_order:
          type: string
        description:
          type: string
        short_description:
          type: string
        long_description:
          type: string
        terms_conditions:
          type: string
        icon:
          type: string
        image_url:
          type: string
        earn_instructions:
          type: string
        colour:
          type: string
        primary_colour:
          type: string
        secondary_colour:
          type: string
        text_colour:
          type: string
        code:
          type: string
        internal_notes:
          type: string
        group_name:
          type: string
        group_handle:
          type: string
        timezone:
          type: string
        period:
          type: string
        period_type:
          type: string
        absolute_expiry:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - handle
        - sort_order
        - description
        - short_description
        - long_description
        - terms_conditions
        - icon
        - image_url
        - earn_instructions
        - colour
        - primary_colour
        - secondary_colour
        - text_colour
        - code
        - internal_notes
        - group_name
        - group_handle
        - timezone
        - period
        - period_type
        - absolute_expiry
        - created_at
        - updated_at
      title: StatusOriginal
    Address:
      type: object
      properties:
        id:
          type: integer
        address_line_1:
          type: string
        address_line_2:
          type:
            - string
            - 'null'
        address_line_3:
          type:
            - string
            - 'null'
        company:
          type:
            - string
            - 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
        city:
          type: string
        postcode:
          type: string
        state:
          type:
            - string
            - 'null'
        country:
          type: string
        notes:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        is_default:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
        meta:
          type:
            - array
            - 'null'
          items: {}
        name:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        iso:
          type:
            - string
            - 'null'
        iso_state:
          type:
            - string
            - 'null'
        profile_id:
          type:
            - string
            - 'null'
        custom_fields:
          type: object
          additionalProperties: {}
      required:
        - id
        - address_line_1
        - address_line_2
        - address_line_3
        - company
        - latitude
        - longitude
        - city
        - postcode
        - state
        - country
        - notes
        - external_id
        - is_default
        - created_at
        - updated_at
        - meta
        - name
        - type
        - phone
        - iso
        - iso_state
        - profile_id
        - custom_fields
      title: Address
    LocationHour:
      type: array
      items: {}
      title: LocationHour
    Tag:
      type: string
      title: Tag
    Department:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        handle:
          type: string
        external_id:
          type:
            - string
            - 'null'
        external_code:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        short_description:
          type:
            - string
            - 'null'
        url:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        internal_note:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        brand_id:
          type: integer
        location_id:
          type:
            - integer
            - 'null'
        brand:
          type: object
          properties:
            name:
              type: string
            handle:
              type: string
          required:
            - name
            - handle
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - handle
        - external_id
        - external_code
        - description
        - short_description
        - url
        - image_url
        - internal_note
        - meta
        - brand_id
        - location_id
        - brand
        - created_at
        - updated_at
      title: Department
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message

````