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

# Set Selected Server

> Associates a selected server with a specific item in the user's cart. Ensures the selected server is valid for the item.



## OpenAPI

````yaml POST /cart/setSelectedServer/{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/setSelectedServer/{id}:
    post:
      tags:
        - cart
      summary: Set the selected server for an item in the cart
      description: >-
        Associates a selected server with a specific item in the user's cart.
        Ensures the selected server is valid for the item.
      parameters:
        - name: id
          in: path
          required: true
          description: The ID of the item for which the server is being set.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - server_id
              properties:
                server_id:
                  type: integer
                  description: The ID of the server to be associated with the item.
                  example: 456
      responses:
        '200':
          description: Successfully set the selected server for the item in the cart.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the operation was successful.
        '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 or error.
        '404':
          description: Not Found - The specified item or server was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates the operation was unsuccessful.
                  message:
                    type: string
                    description: Details about why the request was invalid.
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````