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

> 
Stores creative information in the cache.
Used to build ad responses during ad serving.




## OpenAPI

````yaml /openapi/decision.api.en-dev.json post /app/api/cache/creatives
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/creatives:
    post:
      tags:
        - Cache Management
      summary: Update Creatives
      description: |

        Stores creative information in the cache.
        Used to build ad responses during ad serving.
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/Creative'
              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:
    Creative:
      properties:
        advertiser_domain:
          description: Advertiser domain using this creative.
          type:
            - string
            - 'null'
        advertiser_id:
          description: Advertiser ID using this creative.
          format: uuid
          type:
            - string
            - 'null'
        banner:
          anyOf:
            - $ref: '#/components/schemas/Banner'
            - type: 'null'
          description: Banner creative content.
          examples:
            - ext: {}
              img: ''
              link:
                ext: {}
                url: ''
        description:
          description: Optional description of the creative.
          type:
            - string
            - 'null'
        end_date:
          format: date-time
          type:
            - string
            - 'null'
        ext:
          default: {}
          description: extension for the creative
        height:
          description: Height of the creative in pixels.
          format: uint32
          minimum: 0
          type: integer
        id:
          description: Unique identifier for the creative (UUID v7).
          format: uuid
          type: string
        name:
          description: Human-readable name of the creative.
          type: string
        native:
          anyOf:
            - $ref: '#/components/schemas/Native'
            - type: 'null'
          description: Native creative content
          examples:
            - asset:
                - id: 3
                  title:
                    text: Sample Headline
              link:
                url: https://example.com/click
        owner_id:
          description: User ID of the admin/operator who created the creative.
          format: uuid
          type: string
        start_date:
          format: date-time
          type:
            - string
            - 'null'
        status:
          allOf:
            - $ref: '#/components/schemas/CreativeStatus'
          default: inactive
          description: Status of the creative.
        type:
          allOf:
            - $ref: '#/components/schemas/CreativeType'
          description: Type of the creative (e.g., "banner", "video", "native").
        video:
          anyOf:
            - $ref: '#/components/schemas/Video'
            - type: 'null'
          description: Video creative content.
          examples:
            - adm: ''
              ctype: 2
              dur: 0
              ext:
                cdn: ''
                linear: 1
                url: ''
              mime: []
        width:
          description: Width of the creative in pixels.
          format: uint32
          minimum: 0
          type: integer
      required:
        - id
        - type
        - name
        - width
        - height
        - owner_id
      type: object
    Banner:
      properties:
        ext: true
        img:
          type: string
        link:
          anyOf:
            - $ref: '#/components/schemas/LinkAsset'
            - type: 'null'
      required:
        - img
      type: object
    Native:
      properties:
        asset:
          items:
            $ref: '#/components/schemas/Asset'
          type:
            - array
            - 'null'
        ext: true
        link:
          anyOf:
            - $ref: '#/components/schemas/LinkAsset'
            - type: 'null'
      type: object
    CreativeStatus:
      enum:
        - inactive
        - active
      type: string
    CreativeType:
      enum:
        - banner
        - video
        - native
      type: string
    Video:
      properties:
        adm:
          type:
            - string
            - 'null'
        api:
          items:
            format: uint16
            maximum: 65535
            minimum: 0
            type: integer
          type:
            - array
            - 'null'
        ctype:
          format: uint16
          maximum: 65535
          minimum: 0
          type:
            - integer
            - 'null'
        curl:
          type:
            - string
            - 'null'
        dur:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        ext: true
        mime:
          items:
            type: string
          type:
            - array
            - 'null'
      type: object
    LinkAsset:
      description: >-
        This object identifies the native asset as a link asset and is used to
        define navigation for call-to-action or other activations (i.e.,
        clicks). A link asset can be independent or associated with the overall
        native ad (i.e., a default for all assets).
      properties:
        ext: true
        trkr:
          items:
            type: string
          type:
            - array
            - 'null'
        url:
          type: string
        urlfb:
          type:
            - string
            - 'null'
      required:
        - url
      type: object
    Asset:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/DataAsset'
            - type: 'null'
        ext: true
        id:
          format: int32
          type:
            - integer
            - 'null'
        image:
          anyOf:
            - $ref: '#/components/schemas/ImageAsset'
            - type: 'null'
        link:
          anyOf:
            - $ref: '#/components/schemas/LinkAsset'
            - type: 'null'
        req:
          anyOf:
            - $ref: '#/components/schemas/IsRequired'
            - type: 'null'
        title:
          anyOf:
            - $ref: '#/components/schemas/TitleAsset'
            - type: 'null'
        video:
          anyOf:
            - $ref: '#/components/schemas/VideoAsset'
            - type: 'null'
      type: object
    DataAsset:
      description: >-
        This object identifies the native asset as a data asset. A data asset is
        used for all miscellaneous elements such as brand name, ratings, stars,
        review count, downloads, price, counts, etc. It is purposefully generic
        to support native elements not currently contemplated by this
        specification.
      properties:
        ext: true
        len:
          format: int32
          type:
            - integer
            - 'null'
        type:
          anyOf:
            - $ref: '#/components/schemas/NativeDataAssetType'
            - type: 'null'
        value:
          type: string
      required:
        - value
      type: object
    ImageAsset:
      description: >-
        This object identifies the native asset as a image asset. Image assets
        are use for such elements as the actual creative images and icons.
      properties:
        ext: true
        h:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        type:
          anyOf:
            - $ref: '#/components/schemas/NativeImageAssetType'
            - type: 'null'
        url:
          type: string
        w:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
      required:
        - url
      type: object
    IsRequired:
      enum:
        - 0
        - 1
      type: integer
      x-enum-varnames:
        - 'No'
        - 'Yes'
    TitleAsset:
      description: >-
        This object identifies the native asset as a title asset, which is
        essentially just a plain text string with specified length.
      properties:
        ext: true
        len:
          format: uint32
          minimum: 0
          type:
            - integer
            - 'null'
        text:
          type: string
      required:
        - text
      type: object
    VideoAsset:
      description: >-
        This object identifies the native asset as a video asset. Video markup
        (e.g., VAST) must be either included or referenced.
      properties:
        adm:
          type:
            - string
            - 'null'
        curl:
          type:
            - string
            - 'null'
        ext: true
      type: object
    NativeDataAssetType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 500
      type: integer
      x-enum-varnames:
        - Sponsored
        - Desc
        - Rating
        - Likes
        - Downloads
        - Price
        - SalePrice
        - Phone
        - Address
        - Desc2
        - DisplayUrl
        - CtaText
        - Other
    NativeImageAssetType:
      enum:
        - 1
        - 2
        - 3
        - 4
        - 500
      type: integer
      x-enum-varnames:
        - Icon
        - Main
        - Logo
        - Thumbnail
        - Other

````