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

# Create Saved Item

> Create a new saved item (SAVED_ITEM discount). Replaces legacy create banked item.



## OpenAPI

````yaml post /billing/discounts/saved-item/create
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/discounts/saved-item/create:
    post:
      tags:
        - Discounts
      summary: Create Saved Item
      description: >-
        Create a new saved item (SAVED_ITEM discount). Replaces legacy create
        banked item.
      operationId: create_saved_item_billing_discounts_saved_item_create_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedItemCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientSavedItem'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SavedItemCreate:
      properties:
        itemId:
          type: string
          title: Itemid
          description: Item ID to save
        patientId:
          type: string
          title: Patientid
          description: Patient ID who owns the saved item
        quantity:
          type: integer
          exclusiveMinimum: 0
          title: Quantity
          description: Total quantity
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
          description: Optional comment
      type: object
      required:
        - itemId
        - patientId
        - quantity
      title: SavedItemCreate
      description: Schema for creating a SAVED_ITEM discount (add banked item).
    PatientSavedItem:
      properties:
        id:
          type: string
          title: Id
        itemId:
          type: string
          title: Itemid
        patientId:
          type: string
          title: Patientid
        createdByChargeItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbychargeitemid
        quantity:
          type: integer
          title: Quantity
        quantityRemaining:
          type: integer
          title: Quantityremaining
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        createdDate:
          type: string
          format: date-time
          title: Createddate
        item:
          $ref: '#/components/schemas/ItemTiny'
        price:
          type: integer
          title: Price
        usages:
          items:
            oneOf:
              - $ref: '#/components/schemas/SavedItemChargeUsage'
              - $ref: '#/components/schemas/SavedItemManualAdjustment'
            discriminator:
              propertyName: kind
              mapping:
                charge:
                  $ref: '#/components/schemas/SavedItemChargeUsage'
                manual_adjustment:
                  $ref: '#/components/schemas/SavedItemManualAdjustment'
          type: array
          title: Usages
          description: >-
            Chronological timeline (newest first) of charge applications and
            manual adjustments.
        originatingCharge:
          anyOf:
            - $ref: '#/components/schemas/OriginatingCharge'
            - type: 'null'
          description: >-
            The invoice this banked item was minted from (null for staff-granted
            credits).
      type: object
      required:
        - id
        - itemId
        - patientId
        - quantity
        - quantityRemaining
        - createdDate
        - item
        - price
      title: PatientSavedItem
      description: >-
        Saved item (SAVED_ITEM discount) - compatible with PatientBankedItem for
        API response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ItemTiny:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the item
        name:
          type: string
          title: Name
          description: Name of the item
        brandName:
          anyOf:
            - type: string
            - type: 'null'
          title: Brandname
          description: Optional brand name of the item
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description of the item
        price:
          type: integer
          title: Price
          description: Price of the item in cents
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: Category name (references category.name)
        unit:
          anyOf:
            - $ref: '#/components/schemas/Unit'
            - type: 'null'
          description: Unit of measurement for the item
        isPhysical:
          type: boolean
          title: Isphysical
          description: Whether the item is physical
          default: true
        isArchived:
          type: boolean
          title: Isarchived
          description: Whether the item is archived
          default: false
        internalNotes:
          anyOf:
            - type: string
            - type: 'null'
          title: Internalnotes
          description: Optional internal notes for the item
        sortOrder:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sortorder
          description: Optional sort order for the item
        allowCustomPricing:
          type: boolean
          title: Allowcustompricing
          description: Whether custom pricing is allowed for this item
          default: false
        showInCheckOut:
          type: boolean
          title: Showincheckout
          description: Whether this item appears in checkout
          default: true
        type:
          $ref: '#/components/schemas/ItemType'
          description: Type of item (PRODUCT, MEDICATION, etc.)
          default: PRODUCT
        externalId:
          anyOf:
            - type: string
            - type: 'null'
          title: Externalid
          description: Optional external ID for the item
        exemptedTaxIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exemptedtaxids
          description: >-
            List of tax IDs that this item is exempted from (excludes from
            scope-based taxes)
        cost:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cost
          description: Cost of the item in cents
        cashPrice:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cashprice
          description: Cash price of the item in cents (for dual pricing)
        commissionable:
          type: boolean
          title: Commissionable
          description: Whether this item is eligible for commissions
          default: true
        tags:
          items:
            $ref: '#/components/schemas/ItemTagSummary'
          type: array
          title: Tags
          description: Tags assigned to this item
        hiddenInPatientPortal:
          type: boolean
          title: Hiddeninpatientportal
          description: Whether this item is hidden from the patient portal
          default: false
        hiddenInOnlineShop:
          type: boolean
          title: Hiddeninonlineshop
          description: Whether this item is hidden from the online shop
          default: true
        loyaltyPointsEarned:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Loyaltypointsearned
          description: Points earned when this item is purchased
        defaultCptCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Defaultcptcode
          description: Default CPT / HCPCS code for Super Bill autofill
        defaultModifiers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Defaultmodifiers
          description: Default procedure modifiers for Super Bill autofill
        defaultIcd10Codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Defaulticd10Codes
          description: Default ICD-10 codes for Super Bill autofill
        defaultPlaceOfService:
          anyOf:
            - type: string
            - type: 'null'
          title: Defaultplaceofservice
          description: Default CMS Place of Service code for Super Bill autofill
      type: object
      required:
        - name
        - price
      title: ItemTiny
    SavedItemChargeUsage:
      properties:
        kind:
          type: string
          const: charge
          title: Kind
          default: charge
        chargeId:
          type: string
          title: Chargeid
          description: ID of the charge that used this saved item
        chargeItemId:
          type: string
          title: Chargeitemid
          description: ID of the charge item the SAVED_ITEM was applied to
        chargeDate:
          type: string
          format: date-time
          title: Chargedate
          description: Date when the charge was created
        quantityUsed:
          type: integer
          title: Quantityused
          description: Quantity used in this charge
        chargeTotal:
          type: integer
          title: Chargetotal
          description: Total amount of the charge
      type: object
      required:
        - chargeId
        - chargeItemId
        - chargeDate
        - quantityUsed
        - chargeTotal
      title: SavedItemChargeUsage
      description: >-
        A SAVED_ITEM was drawn down by a real charge (DiscountUse → ChargeItems
        → Charge).
    SavedItemManualAdjustment:
      properties:
        kind:
          type: string
          const: manual_adjustment
          title: Kind
          default: manual_adjustment
        adjustmentId:
          type: string
          title: Adjustmentid
        adjustedDate:
          type: string
          format: date-time
          title: Adjusteddate
        oldQuantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Oldquantity
        newQuantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Newquantity
        oldQuantityRemaining:
          anyOf:
            - type: integer
            - type: 'null'
          title: Oldquantityremaining
        newQuantityRemaining:
          anyOf:
            - type: integer
            - type: 'null'
          title: Newquantityremaining
        oldComment:
          anyOf:
            - type: string
            - type: 'null'
          title: Oldcomment
        newComment:
          anyOf:
            - type: string
            - type: 'null'
          title: Newcomment
        creatorId:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorid
        creatorName:
          anyOf:
            - type: string
            - type: 'null'
          title: Creatorname
      type: object
      required:
        - adjustmentId
        - adjustedDate
      title: SavedItemManualAdjustment
      description: >-
        A staff member edited the SAVED_ITEM directly (BankedItemAdjustment
        audit row).
    OriginatingCharge:
      properties:
        id:
          type: string
          title: Id
          description: Charge id (links to the originating invoice)
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Charge description / bill name shown to staff
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: Invoice/charge date
      type: object
      required:
        - id
        - createdDate
      title: OriginatingCharge
      description: >-
        The charge/invoice that minted this banked item (when it came from a
        purchase).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Unit:
      type: string
      enum:
        - AMPOULES
        - APPLICATORS
        - BOTTLES
        - BOXES
        - CAPSULES
        - CUPS
        - DOSES
        - G_PER_ML
        - GRAMS
        - IU
        - IU_PER_ML
        - OUNCES
        - FLUID_OUNCES
        - KG
        - KITS
        - LITERS
        - MCG
        - MG
        - MG_PER_ML
        - ML
        - MMOL
        - MICROGRAM_PER_ML
        - PACKS
        - PAIRS
        - PATCHES
        - PERCENTAGE
        - PIECES
        - POUCHES
        - ROLLS
        - SACHETS
        - SHEETS
        - SPRAYS
        - STRIPS
        - SYRINGES
        - TABLETS
        - TABLETS_PER_DAY
        - TESTS
        - TROCHES
        - TUBES
        - UNITS
        - VIALS
        - TREATMENTS
        - SESSIONS
        - PULSES
        - JOULES
        - CENTIMETERS
        - THREAD_COUNT
        - INJECTIONS
        - WRINKLE_UNITS
        - POUNDS
        - FEET
        - INCHES
      title: Unit
    ItemType:
      type: string
      enum:
        - ITEM
        - SERVICE
        - PRODUCT
        - PACKAGE
        - MEMBERSHIP
        - MEDICATION
        - SERVICE_FEE
        - GIFT_CARD
      title: ItemType
    ItemTagSummary:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
      type: object
      required:
        - id
        - name
      title: ItemTagSummary

````