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

# Update an item

> Updates an item by its ID



## OpenAPI

````yaml https://swish.app/api/2026-07/.well-known/openapi patch /items/{itemId}
openapi: 3.0.0
info:
  title: Swish API
  description: >-
    The Swish API provides endpoints for managing profiles, lists, items,
    subscriptions, notifications, orders, etc. All endpoints require
    authentication using a Bearer token. Responses follow a consistent structure
    with a `data` wrapper for successful responses and standardized error
    formats.
  version: 2026-07
  contact: {}
servers:
  - url: https://swish.app/api/2026-07
security: []
tags: []
paths:
  /items/{itemId}:
    patch:
      tags:
        - Items
      summary: Update an item
      description: Updates an item by its ID
      operationId: ItemController_updateById
      parameters:
        - name: itemId
          required: true
          in: path
          description: The ID of the item
          schema:
            example: 67a61d5561e4f9de302c02a1
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateItem'
      responses:
        '200':
          description: The item has been successfully updated.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response'
                  - properties:
                      data:
                        $ref: '#/components/schemas/Item'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - properties:
                      error:
                        allOf:
                          - $ref: '#/components/schemas/Error'
                          - properties:
                              message:
                                type: string
                                example: Validation failed
                              error:
                                type: string
                                example: Bad Request
                              statusCode:
                                type: number
                                example: 400
                              requestId:
                                type: string
                                example: 123e4567-e89b-12d3-a456-426614174000
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - properties:
                      error:
                        allOf:
                          - $ref: '#/components/schemas/Error'
                          - properties:
                              message:
                                type: string
                                example: Failed to authenticate request
                              error:
                                type: string
                                example: Unauthorized
                              statusCode:
                                type: number
                                example: 401
                              requestId:
                                type: string
                                example: 123e4567-e89b-12d3-a456-426614174000
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - properties:
                      error:
                        allOf:
                          - $ref: '#/components/schemas/Error'
                          - properties:
                              message:
                                type: string
                                example: >-
                                  You do not have permission to access this
                                  resource
                              error:
                                type: string
                                example: Forbidden
                              statusCode:
                                type: number
                                example: 403
                              requestId:
                                type: string
                                example: 123e4567-e89b-12d3-a456-426614174000
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - properties:
                      error:
                        allOf:
                          - $ref: '#/components/schemas/Error'
                          - properties:
                              message:
                                type: string
                                example: The requested resource was not found
                              error:
                                type: string
                                example: Not Found
                              statusCode:
                                type: number
                                example: 404
                              requestId:
                                type: string
                                example: 123e4567-e89b-12d3-a456-426614174000
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - properties:
                      error:
                        allOf:
                          - $ref: '#/components/schemas/Error'
                          - properties:
                              message:
                                type: string
                                example: An unexpected error occurred
                              error:
                                type: string
                                example: Internal Server Error
                              statusCode:
                                type: number
                                example: 500
                              requestId:
                                type: string
                                example: 123e4567-e89b-12d3-a456-426614174000
      security:
        - Swish API key: []
        - bearer: []
