> ## 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

> 광고 최적화 및 분석을 위한 사용자 활동 로그를 기록합니다.

지원되는 활동 유형:
- `activity.item_view`: 상품 상세 페이지 조회 기록
- `activity.add_cart`: 장바구니 추가 이벤트 기록
- `activity.page_view`: 페이지 탐색 이벤트 기록
- `activity.search`: 검색어 이벤트 기록
- `activity.purchase`: 구매 완료 기록

참고: 모든 요청에 대해 200 OK를 반환합니다. 유효하지 않은 스키마는 자동으로 무시됩니다.



## OpenAPI

````yaml /openapi/decision.api.ko-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: |-
    ### 소개
    이 문서는 Decision API의 Ad Serving API 및 Recommendation API 구성 요소를 다룹니다.
  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: |
      광고 전환, 노출, 클릭 로그를 수신하는 API — 광고 성능 추적 및 최적화에 필수적입니다.
    name: Ad Serving
  - description: >-
      광고 서빙 서버 캐시 관리 API


      ### **중요**

      Serving 서버의 광고 또는 추천 관련 캐시 데이터를 직접 조작하는 경우, Ad Manager를 통해 광고 또는 추천 데이터를
      **동시에 수정하지 않을 것을 강력히 권장합니다.**

      Serving 서버에서 수행된 변경 사항은 Ad Manager에 반영되지 않으며,

      이는 **데이터 무결성**을 위협할 수 있습니다.
    name: Cache Management
  - description: 광고 서빙 서버 설정 API
    name: Configuration
  - description: |
      광고 전환, 노출, 클릭 로그를 수신하는 API — 광고 성능 추적 및 최적화에 필수적입니다.
    name: Ad Serving
paths:
  /dmp/v0/log/activity:
    post:
      tags:
        - Activity Log
      summary: Record Activity Log
      description: |-
        광고 최적화 및 분석을 위한 사용자 활동 로그를 기록합니다.

        지원되는 활동 유형:
        - `activity.item_view`: 상품 상세 페이지 조회 기록
        - `activity.add_cart`: 장바구니 추가 이벤트 기록
        - `activity.page_view`: 페이지 탐색 이벤트 기록
        - `activity.search`: 검색어 이벤트 기록
        - `activity.purchase`: 구매 완료 기록

        참고: 모든 요청에 대해 200 OK를 반환합니다. 유효하지 않은 스키마는 자동으로 무시됩니다.
      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: 카탈로그 항목의 고유 식별자
          type: string
      required:
        - id
      type: object
    Device:
      properties:
        ext:
          description: 광고 시스템별 확장을 위한 예약 필드
        geo:
          anyOf:
            - $ref: '#/components/schemas/Geo'
            - type: 'null'
          description: 사용자의 현재 위치로 간주되는 기기의 위치 정보. Geo 객체로 정의됨.
        ip:
          description: 기기와 가장 가까운 IPv4 주소.
          type:
            - string
            - 'null'
        ua:
          description: >-
            브라우저 User-Agent 문자열. 이 필드는 브라우저의 원본 UA 문자열을 나타냄. 하위 호환성을 위해
            User-Agent Client-Hints가 사용 가능하더라도 UA 문자열을 항상 포함하는 것을 권장. 추정되거나 근사된
            UA는 허용되지 않음. Client-Hints가 지원되고 'sua' 필드가 있는 경우, 입찰자는 기기 유형, 브라우저 유형
            및 버전 감지를 위해 'sua'를 사용하고 'ua'는 무시하는 것을 권장.
          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

````