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

# Changes the quantity of a cart item.

> Changes the quantity of a cart item.



## OpenAPI

````yaml put /public/checkout/cart/{id}/change-quantity
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /public/checkout/cart/{id}/change-quantity:
    parameters: []
    put:
      tags:
        - Cart
      summary: Changes the quantity of a cart item.
      description: Changes the quantity of a cart item.
      operationId: api_publiccheckoutcart_idchange-quantity_put
      parameters:
        - name: id
          in: path
          description: Cart identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        description: The updated Cart resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Cart.ChangeCartItemQuantity'
          text/html:
            schema:
              $ref: '#/components/schemas/Cart.ChangeCartItemQuantity'
        required: true
      responses:
        '200':
          description: Cart resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart.CartResource-CartPublic'
            text/html:
              schema:
                $ref: '#/components/schemas/Cart.CartResource-CartPublic'
          links: {}
        '400':
          description: Invalid input
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity
      deprecated: false
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT \
             /public/checkout/cart/{id}/change-quantity \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "cartItemId": ""
            }'
components:
  schemas:
    Cart.ChangeCartItemQuantity:
      type: object
      description: ''
      deprecated: false
      required:
        - quantity
      properties:
        quantity:
          description: The new quantity of the cart item.
          example: 10
        cartItemId:
          type: string
    Cart.CartResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        price:
          $ref: '#/components/schemas/CartPriceResource-CartPublic'
        id:
          example: c1b0d0c0-0b0b-4b0b-8b0b-0b0b0b0b0b0b
          type: string
        status:
          description: |-
            The status of the cart.

            Possible values:
             * `open`: The cart is open and can be edited.
             * `confirming`: The cart is confirming and cannot be edited.
          example: open
        customer:
          description: The customer who owns the cart.
          example: c1b0d0c0-0b0b-4b0b-8b0b-0b0b0b0b0b0b
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        invoiceAddress:
          anyOf:
            - $ref: '#/components/schemas/CustomerAddress-CartPublic'
            - type: 'null'
        customerPrefill:
          description: >-
            The customer prefill data which should be used to prefill the
            checkout form.
          anyOf:
            - $ref: '#/components/schemas/CustomerPrefill-CartPublic'
            - type: 'null'
        paymentMethod:
          description: The payment method which should be used for the cart.
          example: c1b0d0c0-0b0b-4b0b-8b0b-0b0b0b0b0b0b
          anyOf:
            - $ref: '#/components/schemas/PaymentMethod-CartPublic'
            - type: 'null'
        items:
          description: The items of the cart.
          type: array
          items:
            $ref: '#/components/schemas/CartItemResource-CartPublic'
        completionDetails:
          description: Details shown to the customer when the cart is completed.
          type:
            - array
            - 'null'
          items:
            type: string
        settings:
          $ref: '#/components/schemas/CartSettingsResource-CartPublic'
          description: The settings of the cart.
    CartPriceResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        amountDue:
          type: number
        currencyCode:
          $ref: '#/components/schemas/CurrencyCode-CartPublic'
        netAmount:
          type: number
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/CartPriceTaxResource-CartPublic'
        discountDetails:
          type:
            - array
            - 'null'
          items:
            type: string
    CustomerAddress-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        vatId:
          description: >-
            VAT ID, which will be used to bill to. If not provided, we will use
            the customer vat id.
          example: DE123456789
          type:
            - string
            - 'null'
        type:
          example: TYPE_DEFAULT
          enum:
            - TYPE_DEFAULT
            - TYPE_INVOICE
        default:
          example: 'true'
          type: boolean
        status:
          readOnly: true
          example: active
          enum:
            - active
            - archived
        city:
          example: Berlin
          type: string
        zip:
          example: '12345'
          type: string
        street:
          example: Musterstraße
          type: string
        houseNumber:
          example: 1a
          type: string
        countryCode:
          example: DE
          type: string
        companyName:
          description: Company name, which will be used to bill to.
          example: ACME Inc.
          type:
            - string
            - 'null'
        salutation:
          example: Herr
          enum:
            - Firma
            - Herr
            - Frau
        addition:
          description: >-
            Additional address information, which will be shown on generated
            documents like invoices, reminders, etc.
          example: c/o John Doe
          type:
            - string
            - 'null'
        costCentre:
          description: >-
            Cost centre, which will be shown on generated documents like
            invoices, reminders, etc.
          example: '123456789'
          type:
            - string
            - 'null'
        firstName:
          description: >-
            First name, which will be shown on generated documents like
            invoices, reminders, etc.
          example: John
          type:
            - string
            - 'null'
        lastName:
          description: >-
            Last name, which will be shown on generated documents like invoices,
            reminders, etc.
          example: Doe
          type:
            - string
            - 'null'
    CustomerPrefill-CartPublic:
      type: object
      description: ''
      deprecated: false
    PaymentMethod-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
          description: Unique identifier of the payment method
          example: c1a2b3c4-d5e6-4f7a-8b9b-0c1d2e3f4a5b
        gatewayName:
          type: string
          enum:
            - wallet
            - sepa_debit
            - stripe
            - fake_provider
            - paypal
            - bank_transfer
            - go_cardless
            - testing
          description: The payment gateway used to process the payment method
        type:
          type:
            - string
            - 'null'
          enum:
            - sepa_debit
            - card
            - paypal
            - bank_transfer
            - wallet
            - fake_provider
            - null
          description: The type of the payment method
        default:
          type: boolean
          description: Whether this is the default payment method for the customer
          example: true
        status:
          default: active
          example: active
          type: string
          enum:
            - active
            - action_required
            - expired
            - revoked
            - gateway_unconfigured
          description: The current status of the payment method
        enabled:
          type: boolean
          description: Whether the payment method is enabled for use
          example: true
        name:
          type:
            - string
            - 'null'
          description: Display name of the payment method
          example: Visa (4242)
        creationDate:
          readOnly: true
          type: string
          format: date-time
          description: The date when the payment method was created
          example: '2024-01-15T10:30:00+00:00'
        expirationDate:
          type:
            - string
            - 'null'
          format: date-time
          description: The expiration date of the payment method, if applicable
          example: '2026-12-31T23:59:59+00:00'
        card:
          readOnly: true
          description: The card data of the payment method, if the type is "card"
          type: object
          properties:
            brand:
              type: string
              example: Visa
              description: The brand of the card
            last4:
              type: string
              example: '4242'
              description: The last 4 digits of the card
            expMonth:
              type: integer
              example: 12
              description: The expiration month of the card
            expYear:
              type: integer
              example: 2022
              description: The expiration year of the card
            cardHolder:
              type: string
              example: Max Mustermann
              description: The card holder name
        sepaDebit:
          readOnly: true
          description: >-
            The sepa mandate data of the payment method, if the type is
            "sepa_debit"
          type: object
          properties:
            iban:
              type: string
              example: DE8937*********3232
              description: The iban of the sepa mandate
            bic:
              type: string
              example: COBADEFFXXX
              description: The bic of the sepa mandate
            mandateReference:
              type: string
              example: MNDT-2021-123456
              description: The mandate reference of the sepa mandate
            signingDate:
              type: string
              example: '2021-01-01T00:00:00+00:00'
              description: The signing date of the sepa mandate
        paypal:
          readOnly: true
          description: The paypal data of the payment method, if the type is "paypal"
          type: object
          properties:
            email:
              type: string
              example: max@mustermann.de
              description: The email of the paypal account
            billingAgreementId:
              type: string
              example: I-1J5gqz2eZvKYlo2C2X2X2X2X
              description: The billing agreement id of the paypal account
    CartItemResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        quantity:
          $ref: '#/components/schemas/Quantity-CartPublic'
        quantityDetails:
          $ref: '#/components/schemas/CartItemQuantityResource-CartPublic'
        price:
          $ref: '#/components/schemas/CartItemPriceResource-CartPublic'
        type:
          type: string
          enum:
            - product
        periods:
          type: array
          items:
            $ref: '#/components/schemas/CartItemTermResource-CartPublic'
    CartSettingsResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        allowCoupons:
          description: Whether coupons can be applied to the checkout link or not.
          type: boolean
        forceCompany:
          description: Whether the company should be forced in the checkout form or not.
          type: boolean
        backButton:
          description: The URL to redirect to when the back button is clicked.
          example:
            url: https://example.com
            label: Back to the shop
          type:
            - array
            - 'null'
          items:
            type: string
    CurrencyCode-CartPublic:
      type: string
      description: ISO 4217 currency code.
      example: EUR
    CartPriceTaxResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        netAmount:
          type: number
        taxAmount:
          type: number
        rate:
          type: integer
    Quantity-CartPublic:
      type:
        - number
        - 'null'
      description: A numeric quantity value.
      example: 1
    CartItemQuantityResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        aggregationType:
          type: string
          enum:
            - count
            - count_unique
            - max
            - sum
            - average
            - last_value
        unit:
          type: string
        description:
          type:
            - string
            - 'null'
        quantityEditable:
          type: boolean
    CartItemPriceResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        currencyCode:
          $ref: '#/components/schemas/CurrencyCode-CartPublic'
        taxRate:
          description: If null, the customer has not yet provided a invoice address.
          type:
            - integer
            - 'null'
        totalNetAmount:
          description: The total net amount for this cart item which is now due.
          example: 10
          type: number
        type:
          type: string
          enum:
            - recurring
            - metered
            - instant_metered
        calculationType:
          type: string
          enum:
            - flat_fee
            - per_unit
            - tiered
            - volume
            - stair_step
            - percentage
        payInAdvance:
          type: boolean
        price:
          anyOf:
            - $ref: '#/components/schemas/FlatFeePrice-CartPublic'
            - $ref: '#/components/schemas/PercentagePrice-CartPublic'
            - $ref: '#/components/schemas/PerUnitPrice-CartPublic'
            - $ref: '#/components/schemas/TieredPrice-CartPublic'
        recurring:
          anyOf:
            - $ref: '#/components/schemas/CartItemRecurringResource-CartPublic'
            - type: 'null'
        freeUnits:
          anyOf:
            - $ref: '#/components/schemas/Quantity-CartPublic'
            - type: 'null'
    CartItemTermResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        contractPeriod:
          type: string
        cancellationPeriod:
          type: string
    FlatFeePrice-CartPublic:
      type: object
      description: ''
      deprecated: false
      required:
        - amount
      properties:
        amount:
          description: The amount of the flat fee per unit
          type: number
    PercentagePrice-CartPublic:
      type: object
      description: ''
      deprecated: false
      required:
        - percentage
        - fixedAmount
        - freeUnitsPerEvent
        - freeUnitsPerBillingInterval
      properties:
        percentage:
          description: The percentage of the total amount that is charged.
          type: number
        fixedAmount:
          description: >-
            The fixed amount that is charged per unit, metered in the billing
            period. E.g. on pushing 1000 units, the fixed amount is charged 1000
            times * percentage
          type: number
        freeUnitsPerEvent:
          description: The number of units that are not subject to the fixed fee.
          type: integer
        freeUnitsPerBillingInterval:
          description: The amount that is not subject to the charge rate.
          type: number
    PerUnitPrice-CartPublic:
      type: object
      description: ''
      deprecated: false
      required:
        - amount
      properties:
        amount:
          description: The amount of money per unit
          example: 0.99
          type: number
    TieredPrice-CartPublic:
      type: object
      description: ''
      deprecated: false
      required:
        - items
      properties:
        items:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/TierItem-CartPublic'
    CartItemRecurringResource-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        interval:
          type: string
          enum:
            - day
            - week
            - month
            - year
        intervalCount:
          type: integer
        trialPeriodDays:
          type:
            - integer
            - 'null'
        recurringAmount:
          type: number
    TierItem-CartPublic:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        from:
          description: The lower bound of the tier
          type: number
        amount:
          description: The amount of the tier per unit
          type: number
        flatAmount:
          description: >-
            The flat amount of the tier, billed once in addition to the amount
            per unit in a billing period
          type: number
      required:
        - from
        - amount
        - flatAmount
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````