---
title: "Create opportunity"
method: POST
path: "/assistedSales/v1/opportunities"
tags: ["AppResellerOpportunities"]
---

# Create opportunity

`POST /assistedSales/v1/opportunities`

## Request

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

Creates a new opportunity

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

## Query parameters

- `context` 'RESELLER' | 'SSR'

## Request body

- OpportunityCreationRequest
  - `customerCompanyId` string, required: Customer company ID
  - `customerId` string, required: Customer user ID
  - `ownerCompanyId` string, required: Sales agent company ID
  - `ownerId` string, required: Sales agent user ID
  - `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
  - `items` OpportunityItem[], required: 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'
  - `purchaseEffectiveDate` number: Opportunity purchase effective date, in UNIX Epoch milliseconds
  - `name` string: Opportunity name
  - `createdByCompanyId` string: Created by company ID
  - `createdById` string: Created by user ID
  - `purchaseCustomAttributes` object: Custom attributes related to the purchase

## Response `200`

Opportunity created

- 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

- `400`: The owner's or customer's company membership is invalid, or the owner is a Reseller who is not linked to the opportunity customer
- `401`: Unauthorized
- `409`: There is at least one restriction for a product in the opportunity

## Changes

- **2026-11-06** `1fc240f06971`: 10 breaking, 32 info
  - added the new required request property `customerCompanyId`
  - added the new required request property `customerId`
  - added the new required request property `items`
  - added the new required request property `ownerCompanyId`
  - …38 more

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