AppDirect AppResellerOpportunities API
The AppResellerOpportunities API from AppDirect — 17 operation(s) for appreselleropportunities.
The AppResellerOpportunities API from AppDirect — 17 operation(s) for appreselleropportunities.
openapi: 3.0.0
info:
description: The Companies API allows developers to manage marketplace companies and their user memberships.
title: Companies AI Embed AppResellerOpportunities API
license:
name: Apache License, Version 2.0
url: http://www.apache.org/licenses/LICENSE-2.0
version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: AppResellerOpportunities
x-displayName: Opportunities
paths:
/assistedSales/v1/opportunities:
post:
x-appdirect-api-stage: Early Access
summary: Create opportunity
description: 'Creates a new opportunity
Required: Accept-Language header with Locale format. For example: en-US'
tags:
- AppResellerOpportunities
operationId: createOpportunity
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller to the opportunity
ROLE_SALES_SUPPORT:
- Allows access as a Sales Support Representative to the opportunity
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager to the opportunity
ROLE_PARTNER:
- Allows access as a Partner to the opportunity
parameters:
- in: query
name: context
description: Deprecated. Parameter has no impact on this endpoint.
required: false
schema:
type: string
enum:
- RESELLER
- SSR
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityCreationRequest'
description: Information about the opportunity being created
required: true
responses:
'200':
description: Opportunity created
content:
application/json:
schema:
$ref: '#/components/schemas/Opportunity'
examples:
response:
value:
id: ef6c414f-39da-401f-a4b8-81adc6190fda
ownerUser:
id: d781ac09-b4fe-4d57-8ba2-4640fc5b7c49
email: john.doe@acme.com
firstName: John
lastName: Doe
company:
id: '1'
name: Acme Corp.
customerUser:
id: 498c62ea-ad14-48e6-96ce-5400c617444c
email: jane.smith@company.com
firstName: Jane
lastName: Smith
company:
id: '100'
name: Customer Company
createdOn: '1546300800000'
currency: USD
purchaseEffectiveDate: '1577750400000'
name: Prospect N1
status: OPEN
items:
- id: 4ccf689b-4339-4fc9-a8b3-b05c5a87c1be
pricingPlanId: 4bc864b5-f63f-4933-be19-3700aa9a8cc4
units:
- quantity: '20'
unit: USER
subscriptionCustomAttributes:
intended_os:
- other
- ios
- macos
sales_agent_id:
- R353113R
vendorRequiredFields:
name:
- John
lastname:
- Doe
email:
- john.doe@acme.com
- id: dece524d-0466-4185-b3bb-1f8a300c37cd
pricingPlanId: 80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4
units: []
availableActions:
- ADD_PRODUCT
- EDIT
- FINALIZE
- SET_CUSTOM_PRICE
- SET_CUSTOM_CONTRACT
- SET_PROVISIONING_DATE
- SET_BILLING_DATE
- CHANGE_OPPORTUNITY_OWNER
actionRestrictions: {}
createdByUser:
id: 8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4
email: peter.parker@marvel.com
firstName: Peter
lastName: Parker
company:
id: '99'
name: Marvel Corp.
'400':
description: The owner's or customer's company membership is invalid, or the owner is a Reseller who is not linked to the opportunity customer
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 400
code: INVALID_FORMAT
message: createOpportunity.arg0.ownerCompanyId may not be null
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 401
code: UNAUTHORIZED
message: HTTP 401 Unauthorized
'409':
description: There is at least one restriction for a product in the opportunity
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 409
code: CONFLICT
message: 'There is at least one restriction for a product in the opportunity. OwnerUUID: d781ac09-b4fe-4d57-8ba2-4640fc5b7c49 CustomerUUID: 498c62ea-ad14-48e6-96ce-5400c617444c - Restrictions by product: 58a8508e-f480-4dfa-b605-a0512c00c1ea ( ALREADY_PURCHASED )'
x-codeSamples:
- lang: Shell + Curl
source: "curl --request POST \\\n --url 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities?context=SOME_STRING_VALUE' \\\n --header 'content-type: application/json' \\\n --data '{\"customerCompanyId\":\"498c62ea-ad14-48e6-96ce-5400c617444c\",\"customerId\":\"505f0a0c-57a7-4d9e-9fac-66bbf557ac4d\",\"ownerCompanyId\":\"6a62244e-aa2f-461b-8c7a-3a0e091be9d3\",\"ownerId\":\"d781ac09-b4fe-4d57-8ba2-4640fc5b7c49\",\"items\":[{\"pricingPlanId\":\"85d30404-c56b-4dff-9f3b-06636477fe55\",\"units\":[{\"quantity\":10,\"unit\":\"USER\"}]},{\"pricingPlanId\":\"d12931cf-eac6-45fa-8965-d33b1c5698b0\",\"units\":[]}],\"currency\":\"USD\",\"createdByCompanyId\":\"b7e0c48b-6d0d-45fc-9c8a-3fa3fd84d9f1\",\"createdById\":\"8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4\",\"purchaseCustomAttributes\":{\"paid_off_platform_contact\":[\"janet.doe@accounting.acme.com\"]}}'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities',\n qs: {context: 'SOME_STRING_VALUE'},\n headers: {'content-type': 'application/json'},\n body: {\n customerCompanyId: '498c62ea-ad14-48e6-96ce-5400c617444c',\n customerId: '505f0a0c-57a7-4d9e-9fac-66bbf557ac4d',\n ownerCompanyId: '6a62244e-aa2f-461b-8c7a-3a0e091be9d3',\n ownerId: 'd781ac09-b4fe-4d57-8ba2-4640fc5b7c49',\n items: [\n {\n pricingPlanId: '85d30404-c56b-4dff-9f3b-06636477fe55',\n units: [{quantity: 10, unit: 'USER'}]\n },\n {pricingPlanId: 'd12931cf-eac6-45fa-8965-d33b1c5698b0', units: []}\n ],\n currency: 'USD',\n createdByCompanyId: 'b7e0c48b-6d0d-45fc-9c8a-3fa3fd84d9f1',\n createdById: '8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4',\n purchaseCustomAttributes: {paid_off_platform_contact: ['janet.doe@accounting.acme.com']}\n },\n json: true\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"customerCompanyId\\\":\\\"498c62ea-ad14-48e6-96ce-5400c617444c\\\",\\\"customerId\\\":\\\"505f0a0c-57a7-4d9e-9fac-66bbf557ac4d\\\",\\\"ownerCompanyId\\\":\\\"6a62244e-aa2f-461b-8c7a-3a0e091be9d3\\\",\\\"ownerId\\\":\\\"d781ac09-b4fe-4d57-8ba2-4640fc5b7c49\\\",\\\"items\\\":[{\\\"pricingPlanId\\\":\\\"85d30404-c56b-4dff-9f3b-06636477fe55\\\",\\\"units\\\":[{\\\"quantity\\\":10,\\\"unit\\\":\\\"USER\\\"}]},{\\\"pricingPlanId\\\":\\\"d12931cf-eac6-45fa-8965-d33b1c5698b0\\\",\\\"units\\\":[]}],\\\"currency\\\":\\\"USD\\\",\\\"createdByCompanyId\\\":\\\"b7e0c48b-6d0d-45fc-9c8a-3fa3fd84d9f1\\\",\\\"createdById\\\":\\\"8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4\\\",\\\"purchaseCustomAttributes\\\":{\\\"paid_off_platform_contact\\\":[\\\"janet.doe@accounting.acme.com\\\"]}}\");\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/assistedSales/v1/opportunities?context=SOME_STRING_VALUE\")\n .post(body)\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"
get:
x-appdirect-api-stage: Early Access
summary: List opportunities
description: "Retrieve a list of opportunities. Returned opportunities are limited to role visibility: \n Marketplace Manager, Partner, Partner Read: all opportunities. \n Reseller Manager: all opportunities owned by Reseller companies. \n Reseller, SSR: all opportunities owned by the company to which the Reseller or SSR belongs. \n When users have multiple roles, visibility is the sum of visibility for all their roles. \n Additional filter parameters are available for some roles.\n\nRequired: Accept-Language header with Locale format. For example: en-US"
tags:
- AppResellerOpportunities
operationId: readOpportunities
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller to the opportunity
ROLE_SALES_SUPPORT:
- Allows access as a Sales Support to the opportunity
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager to the opportunity
ROLE_PARTNER:
- Allows access as a Partner to the opportunity
ROLE_PARTNER_READ:
- Allows read access as a Partner to the opportunity
parameters:
- in: query
name: ownerId
description: Sales agent's user ID
required: false
schema:
type: string
- in: query
name: ownerCompanyId
description: Sales agent's company ID, which defines which company owns opportunities. This is an optional filter to only return opportunities that the sale's agent's company owns. Only valid for Marketplace Manager, Reseller Manager, Partner, and Partner Read roles (invalid for Reseller and SSR roles because they can only see opportunities owned by their company). No opportunities are returned when the call is filtered by a company ID for which the user does not have access.
required: false
schema:
type: string
- in: query
name: customerId
description: Customer's user ID
required: false
schema:
type: string
- in: query
name: customerCompanyId
description: Customer's company ID
required: false
schema:
type: string
- in: query
name: context
description: Optional. For Marketplace Manager, Partner, and Partner Read roles, filter the returned opportunities by those owned by SSRs or Resellers.
required: false
schema:
type: string
enum:
- RESELLER
- SSR
- $ref: '#/components/parameters/OpportunityStatus'
- in: query
name: purchaseEffectiveDate
description: 'Opportunity purchase effective date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - ''greater than or equal to''; or lte([timestamp]) - ''less than or equal to'''
required: false
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: createdOn
description: 'Opportunity creation date filter, defined by upper or lower inclusive or exclusive limits, in Unix timestamp format. Acceptable values are: gte([timestamp]) - ''greater than or equal to''; or lte([timestamp]) - ''less than or equal to'''
required: false
style: form
explode: false
schema:
type: array
items:
type: string
- in: query
name: searchText
description: General text search filter used for any ID (opportunity, sales agent, sales agent company, customer, or customer company) and opportunity name
required: false
schema:
type: string
- in: query
name: number
description: Page number
required: false
schema:
type: integer
default: 1
- in: query
name: size
description: Number of results per page
required: false
schema:
type: integer
default: 10
- in: query
name: sort
description: Sort field and order. For ascending sort order, use the '+[FieldName]' format. For descending order, use the '-[FieldName]' format.
required: false
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityPage'
examples:
response:
value:
page:
number: 1
size: 10
totalElements: 2
totalPages: 1
content:
- id: ef6c414f-39da-401f-a4b8-81adc6190fda
name: Prospect N1
ownerUser:
id: d781ac09-b4fe-4d57-8ba2-4640fc5b7c49
email: john.doe@acme.com
firstName: John
lastName: Doe
company:
id: '1'
name: Acme Corp.
customerUser:
id: 498c62ea-ad14-48e6-96ce-5400c617444c
email: jane.smith@company.com
firstName: Jane
lastName: Smith
company:
id: '100'
name: Customer Company
createdOn: 1557861989000
purchaseEffectiveDate: 1577750400000
status: CLOSED
ownerType: PLATFORM_OWNER
createdByUser:
id: 8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4
email: peter.parker@marvel.com
firstName: Peter
lastName: Parker
company:
id: '99'
name: Marvel Corp.
- id: 70826bb4-bb6c-43b8-9c39-2c4e481a8b5e
name: null
ownerUser:
id: d11cf5ef-6270-492f-9d2c-07fa01eeb5c2
email: jane.smith@globex.com
firstName: Jane
lastName: Smith
company:
id: '2'
name: Globex Inc.
customerUser:
id: e0a6bec0-7e25-43a1-b601-6a8cec5a847f
email: gsymons@stark.com
firstName: Gary
lastName: Symons
company:
id: '100'
name: Customer Company
createdOn: 1557861989000
purchaseEffectiveDate: null
status: OPEN
ownerType: PLATFORM_OWNER
createdByUser:
id: 8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4
email: peter.parker@marvel.com
firstName: Peter
lastName: Parker
company:
id: '99'
name: Marvel Corp.
'403':
description: The user does not have permission to execute the action
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 403
code: FORBIDDEN
message: Forbidden
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities?ownerId=SOME_STRING_VALUE&ownerCompanyId=SOME_STRING_VALUE&customerId=SOME_STRING_VALUE&customerCompanyId=SOME_STRING_VALUE&context=SOME_STRING_VALUE&status=SOME_STRING_VALUE&purchaseEffectiveDate=SOME_ARRAY_VALUE&createdOn=SOME_ARRAY_VALUE&searchText=SOME_STRING_VALUE&number=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities',\n qs: {\n ownerId: 'SOME_STRING_VALUE',\n ownerCompanyId: 'SOME_STRING_VALUE',\n customerId: 'SOME_STRING_VALUE',\n customerCompanyId: 'SOME_STRING_VALUE',\n context: 'SOME_STRING_VALUE',\n status: 'SOME_STRING_VALUE',\n purchaseEffectiveDate: 'SOME_ARRAY_VALUE',\n createdOn: 'SOME_ARRAY_VALUE',\n searchText: 'SOME_STRING_VALUE',\n number: 'SOME_INTEGER_VALUE',\n size: 'SOME_INTEGER_VALUE',\n sort: 'SOME_STRING_VALUE'\n }\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/assistedSales/v1/opportunities?ownerId=SOME_STRING_VALUE&ownerCompanyId=SOME_STRING_VALUE&customerId=SOME_STRING_VALUE&customerCompanyId=SOME_STRING_VALUE&context=SOME_STRING_VALUE&status=SOME_STRING_VALUE&purchaseEffectiveDate=SOME_ARRAY_VALUE&createdOn=SOME_ARRAY_VALUE&searchText=SOME_STRING_VALUE&number=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
delete:
x-appdirect-api-stage: Early Access
summary: Remove opportunities
description: 'Removes a list of opportunities
Required: Accept-Language header with Locale format. For example: en-US'
tags:
- AppResellerOpportunities
operationId: deleteOpportunities
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller to the opportunity
ROLE_SALES_SUPPORT:
- Allows Sales Support Representative access to opportunity
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager to the opportunity
ROLE_PARTNER:
- Allows access as a Partner to the opportunity
parameters:
- in: query
name: opportunityId
description: This parameter is required. The parameter lists the opportunity IDs.
required: true
explode: true
schema:
type: array
items:
type: string
responses:
'204':
description: No Content
content:
application/json:
schema:
description: No Content
type: object
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 400
code: BAD_REQUEST
message: The list of opportunityIds cannot be null.
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 401
code: UNAUTHORIZED
message: HTTP 401 Unauthorized
x-codeSamples:
- lang: Shell + Curl
source: "curl --request DELETE \\\n --url 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities?opportunityId=SOME_ARRAY_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'DELETE',\n url: 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities',\n qs: {opportunityId: 'SOME_ARRAY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/assistedSales/v1/opportunities?opportunityId=SOME_ARRAY_VALUE\")\n .delete(null)\n .build();\n\nResponse response = client.newCall(request).execute();"
/assistedSales/v1/opportunities/{opportunityId}:
get:
x-appdirect-api-stage: Early Access
summary: Get opportunity details
description: 'Read an opportunity
Required: Accept-Language header with Locale format. For example: en-US'
tags:
- AppResellerOpportunities
operationId: readOpportunity
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller to the opportunity
ROLE_SALES_SUPPORT:
- Allows access as a Sales Support to the opportunity
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager to the opportunity
ROLE_PARTNER:
- Allows access as a Partner to the opportunity
ROLE_PARTNER_READ:
- Allows read access as a Partner to the opportunity
parameters:
- in: path
name: opportunityId
description: Opportunity ID
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Opportunity'
examples:
response:
value:
id: ef6c414f-39da-401f-a4b8-81adc6190fda
ownerUser:
id: d781ac09-b4fe-4d57-8ba2-4640fc5b7c49
email: john.doe@acme.com
firstName: John
lastName: Doe
company:
id: '1'
name: Acme Corp.
customerUser:
id: 498c62ea-ad14-48e6-96ce-5400c617444c
email: jane.smith@company.com
firstName: Jane
lastName: Smith
company:
id: '100'
name: Customer Company
createdOn: '1546300800000'
currency: USD
purchaseEffectiveDate: '1577750400000'
name: Prospect N1
status: OPEN
items:
- id: 4ccf689b-4339-4fc9-a8b3-b05c5a87c1be
pricingPlanId: 4bc864b5-f63f-4933-be19-3700aa9a8cc4
units:
- quantity: '20'
unit: USER
subscriptionCustomAttributes:
intended_os:
- other
- ios
- macos
sales_agent_id:
- R353113R
vendorRequiredFields:
name:
- John
lastname:
- Doe
email:
- john.doe@acme.com
- id: dece524d-0466-4185-b3bb-1f8a300c37cd
pricingPlanId: 80b85538-ffc1-4c4b-acb1-1bf87c8c2fc4
units: []
availableActions:
- ADD_PRODUCT
- EDIT
- FINALIZE
- SET_CUSTOM_PRICE
- SET_CUSTOM_CONTRACT
- SET_PROVISIONING_DATE
- SET_BILLING_DATE
- CHANGE_OPPORTUNITY_OWNER
actionRestrictions: {}
createdByUser:
id: 8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4
email: peter.parker@marvel.com
firstName: Peter
lastName: Parker
company:
id: '99'
name: Marvel Corp.
'206':
description: The creation of the opportunity is still in progress and a partial result is returned.
content:
application/json:
schema:
$ref: '#/components/schemas/Opportunity'
examples:
response:
value:
id: ef6c414f-39da-401f-a4b8-81adc6190fda
ownerUser:
id: d781ac09-b4fe-4d57-8ba2-4640fc5b7c49
email: john.doe@acme.com
firstName: John
lastName: Doe
company:
id: '1'
name: Acme Corp.
customerUser:
id: 498c62ea-ad14-48e6-96ce-5400c617444c
email: jane.smith@company.com
firstName: Jane
lastName: Smith
company:
id: '100'
name: Customer Company
createdOn: '1546300800000'
currency: USD
purchaseEffectiveDate: '1577750400000'
name: Prospect N1
status: OPEN
items: []
availableActions:
- ADD_PRODUCT
- EDIT
- CHANGE_OPPORTUNITY_OWNER
actionRestrictions: {}
createdByUser:
id: 8f6b3d29-4169-4fb0-91ff-bad9b7a3d0d4
email: peter.parker@marvel.com
firstName: Peter
lastName: Parker
company:
id: '99'
name: Marvel Corp.
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 401
code: UNAUTHORIZED
message: HTTP 401 Unauthorized
'403':
description: The user does not have access to the opportunity
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 403
code: FORBIDDEN
message: Forbidden
'404':
description: Invalid opportunity ID
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityError'
examples:
response:
value:
status: 404
code: NOT_FOUND
message: Invalid opportunity ID
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url https://marketplace.appdirect.com/api/assistedSales/v1/opportunities/%7BopportunityId%7D"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/assistedSales/v1/opportunities/%7BopportunityId%7D'\n};\n\nrequest(options, function (error, response, body) {\n if (error) throw new Error(error);\n\n console.log(body);\n});\n"
- lang: Java + Okhttp
source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/assistedSales/v1/opportunities/%7BopportunityId%7D\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
patch:
x-appdirect-api-stage: Early Access
summary: Update opportunity
description: 'Updates an existing opportunity: name, purchase effective date and purchase custom attributes
Required: Accept-Language header with Locale format. For example: en-US'
tags:
- AppResellerOpportunities
operationId: updateOpportunity
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller to the opportunity
ROLE_SALES_SUPPORT:
- Allows access as a Sales Support to the opportunity
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager to the opportunity
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager to the opportunity
ROLE_PARTNER:
- Allows access as a Partner to the opportunity
parameters:
- in: path
name: opportunityId
description: Opportunity ID
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OpportunityUpdateRequest'
description: Information about the opportunity being updated
required: true
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Opportunity'
examples:
response:
value:
id: ef6c414f-39da-401f-a4b8-81adc6190fda
ownerUser:
id: d781ac09-b4fe-4d57-8ba2-4640fc5b7c49
email: john.doe@acme.com
firstName: John
lastName: Doe
company:
id: '1'
name: Acme Corp.
customerUser:
id: 498c62ea-ad14-48e6-96ce-5400c617444c
email: jane.smith@company.com
firstName: Jane
lastName: Smith
company:
id: '100'
name: Customer Company
createdOn: '1546300800000'
currency: USD
purchaseEffectiveDate: '1577750400000'
name: Prospect N1
status: OPEN
items:
- id: 4ccf689b-4339-4fc9-a8b3-b05c5a87c1be
pricingPlanId: 4bc864
# --- truncated at 32 KB (228 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-appreselleropportunities-api-openapi.yml