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

# Reorder servers



## OpenAPI

````yaml /openapi.en.json put /api/v2/servers/{shopId}/reorder
openapi: 3.0.0
info:
  title: ItemShop v2 API
  description: >-
    REST API platformy ItemShop v2 (NestJS + Fastify). Wszystkie ścieżki mają
    prefiks /api/v2.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.itemshop.dev
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
tags: []
paths:
  /api/v2/servers/{shopId}/reorder:
    put:
      tags:
        - Servers
      summary: Reorder servers
      operationId: ServerController_reorderServers
      parameters:
        - name: shopId
          required: true
          in: path
          schema:
            type: string
          description: Shop ID (ObjectId)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReorderResourcesDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Server'
                  message:
                    type: string
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    ReorderResourcesDto:
      type: object
      properties:
        ids:
          uniqueItems: true
          maxItems: 2000
          type: array
          items:
            type: string
      required:
        - ids
    Server:
      type: object
      properties:
        _id:
          type: string
          example: 664f1a2b3c4d5e6f7a8b9c0d
        name:
          type: string
          example: Survival
        domain:
          type: string
          example: play.moj-sklep.pl
        shopId:
          type: string
          example: 664f1a2b3c4d5e6f7a8b9c0d
        isActive:
          type: boolean
          example: true
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Error message
        timestamp:
          type: string
          format: date-time
        path:
          type: string
          example: /api/v2/...
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http

````