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

# Record Activity Log

> Records user activity logs for advertising optimization and analytics.

Supported activity types:
- `activity.item_view`: Records product detail page views
- `activity.item_click`: Records clicks on catalog items
- `activity.add_cart`: Records cart addition events
- `activity.page_view`: Records page navigation events
- `activity.search`: Records search query events
- `activity.purchase`: Records completed purchases
- `activity.wait`: Records waiting events
- `activity.resv`: Records reservation events
- `activity.bmrk`: Records bookmark events

The request is accepted for downstream DMP processing. Processing and persistence occur downstream and are not specified here.



## OpenAPI

````yaml /openapi/decision.api.en-dev.json post /dmp/v0/log/activity
openapi: 3.1.0
info:
  contact:
    email: a2support@aiderx.io
    name: A2 Support
    url: https://aiderx.io
  description: >+

    ### Introduction

    The Decision API is responsible for selecting and distributing ads or
    content based on user requests or contextual information, all in real time.

    Its rapid response and dynamic capabilities enable the **optimal** ad or
    recommendation to be served, ensuring users receive the highest possible
    value.


    A variety of algorithms, machine learning models, and rule-based logic can
    be applied, allowing the system to **adapt flexibly** to constantly changing
    conditions.

  title: Decision APIs
  version: dev
  x-logo:
    altText: A2 Logo
    url: >-
      https://cdn.prod.website-files.com/668de9e1f25ab5675d87758d/6690cf1bdce95af5e3522c25_a2_logo_800_250.png
servers: []
security: []
tags:
  - description: >

      Ad Serving APIs for requesting ads and configuring cache settings and
      other parameters of the ad serving modules.
    name: Ad Serving
  - description: |

      Recommendation Serving APIs for requesting recommendations.
    name: Recommendation Serving
  - description: >-

      APIs for manipulating caches of the serving server.


      ### **Important**

      If you directly manipulate the cached data related to advertising or
      recommendations on the Serving server,

      we **strongly advise** against also modifying the advertising or
      recommendation data through the Ad Manager.


      Alternatively, we **recommend** handling any advertising or recommendation
      data modifications via the Ad Manager APIs.

      Any changes made on the Serving server will **not** be reflected in the Ad
      Manager,

      which can compromise **data integrity**.
    name: Cache Management
  - description: |-

      APIs for manipulating configurations of the serving server
    name: Configuration
  - description: >

      APIs for receiving conversion, impression, and click logs related to ads
      or recommendations.
    name: Ad Log
paths:
  /dmp/v0/log/activity:
    post:
      tags:
        - Activity Log
      summary: Record Activity Log
      description: >-
        Records user activity logs for advertising optimization and analytics.


        Supported activity types:

        - `activity.item_view`: Records product detail page views

        - `activity.item_click`: Records clicks on catalog items

        - `activity.add_cart`: Records cart addition events

        - `activity.page_view`: Records page navigation events

        - `activity.search`: Records search query events

        - `activity.purchase`: Records completed purchases

        - `activity.wait`: Records waiting events

        - `activity.resv`: Records reservation events

        - `activity.bmrk`: Records bookmark events


        The request is accepted for downstream DMP processing. Processing and
        persistence occur downstream and are not specified here.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivityLog'
        required: true
      responses:
        '200':
          description: Accepted for downstream processing.
      security:
        - '': []
