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

# Update order note for subscription

> Updates the order note that will be added to all future orders generated by this subscription. Order notes help merchants track special instructions, customer preferences, or internal information about the subscription.

**Key Features:**
- Note is automatically added to all future recurring orders
- Visible in both merchant portal and customer portal
- Appears in Shopify order details for easy reference
- Changes apply to future orders only (existing orders unchanged)
**Common Use Cases:**
- Customer preferences: "No nuts - severe allergy"
- Delivery instructions: "Leave package at side door"
- Gift messages: "Happy Birthday from Mom!"
- Internal notes: "VIP customer - priority handling"
- Processing instructions: "Include sample with each order"

**Important Notes:**
- Empty string clears the existing note
- No character limit imposed by API (check Shopify limits)
- HTML is not rendered - stored as plain text
- Updates are logged in activity history
- Note persists until explicitly changed

**Order Generation:**
When Appstle creates recurring orders:
1. Retrieves current order note from subscription
2. Adds note to new Shopify order
3. Note appears in order details immediately
4. Merchants can still edit individual order notes

**Authentication:** Requires valid X-API-Key header



## OpenAPI

````yaml /subscription/admin-api-swagger.json put /api/external/v2/subscription-contracts-update-order-note/{contractId}
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing subscriptions, payments, and
    related operations. These APIs allow you to programmatically manage
    subscription lifecycles, handle payments, configure products, and integrate
    subscription functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://subscription-admin.appstle.com
security: []
tags:
  - description: >-
      Core APIs for managing the complete subscription lifecycle including
      creation, updates, pausing, resuming, and cancellation of subscriptions.
    name: Subscription Management
  - description: >-
      APIs for managing subscription payment methods, processing payments,
      handling payment retries, and updating billing information.
    name: Subscription Payments
  - description: >-
      APIs for managing subscription contracts including delivery schedules,
      pricing, order notes, billing cycles, and shipping addresses.
    name: Subscription Contracts
  - description: >-
      APIs for managing products within subscriptions including adding,
      removing, updating quantities, and swapping products.
    name: Subscription Products
  - description: >-
      APIs for handling billing operations, payment processing, and financial
      transactions related to subscriptions.
    name: Billing & Payments
  - description: >-
      APIs for managing discounts and promotional codes applied to
      subscriptions.
    name: Subscription Discounts
  - description: >-
      APIs for managing one-time add-on products that can be purchased alongside
      recurring subscription items.
    name: Subscription One-Time Products
  - description: >-
      APIs for managing subscription plans, pricing tiers, and plan
      configurations.
    name: Subscription Plans
  - description: >-
      APIs for managing customizable product boxes and bundles where customers
      can select multiple items.
    name: Build-a-Box & Bundles
  - description: >-
      APIs for managing the product catalog including product information,
      variants, and inventory.
    name: Product Catalog
  - description: >-
      APIs for managing operational settings, configurations, and administrative
      functions.
    name: Operations & Settings
  - description: >-
      APIs powering the customer-facing portal where subscribers can manage
      their own subscriptions.
    name: Customer Portal
  - description: APIs for managing customer information, profiles, and account details.
    name: Customers
  - description: >-
      APIs for retrieving aggregated subscription data, customer subscription
      history, and account-level subscription information.
    name: Subscription Data
  - description: >-
      APIs for managing delivery profiles, shipping rates, free shipping
      configuration, and delivery method options on subscriptions.
    name: Delivery & Shipping
  - description: >-
      APIs for managing storefront customization including custom CSS, theme
      settings, label translations, and merchant-defined widget configuration.
    name: Customization
  - description: >-
      APIs for configuring cancellation flows, retention offers, cancellation
      reason management, and win-back automation.
    name: Customer Retention
