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

# 라인 아이템 등록

> 캐시에 라인 아이템 정보를 저장합니다.
광고 선택 및 중재 로직에서 사용합니다.



## OpenAPI

````yaml /openapi/decision.api.ko-dev.json post /app/api/cache/line-items
openapi: 3.1.0
info:
  contact:
    email: a2support@aiderx.io
    name: A2 Support
    url: https://aiderx.io
  description: |-
    ### 소개
    Decision API는 사용자 요청 또는 컨텍스트 정보를 바탕으로 광고나 콘텐츠를 실시간으로 선택하고 배포합니다.
    빠른 응답과 동적 기능을 통해 최적의 광고 또는 추천을 제공하여 사용자가 가능한 가장 높은 가치를 얻도록 합니다.

    다양한 알고리즘, 머신러닝 모델 및 규칙 기반 로직을 적용할 수 있어 시스템이 끊임없이 변하는 조건에 유연하게 적응할 수 있습니다.
  title: Decision API
  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: 광고 요청, 캐시 설정 및 광고 제공 모듈의 기타 매개변수를 구성하기 위한 API입니다.
    name: Ad Serving
  - description: 추천 요청을 위한 API
    name: Recommendation Serving
  - description: >-
      광고 제공 서버의 캐시를 조작하기 위한 API입니다.


      ### **중요**

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


      대신 모든 광고 또는 추천 데이터 변경은 Ad Manager API를 통해 처리하는 것을 **권장합니다.**

      Serving 서버에서 변경한 내용은 Ad Manager에 반영되지 않으므로 **데이터 무결성**이 손상될 수 있습니다.
    name: Cache Management
  - description: 광고 서빙 서버 설정 API
    name: Configuration
  - description: 광고 또는 추천과 관련된 전환, 노출 및 클릭 로그를 수신하는 API입니다.
    name: Ad Log
paths:
  /app/api/cache/line-items:
    post:
      tags:
        - Cache Management
      summary: 라인 아이템 등록
      description: |-
        캐시에 라인 아이템 정보를 저장합니다.
        광고 선택 및 중재 로직에서 사용합니다.
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/LineItem'
              type: array
        required: true
      responses:
        '204':
          description: 성공
        '400':
          content:
            text/plain:
              schema:
                type: string
          description: 요청 본문을 JSON으로 파싱하지 못했습니다.
        '415':
          content:
            text/plain:
              schema:
                type: string
          description: '`Content-Type: application/json`인 요청이 필요합니다.'
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: JSON 본문을 대상 형식으로 역직렬화하지 못했습니다.
        '500':
          description: 내부 서버 오류입니다.
      security:
        - '': []
