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

# Update Placements

> 
Stores placement information in the cache.
Used to update serving logic based on placement metadata.




## OpenAPI

````yaml /openapi/decision.api.en-0.2.2.json post /api/cache/placements
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:
  /api/cache/placements:
    post:
      tags:
        - Cache Management
      summary: Update Placements
      description: |

        Stores placement information in the cache.
        Used to update serving logic based on placement metadata.
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/Placement'
              type: array
        required: true
      responses:
        '204':
          description: Success
        '404':
          description: Placement not found.
        '500':
          description: Internal Server Error.
      security:
        - '': []
components:
  schemas:
    Placement:
      properties:
        created_at:
          description: The date and time when the placement was created.
          format: date-time
          type: string
        display:
          $ref: '#/components/schemas/DisplayPlacement'
          default:
            clktype: 1
            instl: 0
            priv: 0
            unit: 2
          description: >-
            Placement Subtype Object that indicates that this may be a display
            placement and provides additional detail related thereto. Refer to
            Object: DisplayPlacement.
        ext:
          $ref: '#/components/schemas/PlacementExt'
          description: >-
            Additional placement-specific extensions. Defaults to the
            `PlacementExt` object.
        id:
          description: ID of the placement (uuid4) a.k.a tagid in internal system.
          type: string
        siteid:
          description: (deprecated)
          type:
            - string
            - 'null'
        video:
          $ref: '#/components/schemas/VideoPlacement'
          default:
            boxing: 1
            maxext: 0
            podseq: 0
            skipafter: 0
            skipmin: 0
            slotinpod: 0
            unit: 2
          description: >-
            Placement Subtype Object that indicates that this may be a video
            placement and provides additional detail related thereto. Refer to
            Object: VideoPlacement.
      required:
        - created_at
        - id
      type: object
    DisplayPlacement:
      properties:
        ampren:
          format: uint8
          minimum: 0
          type:
            - integer
            - 'null'
        api:
          items:
            $ref: '#/components/schemas/ApiFramework'
          type:
            - array
            - 'null'
        clktype:
          $ref: '#/components/schemas/Click'
          default: 1
        context:
          anyOf:
            - $ref: '#/components/schemas/DisplayContext'
            - type: 'null'
        ctype:
          items:
            $ref: '#/components/schemas/CreativeSubtypesDisplay'
          type:
            - array
            - 'null'
        displayfmt:
          anyOf:
            - $ref: '#/components/schemas/DisplayFormat'
            - type: 'null'
        event:
          items:
            $ref: '#/components/schemas/EventSpec'
          type:
            - array
            - 'null'
        ext: true
        h:
          format: float
          type:
            - number
            - 'null'
        ifrbust:
          items:
            type: string
          type:
            - array
            - 'null'
        instl:
          default: 0
          format: uint8
          minimum: 0
          type: integer
        pos:
          anyOf:
            - $ref: '#/components/schemas/PlacementPosition'
            - type: 'null'
        priv:
          default: 0
          format: uint8
          minimum: 0
          type: integer
        ptype:
          anyOf:
            - $ref: '#/components/schemas/DisplayPlacementTypes'
            - type: 'null'
        secure:
          items:
            type: string
          type:
            - array
            - 'null'
        topframe:
          format: uint8
          minimum: 0
          type:
            - integer
            - 'null'
        unit:
          $ref: '#/components/schemas/Size'
          default: 2
        w:
          format: float
          type:
            - number
            - 'null'
      type: object
    PlacementExt:
      properties:
        approval_method:
          description: >-
            Approval method for the placement. Possible values: "admin", "auto",
            etc.
          type: string
        display:
          description: Display-specific extension data in JSON format.
        native:
          description: Native-specific extension data in JSON format.
        payout:
          description: >-
            Payout type for the placement. Possible values: "rates",
            "revenue_share", etc.
          type: string
        responsive:
          description: >-
            Indicates whether the placement is responsive. Possible values:
            "fixed", "responsive".
          type: string
        target_ecpm:
          default: 0
          description: >-
            Target eCPM (effective cost per mille) for the placement. Defaults
            to 0.0.
          format: double
          type: number
        video:
          description: Video-specific extension data in JSON format.
      required:
        - approval_method
        - display
        - native
        - payout
        - responsive
        - video
      type: object
    VideoPlacement:
      properties:
        api:
          items:
            $ref: '#/components/schemas/ApiFramework'
          type:
            - array
            - 'null'
        boxing:
          default: 1
          format: uint8
          minimum: 0
          type:
            - integer
            - 'null'
        clktype:
          anyOf:
            - $ref: '#/components/schemas/Click'
            - type: 'null'
        comp:
          items:
            $ref: '#/components/schemas/Companion'
          type:
            - array
            - 'null'
        comptype:
          items:
            $ref: '#/components/schemas/CompanionType'
          type:
            - array
            - 'null'
        ctype:
          items:
            format: uint32
            minimum: 0
            type: integer
          type:
            - array
            - 'null'
        delay:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        delivery:
          items:
            $ref: '#/components/schemas/DeliveryMethod'
          type:
            - array
            - 'null'
        expdir:
          items:
            $ref: '#/components/schemas/ExpandableDirection'
          type:
            - array
            - 'null'
        ext: true
        h:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        linear:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        maxbitr:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        maxdur:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        maxext:
          default: 0
          format: int32
          type:
            - integer
            - 'null'
        maxseq:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        mime:
          items:
            type: string
          type:
            - array
            - 'null'
        minbitr:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        mincpmpersec:
          format: double
          type:
            - number
            - 'null'
        mindur:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        overlayexpdir:
          items:
            $ref: '#/components/schemas/ExpandableDirection'
          type:
            - array
            - 'null'
        playend:
          anyOf:
            - $ref: '#/components/schemas/PlaybackCessationMode'
            - type: 'null'
        playmethod:
          items:
            $ref: '#/components/schemas/PlaybackMethod'
          type:
            - array
            - 'null'
        poddur:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        podid:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        podseq:
          anyOf:
            - $ref: '#/components/schemas/PodSequence'
            - type: 'null'
          default: 0
        pos:
          anyOf:
            - $ref: '#/components/schemas/PlacementPosition'
            - type: 'null'
        ptype:
          anyOf:
            - $ref: '#/components/schemas/PlacementSubtypeVideo'
            - type: 'null'
        rqddurs:
          items:
            format: uint32
            minimum: 0
            type: integer
          type:
            - array
            - 'null'
        skip:
          format: uint8
          minimum: 0
          type:
            - integer
            - 'null'
        skipafter:
          default: 0
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        skipmin:
          default: 0
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        slotinpod:
          anyOf:
            - $ref: '#/components/schemas/SlotPositionInPod'
            - type: 'null'
          default: 0
        unit:
          anyOf:
            - $ref: '#/components/schemas/Size'
            - type: 'null'
          default: 2
        w:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
      type: object
    ApiFramework:
      oneOf:
        - enum:
            - VPAID1_0
            - VPAID2_0
            - MRAID1_0
            - ORMMA
            - MRAID2_0
            - MRAID3_0
            - OMID1_0
            - SIMID1_0
            - SIMID1_1
          type: string
        - additionalProperties: false
          properties:
            VendorSpecific:
              format: uint16
              minimum: 0
              type: integer
          required:
            - VendorSpecific
          type: object
    Click:
      enum:
        - NonClickable
        - ClickableDetailsUnknown
        - ClickableEmbeddedBrowerWebView
        - ClickableNativeBrowser
      type: string
    DisplayContext:
      enum:
        - ContentCentric
        - ArticleContent
        - VideoContent
        - AudioContent
        - ImageContent
        - UserGeneratedContent
        - SocialCentric
        - EmailContent
        - ChatContent
        - ProductContext
        - AppStore
        - ProductReviews
      type: string
    CreativeSubtypesDisplay:
      enum:
        - HTML
        - AMPHTML
        - StructuredImageObject
        - StructuredNativeObject
      type: string
    DisplayFormat:
      properties:
        expdir:
          anyOf:
            - $ref: '#/components/schemas/ExpandableDirection'
            - type: 'null'
        ext: true
        h:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        hratio:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        w:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        wratio:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
      type: object
    EventSpec:
      properties:
        api:
          items:
            $ref: '#/components/schemas/ApiFramework'
          type:
            - array
            - 'null'
        ext: true
        jstrk:
          items:
            type: string
          type:
            - array
            - 'null'
        method:
          items:
            $ref: '#/components/schemas/EventTrackingMethod'
          type:
            - array
            - 'null'
        pxtrk:
          items:
            type: string
          type:
            - array
            - 'null'
        type:
          $ref: '#/components/schemas/EventType'
        wjs:
          default: 1
          format: int32
          type: integer
        wpx:
          default: 1
          format: int32
          type: integer
      required:
        - type
      type: object
    PlacementPosition:
      enum:
        - Unknown
        - AboveTheFold
        - Locked
        - BelowTheFold
        - Header
        - Footer
        - Sidebar
        - FullScreen
      type: string
    DisplayPlacementTypes:
      enum:
        - Feed
        - AtomicUnit
        - OutsideCore
        - RecommendationWidget
      type: string
    Size:
      enum:
        - DIPS
        - Inches
        - Centimeters
      type: string
    Companion:
      properties:
        display:
          anyOf:
            - $ref: '#/components/schemas/DisplayPlacement'
            - type: 'null'
        ext: true
        id:
          type:
            - string
            - 'null'
        vcm:
          format: int32
          type:
            - integer
            - 'null'
      type: object
    CompanionType:
      enum:
        - Static
        - HTML
        - IFrame
      type: string
    DeliveryMethod:
      enum:
        - Streaming
        - Progressive
        - Download
      type: string
    ExpandableDirection:
      enum:
        - Left
        - Right
        - Up
        - Down
        - FullScreen
        - ResizeMinimize
      type: string
    PlaybackCessationMode:
      enum:
        - OnVideoCompletion
        - OnLeavingViewport
        - OnLeavingViewportContinuesAsAUnit
      type: string
    PlaybackMethod:
      enum:
        - InitiateOnPageLoadWithSoundOn
        - InitiateOnPageLoadWithSoundOff
        - InitiateOnClickWithSoundOn
        - InitiateOnMouseOverWithSoundOn
        - InitiateOnEnterinViewportWithSoundOn
        - InitiateOnEnteringViewportWithSoundOff
        - ContinousPlayback
      type: string
    PodSequence:
      enum:
        - Last
        - Any
        - First
      type: string
    PlacementSubtypeVideo:
      enum:
        - InStream
        - InBanner
        - InArticle
        - InFeed
        - InterstitialSliderFloating
      type: string
    SlotPositionInPod:
      enum:
        - Last
        - Any
        - First
        - FirstOrLast
      type: string
    EventTrackingMethod:
      enum:
        - 1
        - 2
      type: integer
    EventType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
      type: integer

````