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

# Zaktualizuj sklep



## OpenAPI

````yaml /openapi.pl.json put /api/v2/shops/{shopId}
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: Produkcja
  - url: http://localhost:3000
    description: Lokalnie
security: []
tags: []
paths:
  /api/v2/shops/{shopId}:
    put:
      tags:
        - Shops
      summary: Zaktualizuj sklep
      operationId: ShopController_updateShop
      parameters:
        - name: shopId
          required: true
          in: path
          schema:
            type: string
          description: ID sklepu (ObjectId)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateShopDto'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Shop'
                  message:
                    type: string
        '400':
          description: Błędne dane wejściowe
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Brak/niepoprawne uwierzytelnienie
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Brak uprawnień / dostępu
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Nie znaleziono
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Przekroczony limit żądań
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    UpdateShopDto:
      type: object
      properties:
        displayName:
          type: string
          minLength: 1
          maxLength: 100
          description: Nazwa wyświetlana
          example: Mój Sklep
        frontEndUrl:
          type: string
          format: uri
          description: Adres frontendu sklepu
          example: https://moj-sklep.pl
        discordWebhookUrl:
          type: string
          format: uri
          description: URL webhooka Discord
        discordWebhook:
          description: Personalizacja webhooka Discord
          allOf:
            - $ref: '#/components/schemas/DiscordWebhookDto'
        discordWebhookDaily:
          description: Personalizacja webhooka raportów dziennych
          allOf:
            - $ref: '#/components/schemas/DiscordWebhookDto'
        dailyReportsEnabled:
          type: boolean
          description: Codzienne raporty na Discord
        emailConfig:
          description: Konfiguracja e-mail (SMTP) do powiadomień
          allOf:
            - $ref: '#/components/schemas/EmailConfigDto'
    Shop:
      type: object
      properties:
        _id:
          type: string
          example: 664f1a2b3c4d5e6f7a8b9c0d
        uniqueName:
          type: string
          example: moj-sklep
        displayName:
          type: string
          example: Mój Sklep
        frontEndUrl:
          type: string
          example: https://moj-sklep.pl
        isActive:
          type: boolean
          example: true
        createdAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Komunikat błędu
        timestamp:
          type: string
          format: date-time
        path:
          type: string
          example: /api/v2/...
    DiscordWebhookDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: Włącz webhook zamówień
        title:
          type: string
          minLength: 0
          maxLength: 120
          description: Tytuł embeda
        color:
          type: string
          pattern: ^#([0-9a-fA-F]{6})$
          description: Kolor embeda (hex)
          example: '#22c55e'
        username:
          type: string
          minLength: 0
          maxLength: 80
          description: Nazwa nadawcy
        avatarUrl:
          type: string
          format: uri
          description: URL awatara nadawcy
        customMessage:
          type: string
          minLength: 0
          maxLength: 1500
          description: Szablon wiadomości z placeholderami
        fields:
          description: Konfigurowalne pola embeda zamówienia
          type: array
          items:
            $ref: '#/components/schemas/EmbedFieldDto'
    EmailConfigDto:
      type: object
      properties:
        enabled:
          type: boolean
          description: Włącz powiadomienia e-mail
        provider:
          enum:
            - smtp
            - ses
            - resend
            - itemshop
          type: string
          description: Dostawca e-mail
        host:
          type: string
          minLength: 0
          maxLength: 200
          description: Host SMTP
          example: smtp.gmail.com
        port:
          type: number
          minimum: 1
          maximum: 65535
          description: Port SMTP
          example: 587
        secure:
          type: boolean
          description: Połączenie szyfrowane (TLS/SSL)
        username:
          type: string
          minLength: 0
          maxLength: 200
          description: Login SMTP
        password:
          type: string
          minLength: 0
          maxLength: 400
          description: Hasło SMTP (puste = bez zmian)
        resendApiKey:
          type: string
          minLength: 0
          maxLength: 400
          description: Klucz API Resend (puste = bez zmian)
        aws:
          description: Dane AWS SES
          allOf:
            - $ref: '#/components/schemas/EmailAwsDto'
        fromEmail:
          type: string
          minLength: 0
          maxLength: 200
          description: Adres nadawcy
        fromName:
          type: string
          minLength: 0
          maxLength: 120
          description: Nazwa nadawcy
        events:
          description: Wysyłane zdarzenia e-mail
          allOf:
            - $ref: '#/components/schemas/EmailEventsDto'
        ownerEmail:
          type: string
          format: email
          description: Adres dla powiadomień właściciela
          maxLength: 200
        subject:
          type: string
          minLength: 0
          maxLength: 200
          description: Własny temat e-maila zamówienia
        template:
          type: string
          minLength: 0
          maxLength: 20000
          description: Własny szablon HTML e-maila zamówienia
    EmbedFieldDto:
      type: object
      properties:
        key:
          type: string
          description: Klucz pola z katalogu
          example: nick
        label:
          type: string
          minLength: 0
          maxLength: 80
          description: Etykieta pola (puste = domyślna)
        enabled:
          type: boolean
          description: Czy pole jest widoczne
        inline:
          type: boolean
          description: Pole w jednej linii (inline)
    EmailAwsDto:
      type: object
      properties:
        region:
          type: string
          minLength: 0
          maxLength: 60
          description: Region AWS
          example: eu-central-1
        accessKeyId:
          type: string
          minLength: 0
          maxLength: 200
          description: AWS Access Key ID
        secretAccessKey:
          type: string
          minLength: 0
          maxLength: 400
          description: AWS Secret Access Key (puste = bez zmian)
    EmailEventsDto:
      type: object
      properties:
        orderConfirmation:
          type: boolean
          description: E-mail potwierdzenia dla kupującego
        ownerNotification:
          type: boolean
          description: Powiadomienie właściciela o sprzedaży
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http

````