> ## 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.

# Add one-time product to upcoming order

> Adds a one-time product (one-off) to a specific upcoming billing attempt for a membership contract. The product will be included only in the specified order and will not become part of the recurring subscription.

**Key Features:**
- **One-Time Addition**: Product added to single order only
- **Billing Cycle Targeting**: Specify exact order to add item to
- **No Subscription Impact**: Doesn't change recurring items
- **Instant Upsell**: Add products between regular billing cycles
- **Customer Flexibility**: Allow members to add extras to next order
- **Activity Logging**: Tracks who added the item (merchant vs API)

**Required Parameters:**
- **Contract ID**: Target subscription contract
- **Billing Attempt ID**: Specific upcoming order to add item to
- **Variant ID**: Shopify product variant to add
- **Variant Handle**: Product handle for identification

**How It Works:**
1. Validates contract exists and belongs to shop
2. Checks if contract is not frozen (minimum cycles)
3. Verifies billing attempt is upcoming (not already processed)
4. Adds variant to the specified billing attempt
5. Returns updated list of all one-offs for the contract
6. Logs activity for audit trail

**Use Cases:**
- Customer wants to add a bonus product to next delivery
- Merchant offers limited-time add-on to existing members
- Trial/sample products added to specific orders
- Holiday specials or seasonal items
- Promotional gifts or rewards
- One-time upsells in customer portal

**Business Rules:**
- Item added only to specified billing attempt
- Cannot add to past or completed orders
- Contract must not be frozen/minimum cycle locked
- Duplicate items increment quantity

**Authentication:** Requires API key authentication via X-API-Key header or api_key parameter



## OpenAPI

````yaml /memberships/admin-api-swagger.json put /api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id
openapi: 3.0.1
info:
  description: >-
    Comprehensive API documentation for managing memberships, payments, and
    related operations. These APIs allow you to programmatically manage
    membership lifecycles, handle payments, configure products, and integrate
    membership functionality into your applications.
  title: Admin APIs
  version: 0.0.1
servers:
  - url: https://membership-admin.appstle.com
security: []
tags:
  - description: >-
      APIs for managing Shopify delivery profiles, shipping rates, zones, and
      free shipping configuration for subscription memberships
    name: Shipping & Delivery Profiles
  - description: >-
      APIs for retrieving historical discount code usage and redemption
      information for membership contracts
    name: Customer Discount History
  - description: >-
      APIs for managing membership cancellation flow settings including
      retention offers, survey questions, and cancel confirmation screens
    name: Cancellation Flow Configuration
  - description: >-
      APIs for managing membership billing attempts, recurring orders, payment
      retries, order history, and order skipping
    name: Billing & Orders
  - description: >-
      APIs for managing one-time product additions to upcoming subscription
      orders, including adding, retrieving, and removing one-off items
    name: One-Time Add-Ons
  - description: >-
      APIs for managing membership/subscription plan groups, including creating
      plans, configuring discounts, billing intervals, and assigning products to
      plans
    name: Membership Plans
  - description: >-
      APIs for managing subscription product bundles, bundle configurations,
      item grouping, and bundle-specific discount codes
    name: Product Bundles
  - description: >-
      APIs for retrieving custom CSS styles applied to subscription widgets and
      customer portal for theme customization
    name: Custom CSS Styling
  - description: >-
      APIs for managing customer portal settings including UI customization,
      text labels, feature toggles, and branding options for the member
      self-service portal
    name: Customer Portal Configuration
  - description: >-
      APIs for managing membership/subscription contracts including creation,
      updates, status changes, line items, discounts, and billing operations
    name: Membership Contracts
  - description: >-
      APIs for managing subscription bundle configuration settings including
      bundle behavior, pricing rules, and display options
    name: Bundle Settings
  - description: >-
      APIs for managing customer payment methods, payment tokens, and payment
      method retrieval for subscriptions
    name: Customer Payment Methods
  - description: >-
      APIs for retrieving product swap/substitution options allowing members to
      exchange subscription items based on configured swap rules and variant
      groups
    name: Product Swap Rules
  - description: >-
      APIs for retrieving product catalog, variants, pricing, and inventory
      information for subscription memberships.
    name: Product & Inventory Data
  - description: >-
      APIs for managing shop-level membership settings, configuration, and
      general store information.
    name: Shop Settings
  - description: >-
      APIs for performing bulk/mass operations on multiple membership contracts
      including status updates, product replacements, and billing date changes.
    name: Bulk Operations