components:
  schemas:
    LineItem:
      properties:
        ad_type:
          default: standard
          description: '라인 아이템의 광고 유형입니다(예: "standard", "decision").'
          type: string
        audience_segments:
          anyOf:
            - $ref: '#/components/schemas/LineItemAudienceSegment'
            - type: 'null'
          description: 라인 아이템과 연결된 선택적 오디언스 세그먼트입니다.
        bid_strategy:
          default: highest_volume
          description: '라인 아이템의 입찰 전략입니다(기본값: "highest_volume").'
          type: string
        budget:
          description: 총 예산입니다.
          format: double
          type: number
        creative_rotation:
          allOf:
            - $ref: '#/components/schemas/CreativeRotation'
          default:
            admission_confidence_penalty: 0
            posterior_temperature: 1
            prior_weight: 100
            temperature: 1
            type: optimized
            weights: []
          description: 크리에이티브 순환 전략입니다.
        custom_targeting:
          anyOf:
            - $ref: '#/components/schemas/CustomTargeting'
            - type: 'null'
          description: 라인 아이템의 선택적 사용자 지정 타기팅 조건입니다.
        daily_budget:
          description: 라인 아이템의 선택적 일일 예산입니다.
          format: double
          type:
            - number
            - 'null'
        description:
          description: 라인 아이템의 선택적 설명입니다.
          type:
            - string
            - 'null'
        end_date:
          description: 라인 아이템의 종료일(UTC)입니다.
          format: date-time
          type: string
        ext:
          description: 라인 아이템의 선택적 확장 정보입니다.
        goal:
          description: 목표입니다.
          type: string
        id:
          description: 라인 아이템의 ID(uuid7)입니다.
          format: uuid
          type: string
        max_bid:
          default: 0
          description: '라인 아이템의 최대 입찰 금액입니다(기본값: 0.0).'
          format: double
          type: number
        min_daily_imp:
          default: 1000
          description: '라인 아이템의 최소 일일 노출 수입니다(기본값: 1000.0).'
          format: double
          type: number
        name:
          description: 라인 아이템의 이름입니다.
          type: string
        oid:
          description: 상위 오더 ID입니다.
          format: uuid
          type: string
        owner_id:
          description: 소유자 ID입니다.
          format: uuid
          type: string
        pace_method:
          default: evenly
          description: 페이싱 방식입니다.
          type: string
        priority:
          default: 8
          description: 우선순위입니다.
          format: uint32
          minimum: 0
          type: integer
        schedule:
          anyOf:
            - $ref: '#/components/schemas/LineItemSchedule'
            - type: 'null'
          description: 라인 아이템의 선택적 일정입니다.
        start_date:
          description: 라인 아이템의 시작일(UTC)입니다.
          format: date-time
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/LineItemStatus'
          description: 라인 아이템의 상태입니다(draft, ready, preparing, delivering, archived).
        sub_goal:
          default: maximize_volume
          description: '라인 아이템의 하위 목표입니다(기본값: "maximize_volume").'
          type: string
        target_cpa:
          description: 목표 CPA입니다.
          format: double
          type: number
        target_cpm:
          default: 0
          description: '라인 아이템의 1,000회 노출당 목표 비용(CPM)입니다(기본값: 0.0).'
          format: double
          type: number
        target_volume:
          default: 0
          description: '라인 아이템의 목표 물량입니다(기본값: 0.0).'
          format: double
          type: number
      required:
        - id
        - name
        - start_date
        - end_date
        - goal
        - budget
        - status
        - owner_id
        - target_cpa
        - oid
      type: object
    LineItemAudienceSegment:
      properties:
        method:
          description: 일치 방식입니다.
          type: string
        segment_list:
          description: 오디언스 세그먼트 조건 목록입니다.
          items:
            $ref: '#/components/schemas/AudienceSegmentInfo'
          type: array
      required:
        - method
        - segment_list
      type: object
    CreativeRotation:
      properties:
        admission_confidence_penalty:
          default: 0
          format: float
          type: number
        creative_exposure_fatigue:
          anyOf:
            - $ref: '#/components/schemas/CreativeExposureFatigueConfig'
            - type: 'null'
        posterior_temperature:
          default: 1
          format: float
          type: number
        prior_weight:
          default: 100
          format: float
          type: number
        temperature:
          default: 1
          format: float
          type: number
        type:
          $ref: '#/components/schemas/CreativeRotationType'
        user_signal:
          anyOf:
            - $ref: '#/components/schemas/CreativeRotationUserSignal'
            - type: 'null'
        weights:
          default: []
          items:
            $ref: '#/components/schemas/CreativeRotationWeight'
          type: array
      required:
        - type
      type: object
    CustomTargeting:
      description: 사용자 지정 타기팅 조건 목록입니다. 조건은 AND로 결합됩니다.
      properties:
        conditions:
          items:
            $ref: '#/components/schemas/CustomTargetingCondition'
          type: array
      required:
        - conditions
      type: object
    LineItemSchedule:
      properties:
        days_of_week:
          description: 라인 아이템이 활성화되는 요일입니다(1-7이며, 1은 월요일입니다).
          items:
            format: uint32
            minimum: 0
            type: integer
          type: array
        time_ranges:
          description: '라인 아이템이 활성화되는 시간 범위입니다(예: [{"start": "08:00", "end": "18:00"}]).'
          items:
            $ref: '#/components/schemas/TimeRange'
          type: array
        timezone:
          description: '라인 아이템 일정의 선택적 시간대입니다(예: "Asia/Seoul").'
          type:
            - string
            - 'null'
      required:
        - days_of_week
        - time_ranges
      type: object
    LineItemStatus:
      enum:
        - draft
        - ready
        - preparing
        - delivering
        - archived
      type: string
    AudienceSegmentInfo:
      properties:
        id:
          description: 오디언스 세그먼트의 고유 식별자
          type: string
        name:
          description: 오디언스 세그먼트의 식별용 이름
          type: string
      required:
        - id
        - name
      type: object
    CreativeExposureFatigueConfig:
      properties:
        head:
          default:
            - 1.1799999475479126
            - 1.0800000429153442
            - 0.9800000190734864
            - 0.8999999761581421
            - 0.8199999928474426
          items:
            format: float
            type: number
          type: array
        tail_floor:
          default: 0.6499999761581421
          format: float
          type: number
        tail_step:
          default: 0.03999999910593033
          format: float
          type: number
      type: object
    CreativeRotationType:
      enum:
        - optimized
        - softmax
        - evenly
        - weighted
        - sequential
        - thompson_sampling
        - linucb_lite
      type: string
    CreativeRotationUserSignal:
      properties:
        enabled:
          default: false
          type: boolean
        prior_weight:
          default: 40
          format: float
          type: number
        propensity_multipliers:
          additionalProperties:
            format: float
            type: number
          type:
            - object
            - 'null'
        targeting_key:
          default: signal
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/CreativeRotationUserSignalType'
          default: fingerprint
      type: object
    CreativeRotationWeight:
      properties:
        crid:
          format: uuid
          type: string
        weight:
          format: uint32
          minimum: 0
          type: integer
      required:
        - crid
        - weight
      type: object
    CustomTargetingCondition:
      description: 하나의 사용자 지정 타기팅 조건입니다. 조건 안의 `values`는 OR로 결합됩니다.
      properties:
        key:
          $ref: '#/components/schemas/CustomTargetingKeyRef'
        operator:
          $ref: '#/components/schemas/CustomTargetingOperator'
        values:
          items:
            $ref: '#/components/schemas/CustomTargetingValueRef'
          type: array
      required:
        - key
        - operator
        - values
      type: object
    TimeRange:
      properties:
        end:
          description: '범위의 종료 시간입니다(예: "18:00").'
          type: string
        start:
          description: '범위의 시작 시간입니다(예: "08:00").'
          type: string
      required:
        - start
        - end
      type: object
    CreativeRotationUserSignalType:
      enum:
        - fingerprint
      type: string
    CustomTargetingKeyRef:
      description: >-
        사용자 지정 타기팅 키 참조입니다. 클라이언트는 `id`와 `code`를 모두 보내지만 서버는 `id`만 신뢰하며 저장 전에
        조회한 값으로 `code`를 덮어씁니다.
      properties:
        code:
          type: string
        id:
          format: uuid
          type: string
      required:
        - id
        - code
      type: object
    CustomTargetingOperator:
      description: 사용자 지정 타기팅 조건의 일치 연산자입니다.
      enum:
        - in
        - not_in
      type: string
    CustomTargetingValueRef:
      description: >-
        사용자 지정 타기팅 값 참조입니다. 클라이언트는 `id`와 `value`를 모두 보내지만 서버는 `id`만 신뢰하며 저장 전에
        조회한 값으로 `value`를 덮어씁니다.
      properties:
        id:
          format: uuid
          type: string
        match_type:
          allOf:
            - $ref: '#/components/schemas/MatchType'
          default: exact
        value:
          type: string
      required:
        - id
        - value
      type: object
    MatchType:
      enum:
        - exact
      type: string

````