components:
  schemas:
    UpdateItem:
      type: object
      properties:
        productId:
          type: number
          description: The Shopify ID of the product
          example: 123
        variantId:
          type: number
          description: The Shopify ID of the variant
          example: 456
        quantity:
          type: number
          description: The quantity of the item
          example: 2
          default: 1
    Response:
      type: object
      properties:
        data:
          type: object
          description: Response data
      required:
        - data
    Item:
      type: object
      properties:
        id:
          type: string
          description: The ID of the item
          example: 67a61d5561e4f9de302c02a1
        productId:
          type: number
          description: The Shopify ID of the product
          example: 123
        variantId:
          type: number
          description: The Shopify ID of the variant
          example: 456
          nullable: true
        quantity:
          type: number
          description: The quantity of the item in the list
          example: 1
        createdAt:
          type: string
          description: The date and time the item was created
          example: '2025-01-01T10:00:00.000Z'
        updatedAt:
          type: string
          description: The date and time the item was updated
          example: '2025-01-01T10:00:00.000Z'
        metadata:
          type: object
          description: Item metadata
          nullable: true
        product:
          description: >-
            Live Shopify Storefront product for the item. Only present on
            enriched (admin) endpoints; omitted otherwise.
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/StorefrontProduct'
        variant:
          description: >-
            The selected Storefront variant for the item. Only present on
            enriched (admin) endpoints (null for product-only items); omitted
            otherwise.
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/StorefrontProductVariant'
      required:
        - id
        - productId
        - variantId
        - quantity
        - createdAt
        - updatedAt
    ErrorResponse:
      type: object
      properties:
        error:
          description: Error details
          allOf:
            - $ref: '#/components/schemas/Error'
      required:
        - error
    Error:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Something went wrong
        error:
          type: string
          description: The error type
          example: Not Found
        statusCode:
          type: number
          description: The HTTP status code of the error
          example: 404
        requestId:
          type: string
          description: The ID of the request that caused the error
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - message
        - error
        - statusCode
        - requestId
    StorefrontProduct:
      type: object
      properties:
        id:
          type: string
          example: gid://shopify/Product/123
        category:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProductCategory'
        productType:
          type: string
          example: Dresses
        tags:
          example:
            - sale
            - summer
          type: array
          items:
            type: string
        title:
          type: string
          example: Kai Dress In Tuberose
        vendor:
          type: string
          example: W25A
        updatedAt:
          type: string
          example: '2026-01-22T11:03:14Z'
        handle:
          type: string
          example: kai-dress-in-tuberose
        onlineStoreUrl:
          type: string
          nullable: true
          example: https://example.com/products/kai-dress
        availableForSale:
          type: boolean
          example: true
        featuredImage:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/StorefrontImage'
        priceRange:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProductPriceRange'
        compareAtPriceRange:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ProductPriceRange'
        variantsCount:
          type: number
          nullable: true
          example: 6
      required:
        - id
        - productType
        - tags
        - title
        - vendor
        - updatedAt
        - handle
        - availableForSale
    StorefrontProductVariant:
      type: object
      properties:
        availableForSale:
          type: boolean
          example: true
        price:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/NotificationMoney'
        compareAtPrice:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/NotificationMoney'
        quantityAvailable:
          type: number
          nullable: true
          example: 5
        selectedOptions:
          type: array
          items:
            $ref: '#/components/schemas/ProductOption'
        currentlyNotInStock:
          type: boolean
          example: false
        sku:
          type: string
          nullable: true
          example: SKU-123
        title:
          type: string
          example: Size 9
        image:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/StorefrontImage'
      required:
        - availableForSale
        - selectedOptions
        - currentlyNotInStock
        - title
    ProductCategory:
      type: object
      properties:
        id:
          type: string
          example: gid://shopify/Category/1
        name:
          type: string
          example: Footwear
      required:
        - id
        - name
    StorefrontImage:
      type: object
      properties:
        id:
          type: string
          example: gid://shopify/Image/1
        url:
          type: string
          example: https://example.com/image.jpg
        altText:
          type: string
          example: Product image
          nullable: true
        thumbhash:
          type: string
          example: 1QcSHQRnh493V4dIh4eXh1h4kJUI
          nullable: true
        width:
          type: number
          nullable: true
          example: 2000
        height:
          type: number
          nullable: true
          example: 3000
      required:
        - id
        - url
    ProductPriceRange:
      type: object
      properties:
        maxVariantPrice:
          $ref: '#/components/schemas/NotificationMoney'
        minVariantPrice:
          $ref: '#/components/schemas/NotificationMoney'
      required:
        - maxVariantPrice
        - minVariantPrice
    NotificationMoney:
      type: object
      properties:
        amount:
          type: string
          example: '90.00'
        currencyCode:
          type: string
          example: USD
      required:
        - amount
        - currencyCode
    ProductOption:
      type: object
      properties:
        name:
          type: string
          example: Size
        value:
          type: string
          example: '9'
      required:
        - name
        - value
  securitySchemes:
    Swish API key:
      scheme: Bearer
      bearerFormat: JWT
      type: http
      description: Enter your JWT token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.