paths:
  /api/external/v2/subscription-contract-one-offs-by-contractId-and-billing-attempt-id:
    put:
      tags:
        - One-Time Add-Ons
      summary: Add one-time product to upcoming order
      description: >-
        Adds a one-time product (one-off) to a specific upcoming billing attempt
        for a membership contract. The product will be included only in the
        specified order and will not become part of the recurring subscription.


        **Key Features:**

        - **One-Time Addition**: Product added to single order only

        - **Billing Cycle Targeting**: Specify exact order to add item to

        - **No Subscription Impact**: Doesn't change recurring items

        - **Instant Upsell**: Add products between regular billing cycles

        - **Customer Flexibility**: Allow members to add extras to next order

        - **Activity Logging**: Tracks who added the item (merchant vs API)


        **Required Parameters:**

        - **Contract ID**: Target subscription contract

        - **Billing Attempt ID**: Specific upcoming order to add item to

        - **Variant ID**: Shopify product variant to add

        - **Variant Handle**: Product handle for identification


        **How It Works:**

        1. Validates contract exists and belongs to shop

        2. Checks if contract is not frozen (minimum cycles)

        3. Verifies billing attempt is upcoming (not already processed)

        4. Adds variant to the specified billing attempt

        5. Returns updated list of all one-offs for the contract

        6. Logs activity for audit trail


        **Use Cases:**

        - Customer wants to add a bonus product to next delivery

        - Merchant offers limited-time add-on to existing members

        - Trial/sample products added to specific orders

        - Holiday specials or seasonal items

        - Promotional gifts or rewards

        - One-time upsells in customer portal


        **Business Rules:**

        - Item added only to specified billing attempt

        - Cannot add to past or completed orders

        - Contract must not be frozen/minimum cycle locked

        - Duplicate items increment quantity


        **Authentication:** Requires API key authentication via X-API-Key header
        or api_key parameter
      operationId: saveOneOffByV2
      parameters:
        - description: API Key (Deprecated - Use Header X-API-Key instead)
          in: query
          name: api_key
          required: false
          schema:
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            type: string
        - description: Subscription contract ID
          example: 123456
          in: query
          name: contractId
          required: true
          schema:
            format: int64
            type: integer
        - description: Billing attempt ID to add the item to
          example: 789012
          in: query
          name: billingAttemptId
          required: true
          schema:
            format: int64
            type: integer
        - description: Product variant ID to add
          example: 456789
          in: query
          name: variantId
          required: true
          schema:
            format: int64
            type: integer
        - description: Product handle for identification
          example: coffee-beans-1lb
          in: query
          name: variantHandle
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractOneOffDTO'
                type: array
          description: >-
            One-off product successfully added, returns updated list of all
            one-offs
        '400':
          content:
            application/json:
              examples:
                Frozen Contract:
                  description: Frozen Contract
                  value:
                    detail: >-
                      Cannot modify contract frozen until minimum cycles
                      completed
                    errorKey: frozen_contract
                    status: 400
                    title: Bad Request
                Invalid Billing Attempt:
                  description: Invalid Billing Attempt
                  value:
                    detail: Billing attempt not found or already processed
                    errorKey: invalid_billing_attempt
                    status: 400
                    title: Bad Request
          description: Invalid request or business rule violation
        '401':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractOneOffDTO'
                type: array
          description: Authentication required - invalid or missing API key
        '403':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractOneOffDTO'
                type: array
          description: Access forbidden - contract does not belong to authenticated shop
        '404':
          content:
            '*/*':
              schema:
                items:
                  $ref: '#/components/schemas/SubscriptionContractOneOffDTO'
                type: array
          description: Contract or variant not found
components:
  schemas:
    SubscriptionContractOneOffDTO:
      properties:
        billingAttemptId:
          description: Associated billing attempt ID
          format: int64
          type: integer
        id:
          description: Unique identifier of the one-off item
          example: 789
          format: int64
          type: integer
        shop:
          description: Shop domain identifier
          example: my-store.myshopify.com
          type: string
        subscriptionContractId:
          description: Associated subscription contract ID
          format: int64
          type: integer
        variantHandle:
          description: Product variant handle for the one-off item
          type: string
        variantId:
          description: Shopify product variant ID of the one-off item
          format: int64
          type: integer
      required:
        - shop
      type: object

````