> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /experimental/retail-media/line-items/{line-item-id}/creatives/upsert

> Resolves each supplied stable creative identifier to its latest revision and
associates those revisions with the line item's proposal.



## OpenAPI

````yaml https://api.criteo.com/experimental/retailmedia/open-api-specifications.json post /experimental/retail-media/line-items/{line-item-id}/creatives/upsert
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - RetailMedia
  version: Experimental
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Accounts
  - name: Analytics
  - name: Audience
  - name: Balance
  - name: Campaign
  - name: Catalog
  - name: Gateway
  - name: OnSiteRecommendation
  - name: ThirdPartyAccounts
paths:
  /experimental/retail-media/line-items/{line-item-id}/creatives/upsert:
    post:
      tags:
        - Campaign
      summary: /experimental/retail-media/line-items/{line-item-id}/creatives/upsert
      description: "Resolves each supplied stable creative identifier to its latest revision and\r\nassociates those revisions with the line item's proposal."
      operationId: UpsertCreatives
      parameters:
        - name: line-item-id
          in: path
          description: The line item id.
          required: true
          schema:
            type: string
      requestBody:
        description: The creatives to upsert.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertLineItemCreativesRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpsertLineItemCreativesResponse'
      security:
        - oauth:
            - RetailMedia_Campaign_Manage