paths:
  /api/external/v2/subscription-contracts-update-order-note/{contractId}:
    put:
      tags:
        - Subscription Management
        - Subscription Contracts
      summary: Update order note for subscription
      description: >-
        Updates the order note that will be added to all future orders generated
        by this subscription. Order notes help merchants track special
        instructions, customer preferences, or internal information about the
        subscription.


        **Key Features:**

        - Note is automatically added to all future recurring orders

        - Visible in both merchant portal and customer portal

        - Appears in Shopify order details for easy reference

        - Changes apply to future orders only (existing orders unchanged)

        **Common Use Cases:**

        - Customer preferences: "No nuts - severe allergy"

        - Delivery instructions: "Leave package at side door"

        - Gift messages: "Happy Birthday from Mom!"

        - Internal notes: "VIP customer - priority handling"

        - Processing instructions: "Include sample with each order"


        **Important Notes:**

        - Empty string clears the existing note

        - No character limit imposed by API (check Shopify limits)

        - HTML is not rendered - stored as plain text

        - Updates are logged in activity history

        - Note persists until explicitly changed


        **Order Generation:**

        When Appstle creates recurring orders:

        1. Retrieves current order note from subscription

        2. Adds note to new Shopify order

        3. Note appears in order details immediately

        4. Merchants can still edit individual order notes


        **Authentication:** Requires valid X-API-Key header
      operationId: updateOrderNoteV2
      parameters:
        - description: Subscription contract ID to update
          example: 123456789
          in: path
          name: contractId
          required: true
          schema:
            format: int64
            minimum: 1
            type: integer
        - deprecated: true
          description: API Key (Deprecated - Use X-API-Key header instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - description: API Key for authentication
          example: sk_live_1234567890abcdef
          in: header
          name: X-API-Key
          required: true
          schema:
            type: string
        - description: >-
            Note text to be added to all future orders. Can include special
            instructions, preferences, or internal notes. Pass empty string to
            clear existing note. HTML tags are not rendered - stored as plain
            text.
          examples:
            Allergy Note:
              description: Allergy Note
              value: No peanuts - severe allergy
            Clear Note:
              description: Clear Note
            Delivery Instruction:
              description: Delivery Instruction
              value: Ring doorbell twice, leave at back door
            Gift Message:
              description: Gift Message
              value: Happy Anniversary! Love, Sarah
            Internal Note:
              description: Internal Note
              value: VIP Customer - Include free sample
          in: query
          name: orderNote
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              example: true
              schema:
                type: boolean
          description: Order note successfully updated
          headers:
            X-Application-Context:
              description: Application context with success message
              schema:
                example: 'appname:Subscription Updated:'
                type: string
              style: simple
        '400':
          content:
            application/json:
              examples:
                Contract Not Found:
                  description: Contract Not Found
                  value:
                    detail: 'No subscription contract found with ID: 123456789'
                    instance: >-
                      /api/external/v2/subscription-contracts-update-order-note/123456789
                    status: 400
                    title: Contract not found
                    type: https://example.com/errors/bad-request
                Invalid Contract ID:
                  description: Invalid Contract ID
                  value:
                    detail: Contract does not belong to this shop
                    instance: >-
                      /api/external/v2/subscription-contracts-update-order-note/123456789
                    status: 400
                    title: invalid id
                    type: https://example.com/errors/bad-request
                Missing Order Note:
                  description: Missing Order Note
                  value:
                    detail: Required request parameter 'orderNote' is not present
                    instance: >-
                      /api/external/v2/subscription-contracts-update-order-note/123456789
                    status: 400
                    title: Missing required parameter
                    type: https://example.com/errors/bad-request
          description: Invalid request or contract not found
        '401':
          content:
            application/json:
              example:
                detail: Valid X-API-Key header is required
                instance: >-
                  /api/external/v2/subscription-contracts-update-order-note/123456789
                status: 401
                title: Authentication required
                type: https://example.com/errors/unauthorized
          description: Authentication required
        '403':
          content:
            application/json:
              example:
                detail: >-
                  API key does not have permission to modify subscription
                  contracts
                instance: >-
                  /api/external/v2/subscription-contracts-update-order-note/123456789
                status: 403
                title: Insufficient permissions
                type: https://example.com/errors/forbidden
          description: Insufficient permissions
        '404':
          content:
            application/json:
              example:
                detail: Subscription contract with ID 123456789 not found
                instance: >-
                  /api/external/v2/subscription-contracts-update-order-note/123456789
                status: 404
                title: Resource not found
                type: https://example.com/errors/not-found
          description: Subscription contract not found

````