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

# Set pick & mix items

> Replace the pick & mix items on a subscription. Enforces each item's minimum and maximum quantity and the package's minimum item count. Optionally updates the billing frequency at the same time.



## OpenAPI

````yaml /api-reference/openapi.json post /account/subscriptions/{subscriptionId}/pick-mix-items
openapi: 3.0.0
info:
  title: Marzipan API
  version: 1.0.0
servers:
  - url: https://api.marzipan.co/v1
security:
  - tenantAuth: []
tags:
  - name: Account
    description: >-
      Account management endpoints including registration, login, and user
      details
  - name: Carts
    description: Shopping cart management endpoints
  - name: Products
    description: Product catalog and search endpoints
  - name: Subscriptions
    description: Subscription management and renewal endpoints
  - name: CMS
    description: Content management system endpoints
  - name: Messaging
    description: Message and communication endpoints
  - name: Search
    description: Search functionality endpoints
  - name: Settings
    description: >-
      Storefront settings and market detection used to configure the web
      components and checkout.
  - name: Analytics
    description: Storefront visit and attribution tracking.
  - name: Rewards
    description: >-
      Loyalty and rewards programme endpoints for the authenticated customer,
      covering points balance, tier status, perks, exclusive products and
      transaction history.
  - name: Forms
    description: Render and submit dynamic storefront forms defined in the CMS.
  - name: Events
    description: >-
      Check event availability, browse occurrences and recurring dates, generate
      ticket QR codes, and manage event waitlists (join, leave, check status,
      and claim promoted spots).
paths:
  /account/subscriptions/{subscriptionId}/pick-mix-items:
    parameters:
      - name: subscriptionId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Subscription ID
    post:
      tags:
        - Subscriptions
      summary: Set pick & mix items
      description: >-
        Replace the pick & mix items on a subscription. Enforces each item's
        minimum and maximum quantity and the package's minimum item count.
        Optionally updates the billing frequency at the same time.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - items
              properties:
                items:
                  type: array
                  description: Selected pick & mix items
                  items:
                    type: object
                    required:
                      - id
                      - quantity
                      - name
                      - sku
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Product ID of the item
                      quantity:
                        type: integer
                        minimum: 0
                        description: Quantity selected
                      name:
                        type: string
                        description: Item name
                      sku:
                        type: string
                        description: Item SKU
                      price:
                        type: number
                        nullable: true
                        description: Optional item price
                billingFrequency:
                  type: integer
                  nullable: true
                  enum:
                    - 1
                    - 3
                    - 6
                    - 12
                  description: Optionally update the billing interval in months
            example:
              items:
                - id: 084b80ef-d16d-4531-a25f-40b7ff4c744b
                  quantity: 2
                  name: House Red
                  sku: WINE-RED-01
                  price: 9.99
              billingFrequency: 3
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  subscription:
                    type: object
                    description: The updated subscription including its pick & mix items
              example:
                message: Pick and mix items updated successfully
                subscription:
                  id: 1224f9ef-8caf-4564-9474-023f95819949
                  pickAndMixItems:
                    - itemId: 084b80ef-d16d-4531-a25f-40b7ff4c744b
                      itemName: House Red
                      itemSku: WINE-RED-01
                      qty: 2
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Unauthenticated.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Subscription not found
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - accountAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
      required:
        - message
    ValidationError:
      type: object
      properties:
        message:
          type: string
          description: Validation error message
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Field-specific validation errors
      required:
        - message
        - errors
  securitySchemes:
    tenantAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your API token.
      bearerFormat: JWT
    accountAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is the account token returned from the `Login` endpoint.

````