Get a lead or opportunity by ID
This article explains how to get a lead or co-sell opportunity by ID.
Note
Leads received from the Microsoft commercial marketplace (Azure Marketplace and AppSource) aren't supported.
Prerequisites
- Credentials as described in Partner API authentication. This scenario supports authentication with App+User credentials.
- This API currently supports only user access where partners must be in one of the following roles: Global Admin, Referral Admin or Referral User.
REST request
Request syntax
Method | Request URI |
---|---|
GET | https://api.partner.microsoft.com/v1.0/engagements/referrals/{ID} |
URI parameter
Name | Type | Required | Description |
---|---|---|---|
Id | string | Yes | The unique identifier for a lead or co-sell opportunity |
Request headers
See Partner REST headers for more information.
Request body
None.
Request example
GET https://api.partner.microsoft.com/v1.0/engagements/referrals/{ID} HTTP/1.1
Authorization: Bearer <token>
Content-Type: application/json
REST response
If successful, the response body contains the lead or opportunity matching the ID.
Response success and error codes
Each response comes with an HTTP status code that indicates success or failure and debugging information. Use a network trace tool to read this code, the error type, and any parameters.
Response example
HTTP/1.1 200 OK
Content-Type: application/json
Request-ID: 9f8bed52-e4df-4d0c-9ca6-929a187b0731
{
"@odata.context": "https://api.partner.microsoft.com/v1.0/engagments/referrals/$metadata#Referrals/$entity",
"id": "c5fbb3b6-be74-4795-9fb5-4324c73fed37",
"engagementId": "65edc0b5-3485-41b7-a17e-dfa9ef4706e2",
"organizationId": "7d23e5ca-19dc-4eaa-aac8-5e6b559f0d1d",
"organizationName": "Contoso Company",
"createdDateTime": "2020-10-30T21:03:00.0000000Z",
"updatedDateTime": "2020-10-30T21:03:00.0000000Z",
"status": "New",
"substatus": "Pending",
"qualification": "Direct",
"type": "Independent",
"direction": "Incoming",
"customerProfile": {
"name": "Fabrikam Customer Inc",
"address": {
"addressLine1": "One Microsoft Way",
"addressLine2": "",
"city": "Redmond",
"state": "WA",
"postalCode": "98052",
"country": "US"
}
},
"details": {
"notes": "We are interested in deploying Microsoft 365 and are looking for support in training our employees. Can you help?",
"dealValue": 10000,
"currency": "USD",
"closingDateTime": "2020-12-01T00:00:00Z",
"requirements": {
"industries": [ { "id": "Education" } ],
"products": [ { "id": "Microsoft365" } ],
"services": [ { "id": "LearningAndCertification" } ],
"solutions": [ { "id": "SOL-Microsoft365", "name": "Microsoft365" }
]
}
},
"links": {
"relatedReferrals": {
"uri": "https://api.partner.microsoft.com/v1.0/engagements/referrals$filter=engagementId eq '65edc0b5-3485-41b7-a17e-dfa9ef4706e2'",
"method": "GET"
},
"self": {
"uri": "https://api.partner.microsoft.com/v1.0/engagements/referralsc5fbb3b6-be74-4795-9fb5-4324c73fed37",
"method": "GET"
}
},
"eTag": "\"2500ec5a-0000-0000-0000-5bf4967d0000\""
}
Note
The fields in the example above aren't exhaustive. The actual API response contains more fields like the customer and partner teams. For the full list of supported fields, see referral resources.
Next steps
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for