> ## 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-dev.json post /app/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: 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:
  /app/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
        '400':
          content:
            text/plain:
              schema:
                type: string
          description: Failed to parse the request body as JSON
        '415':
          content:
            text/plain:
              schema:
                type: string
          description: 'Expected request with `Content-Type: application/json`'
        '422':
          content:
            text/plain:
              schema:
                type: string
          description: Failed to deserialize the JSON body into the target type
        '500':
          description: Internal Server Error.
      security:
        - '': []
components:
  schemas:
    Placement:
      description: A logical grouping of ad units for inventory packaging.
      properties:
        ad_unit_ids:
          default: []
          description: List of ad unit IDs associated with this placement.
          items:
            format: uuid
            type: string
          maxItems: 1000
          type: array
        created_at:
          description: The date and time when the placement was created.
          format: date-time
          type: string
        created_by:
          description: The ID of the user who created the placement.
          format: uuid
          type: string
        description:
          description: Optional description of the placement.
          type:
            - string
            - 'null'
        ext:
          description: Extension field for additional placement-specific data.
        id:
          description: Unique identifier for the placement (UUID v4).
          format: uuid
          type: string
        name:
          description: Human-readable name of the placement.
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/PlacementStatus'
          default: INACTIVE
          description: Operational status of the placement. Defaults to `Inactive`.
      required:
        - id
        - name
        - created_by
        - created_at
      type: object
    PlacementStatus:
      description: Operational status of a placement.
      oneOf:
        - const: ACTIVE
          description: The placement is active and available for targeting.
          type: string
        - const: INACTIVE
          description: The placement is inactive and not available for targeting.
          type: string
        - const: ARCHIVED
          description: >-
            The placement has been archived and is no longer subject to
            modification or targeting.
          type: string

````