---
title: "Finalize opportunity"
method: POST
path: "/assistedSales/v2/opportunities/{opportunityId}/finalize"
tags: ["AppResellerOpportunities"]
---

# Finalize opportunity

`POST /assistedSales/v2/opportunities/{opportunityId}/finalize`

## Request

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

Finalize an opportunity

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

## Path parameters

- `opportunityId` string, required

## Response `202`

Accepted

- Opportunity
  - `id` string: Opportunity ID
  - `ownerUser` User
    - `id` string: User ID
    - `email` string: User email address
    - `firstName` string: User first name
    - `lastName` string: User last name
    - `company` object: User company
      - `id` string: Company ID
      - `name` string: Company name
      - `isReseller` boolean: Indicate if the company is reseller
  - `customerUser` User
    - `id` string: User ID
    - `email` string: User email address
    - `firstName` string: User first name
    - `lastName` string: User last name
    - `company` object: User company
      - `id` string: Company ID
      - `name` string: Company name
      - `isReseller` boolean: Indicate if the company is reseller
  - `createdOn` number: Opportunity creation date, in UNIX Epoch milliseconds
  - `currency` 'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN': The currency using the ISO-4217 currency code
  - `purchaseEffectiveDate` number: Opportunity purchase effective date, in UNIX Epoch milliseconds
  - `name` string: Opportunity name
  - `status` 'OPEN' | 'CLOSED' | 'PENDING_REVIEW': Opportunity status
  - `items` OpportunityItem[]: List of items in the opportunity
    - `id` string: Item ID
    - `parentItemId` string: The parent product's Product ID. Only relevant to and required for add-on products.
    - `pricingPlanId` string: Pricing plan ID
    - `units` BillingConfiguration[]: List of units (quantity and type) associated with the item
      - `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'
    - `productId` string: Product ID
    - `subscriptionCustomAttributes` object: Custom attributes related to the subscription
    - `vendorRequiredFields` object: Custom attributes related to vendor required fields for the subscription
    - `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'
  - `purchaseId` string: Purchase ID
  - `purchaseNumber` string: Purchase number
  - `availableActions` AvailableAction[]: Available actions on the opportunity
  - `actionRestrictions` object: Action restrictions on the opportunity
    - `entry` Restriction[]: Opportunity action restrictions
  - `purchaseCustomAttributes` object: Custom attributes related to the purchase

## Other responses

- `401`: Unauthorized
- `403`: The user does not have access to the opportunity, or the user does not have permission to execute the action, or the opportunity status does not allow the action, or restrictions apply such as customer account being inactive.
- `404`: Invalid opportunity ID

## Changes

- **2026-11-06** `1fc240f06971`: 4 breaking, 26 info
  - the response's body type changed from no type to `object` for status `202`
  - the response's body type changed from no type to `object` for status `401`
  - the response's body type changed from no type to `object` for status `403`
  - the response's body type changed from no type to `object` for status `404`
  - …26 more

[Operation history](https://skmtc.dev/appdirect/apis/companies/changes/assistedSales/v2/opportunities/:opportunityId/finalize/post.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)
