AppDirect AppResellerLeads API
The AppResellerLeads API from AppDirect — 8 operation(s) for appresellerleads.
The AppResellerLeads API from AppDirect — 8 operation(s) for appresellerleads.
openapi: 3.0.0
info:
description: The Companies API allows developers to manage marketplace companies and their user memberships.
title: Companies AI Embed AppResellerLeads 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: AppResellerLeads
x-displayName: Leads v2
paths:
/lead/v2/leads:
get:
x-appdirect-api-stage: Early Access
description: Retrieves a list of all leads visible for a given context. You can filter the list using optional query parameters. Manual leads are visible to only those who created them. Company profile leads are visible to the Reseller that created the profile page as well as the Reseller Managers and Marketplace Managers. Product profile leads are visible to Marketplace Managers and Reseller Managers and can be configured so that the Developers who own the product profile can also see them.
tags:
- AppResellerLeads
summary: List leads
operationId: resource_AppResellerLeadsApi_getAll_GET
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller for the company
ROLE_REFERRAL:
- Allows access as a Referral for the company
ROLE_DEVELOPER:
- Allows access as a Developer for the company
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager for the marketplace
parameters:
- in: query
name: context
description: Supported contexts
required: true
schema:
type: string
enum:
- RESELLER
- REFERRAL
- DEVELOPER
- RESELLER_MANAGER
- PARTNER
- ANONYMOUS
- CHANNEL_ADMIN
- in: query
name: companyId
description: Company ID of the user who retrieved the list
required: true
schema:
type: string
- in: query
name: status
description: Lead status
required: false
schema:
type: string
enum:
- CONVERTED
- DISQUALIFIED
- DELETED
- PENDING_CONVERSION_APPROVAL
- CONVERSION_APPROVED
- PENDING_SUBMISSION
- SUBMITTED
- ASSIGNED
- LEGACY
- PENDING_FOR_MANAGERS
- ACCEPTED_FOR_MANAGERS
- in: query
name: searchText
description: Search text, which filters the list of leads
schema:
type: string
- in: query
name: fromDate
description: Date on which the lead was created (lower bound) in Unix timestamp format
required: false
schema:
type: number
- in: query
name: toDate
description: Date on which the lead was created (upper bound) in Unix timestamp format
required: false
schema:
type: number
- in: query
name: sortField
description: The field by which to order the results
required: false
schema:
type: string
enum:
- DATE
- COMPANY_NAME
default: DATE
- in: query
name: sortOrder
description: Type of ordering used (ascending or descending)
required: false
schema:
type: string
enum:
- ASC
- DESC
default: DESC
- in: query
name: page
description: Page number
required: false
schema:
type: integer
default: 0
- in: query
name: size
description: Number of results per page
required: false
schema:
type: integer
default: 50
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/LeadPagedReadResponse'
examples:
response:
value:
content:
- id: 29a1dc26-8088-475c-ba75-7b73915a0fab
partner: APPDIRECT
leadType: MANUAL
status: SUBMITTED
customer:
company:
name: Acme
street1: 1234 Main St
city: Beverly Hills
state: CA
zip: '90210'
country: US
contact:
firstName: John
lastName: Doe
email: john.doe@acme.com
phone: '+14455555555'
createdOn: 1534531428
lastModified: 1534531428
creator:
id: 833d4c99-1939-4366-a5ae-6fb7ae3ec1be
companyId: 6b4bd452-895d-4098-aa56-e6046b238e0f
companyName: AppDirect
role: CHANNEL_ADMIN
customAttributes: {}
referrer:
participantType: CHANNEL
partner: APPDIRECT
recipient:
participantType: CHANNEL
partner: APPDIRECT
- id: acfce97c-5428-4310-b841-3bf7cca4e047
partner: APPDIRECT
leadType: MANUAL
status: CONVERTED
customer:
company:
name: Globex
street1: 5678 Main Av
city: Beverly Hills
state: CA
zip: '90210'
country: US
companyExists: true
contact:
firstName: Jane
lastName: Doe
email: jane.doe@globex.com
phone: '+18008888080'
reseller:
id: 01d75b7c-ea78-4dc2-9e58-6ad217bddcbd
companyId: 386626c0-53e2-4515-8450-4a720bb5d029
createdOn: 1534531428
lastModified: 1534531428
creator:
id: 01d75b7c-ea78-4dc2-9e58-6ad217bddcbd
companyId: 386626c0-53e2-4515-8450-4a720bb5d029
companyName: Reseller Company
role: RESELLER
convertedCompany:
id: dba89c75-f10c-4314-8a98-0692d04594d3
name: Acme
convertedUser:
id: ad38f05b-7508-4c70-8ef8-c7929f35e414
companyId: dba89c75-f10c-4314-8a98-0692d04594d3
customAttributes: {}
result: WON
referrer:
participantType: CHANNEL
partner: APPDIRECT
recipient:
participantType: COMPANY
companyId: 386626c0-53e2-4515-8450-4a720bb5d029
companyName: Reseller Company
page:
size: 10
totalElements: 2
totalPages: 1
number: 0
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/lead/v2/leads?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&searchText=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&toDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/lead/v2/leads',\n qs: {\n context: 'SOME_STRING_VALUE',\n companyId: 'SOME_STRING_VALUE',\n status: 'SOME_STRING_VALUE',\n searchText: 'SOME_STRING_VALUE',\n fromDate: 'SOME_NUMBER_VALUE',\n toDate: 'SOME_NUMBER_VALUE',\n sortField: 'SOME_STRING_VALUE',\n sortOrder: 'SOME_STRING_VALUE',\n page: 'SOME_INTEGER_VALUE',\n size: 'SOME_INTEGER_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/lead/v2/leads?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE&status=SOME_STRING_VALUE&searchText=SOME_STRING_VALUE&fromDate=SOME_NUMBER_VALUE&toDate=SOME_NUMBER_VALUE&sortField=SOME_STRING_VALUE&sortOrder=SOME_STRING_VALUE&page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
post:
x-appdirect-api-stage: Early Access
description: Creates a manual, company profile or product profile lead. Manual leads are visible to only those who created them. Company profile leads are visible to the Reseller that created the profile page as well as the Reseller Managers and Marketplace Managers. Product profile leads are visible to Marketplace Managers and Reseller Managers and can be configured so that the Developers who own the product profile can also see them.<br/>Required parameters:<br/>Company name<br/>Contact email<br/>Lead type<br/>Partner<br/>If the lead type is PRODUCT, the product ID<br>If the lead type is COMPANY, the reseller company ID<br/>The required parameter correspond to the request payload in [LeadCreationRequest](#leadcreationrequest)
tags:
- AppResellerLeads
summary: Create lead
operationId: resource_AppResellerLeadsApi_create_POST
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller for the company
ROLE_REFERRAL:
- Allows access as a Referral for the company
ROLE_DEVELOPER:
- Allows access as a Developer for the company
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager for the marketplace
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace
ROLE_PARTNER:
- Allows access to read and write all Marketplace data. Non-interactive OAuth 1.0 credentials with read and write access are required to use this scope. The companyId, userId, and context parameters are also required.
parameters:
- in: query
name: context
description: The supported lead's API contexts. ANONYMOUS context can be used to create a PRODUCT or COMPANY lead without authentication.
required: true
schema:
type: string
enum:
- RESELLER
- REFERRAL
- DEVELOPER
- RESELLER_MANAGER
- PARTNER
- ANONYMOUS
- CHANNEL_ADMIN
- in: query
name: companyId
description: Company ID of the user who is creating the lead. Only required when creating a lead of type MANUAL.
required: true
schema:
type: string
- in: query
name: userId
description: 'User ID of the user who is creating the lead. Only required when using OAuth credentials with role PARTNER to create a lead of type MANUAL. In this case, the user ID must correspond to a marketplace user who has the Marketplace Manager role. The user must be a member of a company that has marketplace access. '
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LeadCreationRequest'
description: Information about the lead to create
required: true
responses:
'201':
description: Lead created
content:
application/json:
schema:
$ref: '#/components/schemas/LeadResponse'
examples:
response:
value:
id: cc146924-afe3-4f6f-b368-2279e1e2039e
partner: APPDIRECT
leadType: MANUAL
status: ASSIGNED
customer:
company:
name: Acme
street1: 1234 Main St
street2: 30th Floor, Apt B
city: Miami
state: FL
zip: '33033'
country: US
contact:
firstName: John
lastName: Doe
email: john.doe@companysrl.com
phone: '+13055555555'
createdOn: 1534875428054
lastModified: 1534875428054
creator:
id: e0f7521e-a297-4d02-942e-a8ee3216d5e5
companyId: fb2ea14d-2be2-4572-b607-2d70500c14f3
companyName: Referral Company
role: REFERRAL
referrer:
participantType: COMPANY
companyId: fb2ea14d-2be2-4572-b607-2d70500c14f3
companyName: Referral Company
recipient:
participantType: COMPANY
companyId: fb2ea14d-2be2-4572-b607-2d70500c14f3
companyName: Referral Company
'400':
description: Error attempting to create the lead (missing required data, for example)
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request POST \\\n --url 'https://marketplace.appdirect.com/api/lead/v2/leads?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE&userId=SOME_STRING_VALUE' \\\n --header 'content-type: application/json' \\\n --data '{\"customer\":{\"company\":{\"street1\":\"1234 Main St\",\"street2\":\"30th Floor, Apt B\",\"city\":\"Miami\",\"country\":\"US\",\"state\":\"FL\",\"zip\":\"33033\",\"name\":\"Acme\"},\"contact\":{\"firstName\":\"John\",\"lastName\":\"Doe\",\"phone\":\"+13055555555\",\"email\":\"john.doe@acme.com\"}},\"leadType\":\"MANUAL\",\"partner\":\"APPDIRECT\"}'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'POST',\n url: 'https://marketplace.appdirect.com/api/lead/v2/leads',\n qs: {\n context: 'SOME_STRING_VALUE',\n companyId: 'SOME_STRING_VALUE',\n userId: 'SOME_STRING_VALUE'\n },\n headers: {'content-type': 'application/json'},\n body: {\n customer: {\n company: {\n street1: '1234 Main St',\n street2: '30th Floor, Apt B',\n city: 'Miami',\n country: 'US',\n state: 'FL',\n zip: '33033',\n name: 'Acme'\n },\n contact: {\n firstName: 'John',\n lastName: 'Doe',\n phone: '+13055555555',\n email: 'john.doe@acme.com'\n }\n },\n leadType: 'MANUAL',\n partner: 'APPDIRECT'\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, \"{\\\"customer\\\":{\\\"company\\\":{\\\"street1\\\":\\\"1234 Main St\\\",\\\"street2\\\":\\\"30th Floor, Apt B\\\",\\\"city\\\":\\\"Miami\\\",\\\"country\\\":\\\"US\\\",\\\"state\\\":\\\"FL\\\",\\\"zip\\\":\\\"33033\\\",\\\"name\\\":\\\"Acme\\\"},\\\"contact\\\":{\\\"firstName\\\":\\\"John\\\",\\\"lastName\\\":\\\"Doe\\\",\\\"phone\\\":\\\"+13055555555\\\",\\\"email\\\":\\\"john.doe@acme.com\\\"}},\\\"leadType\\\":\\\"MANUAL\\\",\\\"partner\\\":\\\"APPDIRECT\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/lead/v2/leads?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE&userId=SOME_STRING_VALUE\")\n .post(body)\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"
/lead/v2/leads/{leadId}:
get:
x-appdirect-api-stage: Early Access
description: Retrieves a single lead and its details
tags:
- AppResellerLeads
summary: Get lead details
operationId: resource_AppResellerLeadsApi_get_GET
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller for the company
ROLE_REFERRAL:
- Allows access as a Referral for the company
ROLE_DEVELOPER:
- Allows access as a Developer for the company
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager for the marketplace
parameters:
- in: query
name: context
description: Supported contexts
required: true
schema:
type: string
enum:
- RESELLER
- REFERRAL
- DEVELOPER
- RESELLER_MANAGER
- PARTNER
- ANONYMOUS
- CHANNEL_ADMIN
- in: path
name: leadId
description: Lead ID
required: true
schema:
type: string
- in: query
name: companyId
description: Company ID of the user who is retrieving the lead
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/LeadResponse'
examples:
response:
value:
id: 29a1dc26-8088-475c-ba75-7b73915a0fab
partner: APPDIRECT
leadType: MANUAL
status: SUBMITTED
customer:
company:
name: Acme
street1: 1234 Main St
city: Beverly Hills
state: CA
zip: '90210'
country: US
contact:
firstName: John
lastName: Doe
email: john.doe@acme.com
phone: '+14455555555'
createdOn: 1534465177000
lastModified: 1534465179000
creator:
id: 833d4c99-1939-4366-a5ae-6fb7ae3ec1be
companyId: 6b4bd452-895d-4098-aa56-e6046b238e0f
companyName: AppDirect
role: CHANNEL_ADMIN
customAttributes: {}
referrer:
participantType: CHANNEL
partner: APPDIRECT
recipient:
participantType: CHANNEL
partner: APPDIRECT
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request GET \\\n --url 'https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'GET',\n url: 'https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D',\n qs: {context: 'SOME_STRING_VALUE', companyId: 'SOME_STRING_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/lead/v2/leads/%7BleadId%7D?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE\")\n .get()\n .build();\n\nResponse response = client.newCall(request).execute();"
delete:
x-appdirect-api-stage: Early Access
description: Deletes or disqualifies a lead (depending on type and assignment)
tags:
- AppResellerLeads
summary: Discard lead
operationId: resource_AppResellerLeadsApi_delete_DELETE
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller for the company
ROLE_REFERRAL:
- Allows access as a Referral for the company
ROLE_DEVELOPER:
- Allows access as a Developer for the company
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager for the marketplace
parameters:
- in: query
name: context
description: Supported contexts
required: true
schema:
type: string
enum:
- RESELLER
- REFERRAL
- DEVELOPER
- RESELLER_MANAGER
- PARTNER
- ANONYMOUS
- CHANNEL_ADMIN
- in: path
name: leadId
description: Lead ID
required: true
schema:
type: string
- in: query
name: companyId
description: Company ID of the user who is discarding the lead
required: true
schema:
type: string
responses:
'204':
description: Lead deleted or disqualified
'400':
description: Error attempting to discard a lead that cannot be deleted or disqualified
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request DELETE \\\n --url 'https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'DELETE',\n url: 'https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D',\n qs: {context: 'SOME_STRING_VALUE', companyId: 'SOME_STRING_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/lead/v2/leads/%7BleadId%7D?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE\")\n .delete(null)\n .build();\n\nResponse response = client.newCall(request).execute();"
patch:
x-appdirect-api-stage: Early Access
description: Updates the contact information or notes from a lead
tags:
- AppResellerLeads
summary: Update lead
operationId: resource_AppResellerLeadsApi_update_PATCH
x-appdirect-required-scopes:
ROLE_RESELLER:
- Allows access as a Reseller for the company
ROLE_REFERRAL:
- Allows access as a Referral for the company
ROLE_DEVELOPER:
- Allows access as a Developer for the company
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager for the marketplace
parameters:
- in: query
name: context
description: Supported contexts
required: true
schema:
type: string
enum:
- RESELLER
- REFERRAL
- DEVELOPER
- RESELLER_MANAGER
- PARTNER
- ANONYMOUS
- CHANNEL_ADMIN
- in: path
name: leadId
description: Lead ID
required: true
schema:
type: string
- in: query
name: companyId
description: Company ID of the user who is updating the lead
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LeadUpdateRequest'
description: Information about the lead to update
required: true
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/LeadResponse'
examples:
response:
value:
id: 29a1dc26-8088-475c-ba75-7b73915a0fab
partner: APPDIRECT
leadType: MANUAL
status: SUBMITTED
customer:
company:
name: Globex
street1: 1234 Main St
street2: 5th floor
city: Beverly Hills
state: CA
zip: '90210'
country: US
contact:
firstName: Jane
lastName: Jane
email: jane.doe@globex.com
phone: '+14455555555'
notes: Updated company name, added floor and changed person to be contacted
createdOn: 1534465177000
lastModified: 1534857159000
creator:
id: 833d4c99-1939-4366-a5ae-6fb7ae3ec1be
companyId: 6b4bd452-895d-4098-aa56-e6046b238e0f
companyName: Appdirect
role: CHANNEL_ADMIN
customAttributes: {}
referrer:
participantType: CHANNEL
partner: APPDIRECT
recipient:
participantType: CHANNEL
partner: APPDIRECT
'400':
description: Error attempting to update a lead (for example, it is not possible to modify the lead)
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --request PATCH \\\n --url 'https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE' \\\n --header 'content-type: application/json' \\\n --data '{\"customer\":{\"company\":{\"name\":\"Globex\",\"street2\":\"5th floor\"},\"contact\":{\"firstName\":\"Jane\",\"lastName\":\"Doe\",\"email\":\"jane.doe@globex.com\"}},\"notes\":\"Updated company name, added floor and changed person to be contacted\"}'"
- lang: Node + Request
source: "const request = require('request');\n\nconst options = {\n method: 'PATCH',\n url: 'https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D',\n qs: {context: 'SOME_STRING_VALUE', companyId: 'SOME_STRING_VALUE'},\n headers: {'content-type': 'application/json'},\n body: {\n customer: {\n company: {name: 'Globex', street2: '5th floor'},\n contact: {firstName: 'Jane', lastName: 'Doe', email: 'jane.doe@globex.com'}\n },\n notes: 'Updated company name, added floor and changed person to be contacted'\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, \"{\\\"customer\\\":{\\\"company\\\":{\\\"name\\\":\\\"Globex\\\",\\\"street2\\\":\\\"5th floor\\\"},\\\"contact\\\":{\\\"firstName\\\":\\\"Jane\\\",\\\"lastName\\\":\\\"Doe\\\",\\\"email\\\":\\\"jane.doe@globex.com\\\"}},\\\"notes\\\":\\\"Updated company name, added floor and changed person to be contacted\\\"}\");\nRequest request = new Request.Builder()\n .url(\"https://marketplace.appdirect.com/api/lead/v2/leads/%7BleadId%7D?context=SOME_STRING_VALUE&companyId=SOME_STRING_VALUE\")\n .patch(body)\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();"
/lead/v2/assignment:
post:
x-appdirect-api-stage: Early Access
description: Assigns a lead to a Reseller company. The assignee will be able to see that lead as long as is not assigned to another company. The owner of the lead retains visibility even if it is assigned to another company.
tags:
- AppResellerLeads
summary: Assign lead
operationId: resource_AppResellerLeadsApi_assign_POST
x-appdirect-required-scopes:
ROLE_RESELLER_MANAGER:
- Allows access as a Reseller Manager for the marketplace
ROLE_CHANNEL_ADMIN:
- Allows access as a Marketplace Manager for the marketplace
parameters:
- in: query
name: context
description: Supported contexts
required: true
schema:
type: string
enum:
- RESELLER
- REFERRAL
- DEVELOPER
- RESELLER_MANAGER
- PARTNER
- ANONYMOUS
- CHANNEL_ADMIN
- in: query
name: companyId
description: Company ID of the user who is assigning the lead
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LeadAssignmentRequest'
description: Information about the person to whom the lead is being assigned
required: true
responses:
'201':
description: Lead assigned
content:
application/json:
schema:
$ref: '#/components/schemas/LeadAssignmentResponse'
examples:
response:
value:
lead:
id: 29a1dc26-8088-475c-ba75-7b73915a0fab
partner: APPDIRECT
leadType: MANUAL
status: ASSIGNED
customer:
company:
name: Acme
street1: 1234 Main St
street2: 1st floor
city: Beverly Hills
state: CA
zip: '90210'
country: US
contact:
firstName: John
lastName: Doe
email: john.doe@acme.com
phone: '+14455555555'
notes: Some notes
createdOn: 1534465177000
lastModified: 1534857159000
creator:
id: 833d4c99-1939-4366-a5ae-6fb7ae3ec1be
companyId: 6b4bd452-895d-4098-aa56-e6046b238e0f
companyName: Appdirect
role: RESELLER_MANAGER
customAttributes: {}
referrer:
participantType: CHANNEL
partner: APPDIRECT
recipient:
participantType: COMPANY
companyId: 386626c0-53e2-4515-8450-4a720bb5d029
companyName: Reseller Company
'400':
description: Error attempting to assign the lead (missing required data, for example)
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- lang: Shell + Curl
source: "curl --re
# --- truncated at 32 KB (74 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/appdirect/refs/heads/main/openapi/appdirect-appresellerleads-api-openapi.yml