> ## 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.add_cart`: Records cart addition events
- `activity.page_view`: Records page navigation events
- `activity.search`: Records search query events
- `activity.purchase`: Records completed purchases

Note: Returns 200 OK for all requests. Invalid schemas are silently ignored.



## OpenAPI

````yaml /openapi/decision.api.en-0.2.2.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: v0.2.2
  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: >-

      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 ad conversion, impression, and click logs — essential
      for tracking and optimizing advertisement performance.
    name: Ad Serving
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.add_cart`: Records cart addition events

        - `activity.page_view`: Records page navigation events

        - `activity.search`: Records search query events

        - `activity.purchase`: Records completed purchases


        Note: Returns 200 OK for all requests. Invalid schemas are silently
        ignored.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivityLog'
        required: true
      responses:
        '200':
          description: OK
      security:
        - '': []
components:
  schemas:
    ActivityLog:
      oneOf:
        - 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'
            schema:
              enum:
                - activity.item_view
              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:
            - catalogs
            - channel
            - device_id
            - schema
            - timestamp
            - user_id
          type: object
        - 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'
            schema:
              enum:
                - activity.add_cart
              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:
            - catalogs
            - channel
            - device_id
            - schema
            - timestamp
            - user_id
          type: object
        - 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'
            schema:
              enum:
                - activity.page_view
              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:
            - catalogs
            - channel
            - device_id
            - schema
            - timestamp
            - user_id
          type: object
        - 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
            schema:
              enum:
                - activity.search
              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:
            - channel
            - device_id
            - query
            - schema
            - timestamp
            - user_id
          type: object
        - 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'
            schema:
              enum:
                - activity.purchase
              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:
            - catalogs
            - channel
            - device_id
            - revenue
            - schema
            - timestamp
            - user_id
          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: int64
          type: integer
      required:
        - currency
        - revenue
      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

````