# Archive Promotion

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/content/management/promotions/{id}/archive:
    put:
      summary: Archive Promotion
      deprecated: false
      description: ''
      tags:
        - API Reference/Management API/CMS/Promotions
      parameters:
        - name: id
          in: path
          description: ''
          required: true
          example: 1
          schema:
            type: integer
        - name: Content-Type
          in: header
          description: '[Details](doc-341635)'
          required: true
          example: application/json
          schema:
            type: string
            default: application/json
            const: application/json
        - name: X-User-Agent
          in: header
          description: Arbitrary identifier of your client. [Details](doc-341635)
          required: true
          example: '{{X_USER_AGENT}}'
          schema:
            type: string
            default: '{{X_USER_AGENT}}'
        - name: X-Product-Name
          in: header
          description: API Product for API context. [Details](doc-341635)
          required: true
          example: '{{PRODUCT_NAME}}'
          schema:
            type: string
            default: '{{PRODUCT_NAME}}'
        - name: X-Loyalty-Club-Slug
          in: header
          description: LoyaltyClub for API context. [Details](doc-342138)
          required: false
          example: '{{LOYALTY_CLUB_SLUG}}'
          schema:
            type: string
            default: '{{LOYALTY_CLUB_SLUG}}'
        - name: X-Customer
          in: header
          description: Customer for API context.  [Details](doc-342139)
          required: false
          example: '{{CUSTOMER_ID}}'
          schema:
            type: string
            default: '{{CUSTOMER_ID}}'
        - name: Authorization
          in: header
          description: '[Member](doc-342129) or [User](doc-342130) Authorization.'
          required: false
          example: Bearer {{_OAUTH_TOKEN}}
          schema:
            type: string
            default: Bearer {{_OAUTH_TOKEN}}
        - name: X-Client-Authorization
          in: header
          description: '[Token](doc-342128) Authorization.'
          example: '{{API_TOKEN}}'
          schema:
            type: string
            default: '{{API_TOKEN}}'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  promotion:
                    $ref: '#/components/schemas/Promotion'
                x-apidog-orders:
                  - promotion
                required:
                  - promotion
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
        '404':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  error:
                    type: string
                    examples:
                      - Record not found
                x-apidog-orders:
                  - error
                required:
                  - error
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Record Not Found
      security: []
      x-apidog-folder: API Reference/Management API/CMS/Promotions
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/346351/apis/api-4284311-run
components:
  schemas:
    Promotion:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/id1'
        title:
          anyOf:
            - &ref_0
              $ref: '#/components/schemas/LocalizedContent'
            - type: 'null'
        body:
          anyOf:
            - *ref_0
            - type: 'null'
        status:
          $ref: '#/components/schemas/cms.status'
        visible_since:
          anyOf:
            - $ref: '#/components/schemas/cms.visible_since'
            - type: 'null'
        visible_until:
          anyOf:
            - $ref: '#/components/schemas/cms.visible_until'
            - type: 'null'
        usable_since:
          anyOf:
            - &ref_1
              $ref: '#/components/schemas/date_time'
            - type: 'null'
          description: 'Date since the record is available to users '
        usable_until:
          anyOf:
            - *ref_1
            - type: 'null'
          description: 'Date until the record is available to users '
        store_id:
          anyOf:
            - $ref: '#/components/schemas/id.store_id'
            - type: 'null'
        collection_id:
          description: >-
            ID of
            [Collection](https://api.developer.placewise.com/doc-365461.md) the
            record belongs to
          $ref: '#/components/schemas/id'
        tag_ids:
          anyOf:
            - $ref: '#/components/schemas/tag_ids'
            - type: 'null'
          description: >-
            ID of record's
            [Tags](https://api.developer.placewise.com/doc-346913.md) 
        image:
          description: >-
            Must be uploaded as a
            [File](https://api.developer.placewise.com/doc-341715.md) of type:
            offer_image
          $ref: '#/components/schemas/File'
        publication_status:
          $ref: '#/components/schemas/cms.publication_status'
          readOnly: true
        created_at:
          $ref: '#/components/schemas/date_time.created_at'
        updated_at:
          $ref: '#/components/schemas/date_time.updated_at'
        archived_at:
          $ref: '#/components/schemas/date_time.archived_at'
      x-apidog-orders:
        - id
        - title
        - body
        - status
        - visible_since
        - visible_until
        - usable_since
        - usable_until
        - store_id
        - collection_id
        - tag_ids
        - image
        - publication_status
        - created_at
        - updated_at
        - archived_at
      required:
        - id
        - title
        - body
        - status
        - visible_since
        - visible_until
        - store_id
        - collection_id
        - tag_ids
        - image
        - publication_status
        - created_at
        - updated_at
        - archived_at
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    date_time.archived_at:
      type: string
      description: Time of the record archivization
      format: date-time
      examples:
        - '2022-11-15T16:25:58.099512Z'
      readOnly: true
      nullable: true
      x-apidog-folder: ''
    date_time.updated_at:
      type: string
      description: Time of the last record update
      format: date-time
      examples:
        - '2022-11-15T16:25:58.099512Z'
      readOnly: true
      x-apidog-folder: ''
    date_time.created_at:
      type: string
      description: Time of record creation
      format: date-time
      examples:
        - '2022-11-05T16:25:58.099512Z'
      readOnly: true
      x-apidog-folder: ''
    cms.publication_status:
      type: string
      description: >-
        Visibility status of the record in [CMS Public API](doc-341653) that
        takes into the consideration `status`, `visible_since`  and
        `visible_until` dates
      enum:
        - published
        - draft
        - expired
        - scheduled
      examples:
        - published
      readOnly: true
      x-apidog-enum:
        - value: published
          name: ''
          description: ''
        - value: draft
          name: ''
          description: ''
        - value: expired
          name: ''
          description: ''
        - value: scheduled
          name: ''
          description: ''
      x-apidog-folder: ''
    File:
      type: object
      properties:
        url:
          type: string
          format: uri
          readOnly: true
          examples:
            - https://example.com/image.png
        identifier:
          type: string
          description: Only present when parent record has many files
          examples:
            - '1'
        mime_type:
          type: string
          examples:
            - image/jpeg
          readOnly: true
          description: Only present in certain circumstances
          nullable: true
        created_at:
          type: string
          format: date-time
          examples:
            - '2022-11-09T15:46:00.252860Z'
        updated_at:
          type: string
          format: date-time
          readOnly: true
          examples:
            - '2022-11-09T15:46:00.252860Z'
        image_details:
          type: object
          properties:
            width:
              type: integer
              minimum: 1
            height:
              type: integer
              minimum: 1
          x-apidog-orders:
            - width
            - height
          x-apidog-ignore-properties: []
          nullable: true
      x-apidog-orders:
        - url
        - identifier
        - mime_type
        - created_at
        - updated_at
        - image_details
      required:
        - url
        - created_at
        - updated_at
      readOnly: true
      x-apidog-ignore-properties: []
      nullable: true
      x-apidog-folder: ''
    tag_ids:
      type: array
      items:
        type: integer
        minimum: 1
        examples:
          - 8216745
        title: References to tags
      description: >-
        ID of record's
        [Tags](https://api.developer.placewise.com/doc-346913.md) 
      x-apidog-folder: ''
    id:
      type: integer
      title: ''
      description: Identifier
      examples:
        - 1
      minimum: 1
      x-apidog-folder: ''
    id.store_id:
      type: integer
      description: '[Store](doc-341692) the record is assigned to'
      format: uint64
      examples:
        - 1001931
      x-apidog-folder: ''
    date_time:
      type: string
      format: date-time
      examples:
        - '2022-11-09T16:25:58.099512Z'
      x-apidog-folder: ''
    cms.visible_until:
      type: string
      description: Date until the record is visible in [CMS Public API](doc-341653)
      format: date-time
      examples:
        - '2022-11-15T16:25:58.099512Z'
      x-apidog-folder: ''
    cms.visible_since:
      type: string
      description: Date since the record is visible in [CMS Public API](doc-341653)
      format: date-time
      examples:
        - '2022-11-09T16:25:58.099512Z'
      x-apidog-folder: ''
    cms.status:
      type: string
      enum:
        - draft
        - published
        - unpublished
      examples:
        - published
      description: Determines visibility in [Public API](doc-341643)
      x-apidog-enum:
        - name: ''
          value: draft
          description: ''
        - name: ''
          value: published
          description: ''
        - name: ''
          value: unpublished
          description: ''
      x-apidog-folder: ''
    LocalizedContent:
      type: object
      properties: {}
      x-apidog-orders: []
      title: ''
      examples:
        - en: Text
      additionalProperties:
        type: string
        description: >-
          The actual set of languages depends on LC configuration. See:
          [Localization](doc-341959)
        examples:
          - Tekst
        nullable: true
      x-apidog-ignore-properties: []
      nullable: true
      x-apidog-folder: ''
    id1:
      type: integer
      description: Primary identifier of the record
      format: uint64
      readOnly: true
      examples:
        - 1
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.mpc.dev.placewise.com
    description: Staging
security: []

```