components:
  schemas:
    UpsertLineItemCreativesRequest:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpsertLineItemCreativesInputResource'
      additionalProperties: false
      description: >-
        A top-level object that encapsulates a Criteo API request for a single
        value object.
    UpsertLineItemCreativesResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/UpsertLineItemCreativesResource'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/CommonProblem'
          description: Errors that occured during this call.
          nullable: true
          readOnly: true
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/CommonProblem'
          description: Warnings that occured during this call.
          nullable: true
          readOnly: true
      additionalProperties: false
      description: >-
        A top-level object that encapsulates a Criteo API response for a single
        value object.
    UpsertLineItemCreativesInputResource:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/UpsertLineItemCreativesInput'
        type:
          type: string
          description: Type of the resource.
          nullable: true
      additionalProperties: false
      description: A value resource exposed by the API.
    UpsertLineItemCreativesResource:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/UpsertLineItemCreatives'
        type:
          type: string
          description: Type of the resource.
          nullable: true
      additionalProperties: false
      description: A value resource exposed by the API.
      nullable: true
    CommonProblem:
      type: object
      properties:
        code:
          type: string
          description: A machine-readable error code, expressed as a string value.
          nullable: true
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem
          nullable: true
        instance:
          type: string
          description: A URI that identifies the specific occurrence of the problem.
          nullable: true
        source:
          type: object
          additionalProperties:
            type: string
          description: >-
            A machine-readable structure to reference to the exact location(s)
            causing the error(s)
          nullable: true
        stackTrace:
          type: string
          nullable: true
        title:
          type: string
          description: A short human-readable description of the problem type
          nullable: true
        traceId:
          type: string
          description: The request correlation ID this problem comes from.
          nullable: true
        traceIdentifier:
          type: string
          description: >-
            The request correlation ID this problem comes from. (deprecated, use
            traceId instead)
          nullable: true
        type:
          enum:
            - unknown
            - access-control
            - authentication
            - authorization
            - availability
            - deprecation
            - quota
            - validation
          type: string
          description: The problem's category.
          nullable: true
      description: Common problem object.
    UpsertLineItemCreativesInput:
      required:
        - creativeType
      type: object
      properties:
        auctionCreativeDetails:
          $ref: '#/components/schemas/AuctionCreativeDetailsInput'
        creativeType:
          enum:
            - Unknown
            - AuctionCreative
            - PreferredDealsCreative
          type: string
        preferredDealsCreativeDetails:
          $ref: '#/components/schemas/PreferredDealsCreativeDetailsInput'
      additionalProperties: false
      description: Creatives to associate with a line item.
    UpsertLineItemCreatives:
      required:
        - mediaType
      type: object
      properties:
        auctionCreativeDetails:
          $ref: '#/components/schemas/AuctionCreativeDetails'
        mediaType:
          enum:
            - Unknown
            - Display
            - Video
          type: string
        preferredDealsCreativeDetails:
          $ref: '#/components/schemas/PreferredDealsCreativeDetails'
      additionalProperties: false
      description: Creatives associated with a line item.
      nullable: true
    AuctionCreativeDetailsInput:
      required:
        - lineItemCreatives
      type: object
      properties:
        lineItemCreatives:
          type: array
          items:
            $ref: '#/components/schemas/LineItemCreativeInput'
      additionalProperties: false
      description: The auction creatives to associate with a line item.
    PreferredDealsCreativeDetailsInput:
      required:
        - lineItemCreative
      type: object
      properties:
        lineItemCreative:
          $ref: '#/components/schemas/LineItemCreativeInput'
      additionalProperties: false
      description: The preferred-deal creative to associate with a line item.
    AuctionCreativeDetails:
      required:
        - lineItemCreatives
      type: object
      properties:
        lineItemCreatives:
          type: array
          items:
            $ref: '#/components/schemas/LineItemCreative'
      additionalProperties: false
      description: The auction creatives associated with a line item.
      nullable: true
    PreferredDealsCreativeDetails:
      required:
        - lineItemCreative
      type: object
      properties:
        lineItemCreative:
          $ref: '#/components/schemas/LineItemCreative'
      additionalProperties: false
      description: The preferred-deal creative associated with a line item.
      nullable: true
    LineItemCreativeInput:
      required:
        - creative
        - creativeProductCollections
      type: object
      properties:
        creative:
          $ref: '#/components/schemas/CreativeInput'
        creativeProductCollections:
          type: array
          items:
            $ref: '#/components/schemas/CreativeProductCollectionInput'
      additionalProperties: false
      description: >-
        A creative to associate with a line item, and the product collections
        configured on it.
    LineItemCreative:
      required:
        - approvalStatus
        - creative
        - creativeProductCollections
      type: object
      properties:
        approvalStatus:
          enum:
            - Unknown
            - Approved
            - AutoApproved
            - InReview
            - Rejected
            - AutoRejected
            - Unsubmitted
          type: string
        creative:
          $ref: '#/components/schemas/Creative'
        creativePreviewCode:
          type: string
          nullable: true
        creativeProductCollections:
          type: array
          items:
            $ref: '#/components/schemas/CreativeProductCollection'
      additionalProperties: false
      description: The association between a line item and one of its creatives.
    CreativeInput:
      required:
        - id
      type: object
      properties:
        id:
          type: string
      additionalProperties: false
      description: A reference to the creative to associate with a line item.
    CreativeProductCollectionInput:
      required:
        - isMandatory
        - products
      type: object
      properties:
        isMandatory:
          type: boolean
        products:
          type: array
          items:
            $ref: '#/components/schemas/DisplayProductInput'
      additionalProperties: false
      description: A collection of products to configure on a creative.
    Creative:
      required:
        - id
        - modifiedAt
      type: object
      properties:
        id:
          type: string
        modifiedAt:
          type: string
          format: date-time
      additionalProperties: false
      description: A reference to a creative associated with a line item.
    CreativeProductCollection:
      required:
        - isMandatory
        - products
      type: object
      properties:
        isMandatory:
          type: boolean
        products:
          type: array
          items:
            $ref: '#/components/schemas/DisplayProduct'
      additionalProperties: false
      description: A collection of products associated with a creative.
    DisplayProductInput:
      required:
        - id
      type: object
      properties:
        id:
          type: string
      additionalProperties: false
      description: A product to add to a creative's product collection.
    DisplayProduct:
      required:
        - approvalStatus
        - id
      type: object
      properties:
        approvalStatus:
          enum:
            - Unknown
            - Approved
            - AutoApproved
            - InReview
            - Rejected
            - AutoRejected
            - Unsubmitted
          type: string
        id:
          type: string
      additionalProperties: false
      description: A product in a creative's product collection.
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes:
            RetailMedia_Accounts_Read: >-
              Grants Read access to the capabilities from the Accounts domain,
              for RetailMedia applications
            RetailMedia_Analytics_Read: >-
              Grants Read access to the capabilities from the Analytics domain,
              for RetailMedia applications
            RetailMedia_Audience_Manage: >-
              Grants Manage access to the capabilities from the Audience domain,
              for RetailMedia applications
            RetailMedia_Balance_Read: >-
              Grants Read access to the capabilities from the Balance domain,
              for RetailMedia applications
            RetailMedia_Campaign_Manage: >-
              Grants Manage access to the capabilities from the Campaign domain,
              for RetailMedia applications
            RetailMedia_Campaign_Read: >-
              Grants Read access to the capabilities from the Campaign domain,
              for RetailMedia applications
            RetailMedia_Catalog_Manage: >-
              Grants Manage access to the capabilities from the Catalog domain,
              for RetailMedia applications
            RetailMedia_Catalog_Read: >-
              Grants Read access to the capabilities from the Catalog domain,
              for RetailMedia applications
            RetailMedia_OnSiteRecommendation_Read: >-
              Grants Read access to the capabilities from the
              OnSiteRecommendation domain, for RetailMedia applications
            RetailMedia_ThirdPartyAccounts_Manage: >-
              Grants Manage access to the capabilities from the
              ThirdPartyAccounts domain, for RetailMedia applications
        authorizationCode:
          authorizationUrl: https://api.criteo.com/oauth2
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes:
            RetailMedia_Accounts_Read: >-
              Grants Read access to the capabilities from the Accounts domain,
              for RetailMedia applications
            RetailMedia_Analytics_Read: >-
              Grants Read access to the capabilities from the Analytics domain,
              for RetailMedia applications
            RetailMedia_Audience_Manage: >-
              Grants Manage access to the capabilities from the Audience domain,
              for RetailMedia applications
            RetailMedia_Balance_Read: >-
              Grants Read access to the capabilities from the Balance domain,
              for RetailMedia applications
            RetailMedia_Campaign_Manage: >-
              Grants Manage access to the capabilities from the Campaign domain,
              for RetailMedia applications
            RetailMedia_Campaign_Read: >-
              Grants Read access to the capabilities from the Campaign domain,
              for RetailMedia applications
            RetailMedia_Catalog_Manage: >-
              Grants Manage access to the capabilities from the Catalog domain,
              for RetailMedia applications
            RetailMedia_Catalog_Read: >-
              Grants Read access to the capabilities from the Catalog domain,
              for RetailMedia applications
            RetailMedia_OnSiteRecommendation_Read: >-
              Grants Read access to the capabilities from the
              OnSiteRecommendation domain, for RetailMedia applications
            RetailMedia_ThirdPartyAccounts_Manage: >-
              Grants Manage access to the capabilities from the
              ThirdPartyAccounts domain, for RetailMedia applications

````