---
title: "Edit item"
method: PUT
path: "/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}"
tags: ["AppResellerOpportunities"]
---

# Edit item

`PUT /assistedSales/v1/opportunities/{opportunityId}/items/{itemId}`

## Request

- Base URL: `https://marketplace.appdirect.com/api`
- URL: `https://marketplace.appdirect.com/api/assistedSales/v1/opportunities/{opportunityId}/items/{itemId}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/appdirect/apis/companies/docs/assistedSales/v1/opportunities/:opportunityId/items/:itemId/put.ts> (a function with typed inputs; its response is checked against the schema)

Edit an item on the opportunity.

Required: Accept-Language header with Locale format. For example: en-US

## Path parameters

- `opportunityId` string, required
- `itemId` string, required

## Request body

- OpportunityItemUpdateRequest
  - `id` string: Item ID
  - `pricingPlanId` string, required: Pricing plan ID
  - `units` Unit[]: List of units (quantity and type) associated with the item
    - `quantity` number: Quantity
    - `unit` string: Unit
  - `customPrices` CustomPrice[]: List of custom prices per cost
    - `costId` string, required: ID of the cost/pricing item for which to override prices.
    - `priceType` 'RESELLER_PURCHASE_PRICE' | 'MARKETPLACE_RESELLER_PURCHASE_PRICE'
    - `pricingStrategy` 'FREE' | 'FLAT' | 'UNIT' | 'TIERED' | 'VOLUME' | 'VARIABLE_PRICE_STRATEGIES' | 'UNLIMITED' | 'CUSTOM': Pricing strategy
    - `definition` Definition: Definition for flat/unit range prices.
      - `price` number: Flat price.
      - `priceRanges` PriceRange[]: Unit range prices.
        - `min` number, required
        - `max` number
        - `price` number, required
        - `salePrice` string, amount: Regular sale price
        - `wholesalePrice` string, amount: Wholesale sale price
  - `contractConfiguration` ContractConfiguration: Contract configuration options for subscriptions that customers purchase. For example: contract length and cancellation penalities.
    - `minimumServiceLength` integer: Contract length. The number of minimumServiceLengthUnits that defines contract duration.
    - `minimumServiceLengthUnit` 'DAILY' | 'MONTHLY' | 'QUARTERLY' | 'SIX_MONTHS' | 'YEARLY' | 'TWO_YEARS' | 'THREE_YEARS': Time unit for contract length. This property must have the same value as the contract length unit configured for the pricing plan.
    - `renewalConfiguration` 'MONTH_TO_MONTH' | 'AUTO_RENEW' | 'CANCEL_SUBSCRIPTION': Contract renewal configuration. Whether the contract is renewed and, if so, with what terms.
    - `terminationFee` TerminationFeeAS: Termination fee
      - `feeType` 'NONE' | 'PERCENTAGE' | 'FIXED': Contract termination fee type
      - `amount` number
      - `description` string
    - `terminationFeeGracePeriod` integer: Termination fee grace period duration. Number of terminationFeeGracePeriodUnits that define the risk-free period after the contract starts, during which no termination fee is charged if the customer cancels the contract.
    - `terminationFeeGracePeriodUnit` 'NONE' | 'DAY' | 'MONTH': Termination fee grace period unit. Time unit by which the terminationFeeGracePeriod is measured.
    - `endOfContractGracePeriod` integer: End of contract grace period duration. Number of endofContractGracePeriodUnits that define the period after the contract ends, during which customers can resubscribe before their account and data might be deleted.
    - `endOfContractGracePeriodUnit` 'NONE' | 'INFINITY' | 'DAY' | 'MONTH': End-of-contract grace period unit. Time unit by which the endOfContractGracePeriod is measured.
    - `contractCancellationPeriodLimit` integer: Contract cancellation period limit duration. Number of contractCancellationPeriodUnits that define the period before the contract ends, during which customers can no longer cancel the contract and it is renewed.
    - `contractCancellationPeriodUnit` 'NONE' | 'DAY': Cancellation period unit. Time unit by which the contractCancellationPeriodLimit is measured.
    - `unitTerms` object: Maps a unit type (for example, user) to UnitContractTerms (see object definition). Enabled terms restrict mid-contract quantity changes for the unit type on subscriptions. See example.
      - `default` string
    - `blockContractUpgrades` boolean: Whether subscriptions can be upgraded mid-contract term
    - `blockContractDowngrades` boolean: Whether subscriptions can be downgraded mid-contract term
    - `blockSwitchToShorterContract` boolean: Whether subscriptions can be changed to plans with shorter or no contracts.
    - `keepContractDateOnPlanChange` boolean: Whether the remaining contract duration changes when a user changes a subscription pricing plan
    - `isDefault` boolean: Whether it is a default or custom contract
  - `provisioningConfiguration` ProvisioningConfiguration: Determines when to send the service activation request to the vendor, either immediately after the opportunity is finalized (set the provisioning strategy to IMMEDIATELY) or at a future date (set the provisioning strategy to CUSTOM and set the desired date).
    - `date` number: Custom service activation date in UNIX Epoch milliseconds. This date is required when the provisioning strategy is CUSTOM. Do not set the date when the strategy is IMMEDIATELY.
    - `strategy` 'CUSTOM' | 'IMMEDIATELY'
  - `billingConfiguration` BillingConfiguration: Determines when the billing cycle starts. Set UPON_SERVICE_ACTIVATION to start the billing cycle according to the specified provisioning strategy (either immediately after the opportunity is finalized or on a custom provisioning date). Set NEXT_BILLING_CYCLE to start the billing cycle according to the marketplace billing configuration (for example, first of the month). Set CUSTOM to start the billing cycle on a specified date in the future.
    - `date` number: Custom billing activation date in UNIX Epoch milliseconds. This date is required when the billing strategy is CUSTOM. Do not set the date when the strategy is UPON_SERVICE_ACTIVATION or NEXT_BILLING_CYCLE.
    - `strategy` 'CUSTOM' | 'NEXT_BILLING_CYCLE' | 'UPON_SERVICE_ACTIVATION'
  - `subscriptionCustomAttributes` CustomAttribute: Custom attributes as key-value pairs. Values must be a string array
  - `vendorRequiredFields` CustomAttribute: Custom attributes as key-value pairs. Values must be a string array

## Response `200`

Success

- OpportunityItemDetail
  - `id` string: Item ID
  - `product` object: Product information
    - `id` string: Product ID
    - `name` string: Product name
    - `type` string: Product type
    - `logo` string: Product logo URL
  - `pricingPlan` object: Pricing plan information
    - `id` string: Pricing plan ID
    - `name` string: Pricing plan name
  - `units` Unit[]: List of units (quantity and type) associated with the item
    - `quantity` number: Quantity
    - `unit` string: Unit
  - `pricing` OpportunityPricing[]: Cost of each quantifiable unit and flat rates
    - `costId` string: The cost ID
    - `costTypeCategory` 'RECURRING' | 'ONE_TIME', required: Category of cost
    - `costType` 'RECURRING_FLAT' | 'ONE_TIME_FLAT' | 'INCLUDED' | 'SETUP_PER_UNIT' | 'RECURRING_PER_UNIT' | 'ONE_TIME_PER_UNIT' | 'SETUP_FEE' | 'CONTRACT_FEE' | 'DISCOUNT_PER_UNIT' | 'DISCOUNT_FLAT' | 'METERED_USAGE', required: Type of cost
    - `frequency` 'ONE_TIME' | 'DAILY' | 'MONTHLY' | 'QUARTERLY' | 'SIX_MONTHS' | 'YEARLY' | 'TWO_YEARS' | 'THREE_YEARS': The pricing period. The billing frequency for the pricing plan.
    - `pricingStrategy` 'FREE' | 'FLAT' | 'UNIT' | 'VOLUME' | 'TIERED' | 'UNLIMITED' | 'CUSTOM', required: Pricing strategy
    - `priceRanges` PriceRangeItem[]: Range of units for which the price is valid
      - `min` string: Minimum number of units for the price range
      - `max` string: Maximum number of units for the price range
    - `description` string: Description of each pricing line
    - `unit` string: Unit
    - `quantity` string: Quantity
    - `salePrice` string, required: Sale price
    - `wholesalePrice` string, required: Wholesale price
    - `totalSalePrice` string, required: Total sale price
  - `contractConfiguration` object: Contract configuration
    - `minimumServiceLength` integer: Contract length. The number of minimumServiceLengthUnits that defines contract duration.
    - `minimumServiceLengthUnit` 'DAILY' | 'MONTHLY' | 'QUARTERLY' | 'SIX_MONTHS' | 'YEARLY' | 'TWO_YEARS' | 'THREE_YEARS': Time unit for contract length. This property must have the same value as the contract length unit configured for the pricing plan.
    - `renewalConfiguration` 'MONTH_TO_MONTH' | 'AUTO_RENEW' | 'CANCEL_SUBSCRIPTION': Contract renewal configuration. Whether the contract is renewed and, if so, with what terms.
    - `terminationFee` TerminationFeeAS: Termination fee
      - `feeType` 'NONE' | 'PERCENTAGE' | 'FIXED': Contract termination fee type
      - `amount` number
      - `description` string
    - `terminationFeeGracePeriod` integer: Termination fee grace period duration. Number of terminationFeeGracePeriodUnits that define the risk-free period after the contract starts, during which no termination fee is charged if the customer cancels the contract.
    - `terminationFeeGracePeriodUnit` 'NONE' | 'DAY' | 'MONTH': Termination fee grace period unit. Time unit by which the terminationFeeGracePeriod is measured.
    - `endOfContractGracePeriod` integer: End of contract grace period duration. Number of endofContractGracePeriodUnits that define the period after the contract ends, during which customers can resubscribe before their account and data might be deleted.
    - `endOfContractGracePeriodUnit` 'NONE' | 'INFINITY' | 'DAY' | 'MONTH': End-of-contract grace period unit. Time unit by which the endOfContractGracePeriod is measured.
    - `contractCancellationPeriodLimit` integer: Contract cancellation period limit duration. Number of contractCancellationPeriodUnits that define the period before the contract ends, during which customers can no longer cancel the contract and it is renewed.
    - `contractCancellationPeriodUnit` 'NONE' | 'DAY': Cancellation period unit. Time unit by which the contractCancellationPeriodLimit is measured.
    - `unitTerms` object: Maps a unit type (for example, user) to UnitContractTerms (see object definition). Enabled terms restrict mid-contract quantity changes for the unit type on subscriptions. See example.
      - `default` string
    - `blockContractUpgrades` boolean: Whether subscriptions can be upgraded mid-contract term
    - `blockContractDowngrades` boolean: Whether subscriptions can be downgraded mid-contract term
    - `blockSwitchToShorterContract` boolean: Whether subscriptions can be changed to plans with shorter or no contracts.
    - `keepContractDateOnPlanChange` boolean: Whether the remaining contract duration changes when a user changes a subscription pricing plan
    - `isDefault` boolean: Whether it is a default or custom contract
  - `provisioningConfiguration` object: Custom service activation dates
    - `date` number: Custom service activation date in UNIX Epoch milliseconds. This date is required when the provisioning strategy is CUSTOM. Do not set the date when the strategy is IMMEDIATELY.
    - `strategy` 'CUSTOM' | 'IMMEDIATELY'
  - `billingConfiguration` object: Custom billing dates
    - `date` number: Custom billing activation date in UNIX Epoch milliseconds. This date is required when the billing strategy is CUSTOM. Do not set the date when the strategy is UPON_SERVICE_ACTIVATION or NEXT_BILLING_CYCLE.
    - `strategy` 'CUSTOM' | 'NEXT_BILLING_CYCLE' | 'UPON_SERVICE_ACTIVATION'
  - `subscriptionCustomAttributes` object: Custom attributes related to the subscription
  - `vendorRequiredFields` object: Custom attributes related to vendor required fields for the subscription

## Other responses

- `400`: Missing or invalid required parameter
- `401`: Unauthorized
- `403`: The user does not have access to the opportunity, or does not have permission to update part or the whole item information, or the opportunity status does not allow the action
- `404`: Invalid opportunity ID

## Changes

- **2026-11-06** `1fc240f06971`: 7 breaking, 34 info
  - added the new required request property `pricingPlanId`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - the response's body type changed from no type to `object` for status `400`
  - …37 more

[Operation history](https://skmtc.dev/appdirect/apis/companies/changes/assistedSales/v1/opportunities/:opportunityId/items/:itemId/put.md)

---

[API](https://skmtc.dev/appdirect/apis/companies.md) - [All operations](https://skmtc.dev/appdirect/apis/companies/llms.txt) - [OpenAPI document](https://skmtc.dev/appdirect/apis/companies/revisions/1fc240f06971?raw)
