> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.spott.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a placement

> Updates the placement with the specified ID. You can update dates, template, placed-by user, and custom attribute values.



## OpenAPI

````yaml /openapi-private.json patch /placements/{id}
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /placements/{id}:
    patch:
      tags:
        - Placements
      summary: Update a placement
      description: >-
        Updates the placement with the specified ID. You can update dates,
        template, placed-by user, and custom attribute values.
      operationId: updatePlacement
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlacementDto'
      responses:
        '204':
          description: Placement updated successfully
        '400':
          description: Bad request - invalid data (e.g., end date must be after start date)
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ExceptionBaseDto'
                  - type: object
                    properties:
                      statusCode:
                        type: number
                        example: 400
                      message:
                        type: string
                        example: End date must be after start date
                      error:
                        type: string
                        example: Bad Request
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '404':
          description: Placement not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    UpdatePlacementDto:
      type: object
      properties:
        templateId:
          type: string
        placedByUserId:
          type: string
        placedAtDate:
          $ref: '#/components/schemas/DateISO'
        startDate:
          anyOf:
            - $ref: '#/components/schemas/DateISO'
            - type: 'null'
        endDate:
          anyOf:
            - $ref: '#/components/schemas/DateISO'
            - type: 'null'
        attributeValues:
          type: array
          items:
            $ref: '#/components/schemas/UpdatePlacementAttributeValueDto'
      id: PrivateUpdatePlacementDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    DateISO:
      id: DateISO
      format: date-time
      anyOf:
        - type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        - type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
    UpdatePlacementAttributeValueDto:
      type: object
      properties:
        attributeDefinitionId:
          type: string
          minLength: 1
        value:
          $ref: '#/components/schemas/CustomAttributeTypeDto'
      required:
        - attributeDefinitionId
        - value
      id: PrivateUpdatePlacementAttributeValueDto
    CustomAttributeTypeDto:
      oneOf:
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customText
            text:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - viewType
            - text
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customNumber
            number:
              anyOf:
                - type: number
                - type: 'null'
          required:
            - viewType
            - number
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customCheckbox
            checked:
              anyOf:
                - type: boolean
                - type: 'null'
          required:
            - viewType
            - checked
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customDate
            date:
              anyOf:
                - $ref: '#/components/schemas/DateISO'
                - type: 'null'
          required:
            - viewType
            - date
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customTimestamp
            timestamp:
              anyOf:
                - $ref: '#/components/schemas/DateISO'
                - type: 'null'
          required:
            - viewType
            - timestamp
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customRating
            rating:
              anyOf:
                - type: number
                - type: 'null'
          required:
            - viewType
            - rating
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customSelect
            select:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - viewType
            - select
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customMultiSelect
            multiSelect:
              type: array
              items:
                type: string
          required:
            - viewType
            - multiSelect
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customCurrency
            monetaryAmount:
              anyOf:
                - type: object
                  properties:
                    amount:
                      type: number
                    currency:
                      $ref: '#/components/schemas/DmCurrency'
                  required:
                    - amount
                    - currency
                - type: 'null'
          required:
            - viewType
            - monetaryAmount
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customDateRange
            dateRange:
              anyOf:
                - type: object
                  properties:
                    startDate:
                      $ref: '#/components/schemas/DateISO'
                    endDate:
                      anyOf:
                        - $ref: '#/components/schemas/DateISO'
                        - type: 'null'
                  required:
                    - startDate
                    - endDate
                - type: 'null'
          required:
            - viewType
            - dateRange
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customDuration
            duration:
              anyOf:
                - type: number
                - type: 'null'
          required:
            - viewType
            - duration
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customUrl
            url:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - viewType
            - url
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customEntity
            type:
              type: string
              enum:
                - user
            id:
              anyOf:
                - type: string
                - type: 'null'
            entity:
              anyOf:
                - type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    avatarUrl:
                      anyOf:
                        - type: string
                        - type: 'null'
                    deactivatedAt:
                      anyOf:
                        - $ref: '#/components/schemas/DateISO'
                        - type: 'null'
                  required:
                    - id
                    - name
                    - avatarUrl
                    - deactivatedAt
                - type: 'null'
          required:
            - viewType
            - type
            - id
        - type: object
          properties:
            viewType:
              type: string
              enum:
                - customMultiEntity
            type:
              type: string
              enum:
                - user
            ids:
              type: array
              items:
                type: string
            entities:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  avatarUrl:
                    anyOf:
                      - type: string
                      - type: 'null'
                  deactivatedAt:
                    anyOf:
                      - $ref: '#/components/schemas/DateISO'
                      - type: 'null'
                required:
                  - id
                  - name
                  - avatarUrl
                  - deactivatedAt
          required:
            - viewType
            - type
            - ids
      id: PrivateCustomAttributeTypeDto
    DmCurrency:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTC
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNH
        - CNY
        - COP
        - CRC
        - CUC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GGP
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - IMP
        - INR
        - IQD
        - IRR
        - ISK
        - JEP
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VEF
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XCD
        - XCG
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - YER
        - ZAR
        - ZMW
        - ZWG
        - ZWL
      id: DmCurrency
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for authentication. Get your API key from Settings → API Keys in
        your Spott dashboard.

````