components:
  schemas:
    ActivityLog:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/ItemViewEvent'
          properties:
            schema:
              const: activity.item_view
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/ItemClickEvent'
          properties:
            schema:
              const: activity.item_click
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/AddCartEvent'
          properties:
            schema:
              const: activity.add_cart
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/PageViewEvent'
          properties:
            schema:
              const: activity.page_view
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/SearchEvent'
          properties:
            schema:
              const: activity.search
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/PurchaseEvent'
          properties:
            schema:
              const: activity.purchase
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/WaitingEvent'
          properties:
            schema:
              const: activity.wait
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/ReservationEvent'
          properties:
            schema:
              const: activity.resv
              type: string
          required:
            - schema
          type: object
        - allOf:
            - $ref: '#/components/schemas/BookmarkEvent'
          properties:
            schema:
              const: activity.bmrk
              type: string
          required:
            - schema
          type: object
    ItemViewEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
      type: object
    ItemClickEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
      type: object
    AddCartEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
      type: object
    PageViewEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
      type: object
    SearchEvent:
      properties:
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        query:
          type: string
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - query
      type: object
    PurchaseEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        revenue:
          $ref: '#/components/schemas/Revenue'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
        - revenue
      type: object
    WaitingEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
      type: object
    ReservationEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        revenue:
          $ref: '#/components/schemas/Revenue'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
        - revenue
      type: object
    BookmarkEvent:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/Catalog'
          type: array
        channel:
          description: >-
            Channel through which the activity occurred (e.g., 'web', 'mobile',
            'app')
          type: string
        device:
          anyOf:
            - $ref: '#/components/schemas/Device'
            - type: 'null'
          description: Optional AdCom v1.0 Device information
        device_id:
          description: Unique identifier for the device used
          type: string
        id:
          description: Optional unique identifier for the activity event
          type:
            - string
            - 'null'
        page_id:
          description: >-
            Optional identifier for the specific page where the activity
            occurred
          type:
            - string
            - 'null'
        timestamp:
          description: Unix timestamp when the activity occurred
          format: int64
          type: integer
        user_id:
          description: Unique identifier for the user performing the activity
          type: string
      required:
        - timestamp
        - channel
        - user_id
        - device_id
        - catalogs
      type: object
    Catalog:
      properties:
        id:
          description: Unique identifier for the catalog item
          type: string
      required:
        - id
      type: object
    Device:
      properties:
        ext:
          description: >-
            Placeholder for advertising-system specific extensions to this
            object
        geo:
          anyOf:
            - $ref: '#/components/schemas/Geo'
            - type: 'null'
          description: >-
            Location of the device assumed to be the user’s current location
            defined by a Geo object
        ip:
          description: IPv4 address closest to device.
          type:
            - string
            - 'null'
        ua:
          description: |-
            Browser user agent string. This field represents a raw user
                agent string from the browser. For backwards compatibility,
                exchanges are recommended to always populate ‘ua’ with the
                User-Agent string, when available from the end user’s device,
                even if an alternative representation, such as the User-Agent
                Client-Hints, is available and is used to populate ‘sua’. No
                inferred or approximated user agents are expected in this field.
                If a client supports User-Agent Client Hints, and ‘sua’ field is
                present, bidders are recommended to rely on ‘sua’ for
                detecting device type, browser type and version and other
                purposes that rely on the user agent information, and ignore
                ‘ua’ field. This is because the ‘ua’ may contain a frozen or
                reduced user agent string.
          type:
            - string
            - 'null'
      type: object
    Revenue:
      properties:
        currency:
          description: The currency code for the transaction (e.g., 'USD', 'KRW')
          type: string
        revenue:
          description: The monetary amount of the transaction
          format: double
          type: number
      required:
        - revenue
        - currency
      type: object
    Geo:
      properties:
        accuracy:
          format: int32
          type:
            - integer
            - 'null'
        city:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
        ext: true
        ipservice:
          anyOf:
            - $ref: '#/components/schemas/IpLocationService'
            - type: 'null'
        lastfix:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        lat:
          format: float
          type:
            - number
            - 'null'
        lon:
          format: float
          type:
            - number
            - 'null'
        metro:
          type:
            - string
            - 'null'
        region:
          type:
            - string
            - 'null'
        regionfips104:
          type:
            - string
            - 'null'
        type:
          anyOf:
            - $ref: '#/components/schemas/LocationType'
            - type: 'null'
        utcoffset:
          format: int32
          type:
            - integer
            - 'null'
        zip:
          type:
            - string
            - 'null'
      type: object
    IpLocationService:
      enum:
        - 1
        - 2
        - 3
        - 4
      type: integer
    LocationType:
      enum:
        - 1
        - 2
        - 3
      type: integer

````