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

# Add Package

> Adds an item to the user's cart with optional promotion and payment type.



## OpenAPI

````yaml POST /cart/add/{id}
openapi: 3.0.0
info:
  title: MineStoreCMS REST API
  description: Documentation for MineStoreCMS Frontend REST API.
  version: 3.8.7
servers:
  - url: https://v3.minestorecms.com/api
    description: Example URL of Demo Server
security: []
tags: []
paths:
  /cart/add/{id}:
    post:
      tags:
        - cart
      summary: Add an item to the cart
      description: >-
        Adds an item to the user's cart with optional promotion and payment
        type.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the item to add to the cart.
          schema:
            type: string
        - name: promoted
          in: query
          required: false
          description: >-
            Whether the item is promoted. Possible values are '0' (no) and '1'
            (yes).
          schema:
            type: string
            enum:
              - '0'
              - '1'
        - name: payment_type
          in: query
          required: false
          description: >-
            The type of payment for the item. Possible values are '0' (regular)
            and '1' (subscription).
          schema:
            type: string
            enum:
              - '0'
              - '1'
      requestBody:
        description: Item details to be added to the cart.
        content:
          application/json:
            schema:
              type: object
              properties:
                promoted:
                  type: string
                  enum:
                    - '0'
                    - '1'
                payment_type:
                  type: string
                  enum:
                    - '0'
                    - '1'
      responses:
        '200':
          description: Successful response indicating the item was added to the cart.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the operation was successful.
                  message:
                    type: string
                    description: >-
                      A message providing additional information about the
                      operation.
        '401':
          description: Unauthorized - Invalid or missing Access Token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates the operation was unsuccessful.
                  message:
                    type: string
                    description: Details about the unauthorized access.
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````