Batch Create Co-Sell Referrals
POST https://api.suger.cloud/org/{orgId}/cosell/referral/batchCreate
Create multiple co-sell referrals in one call. Supports AWS / AZURE / GCP (CRM-driven bulk share) and SUGER (PRM bulk deal-registration upload). Each item in the batch is an `CosellReferral` value following the same partner-specific nested required-field rules as CreateCosellReferral — see that operation's description for the exact `info.aceOpportunityV2` / `info.microsoftReferralSet` / `info.gcpOpportunityV2` / `info.sugerOpportunity` paths. IMPORTANT: keep batch size small (at most 20). Larger batches risk hitting partner API rate limits (AWS ACE in particular). For very large imports, split into multiple calls. Use this when: user wants to share a small set of opportunities with a partner at once. For one-off creates, use CreateCosellReferral.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | yes | Organization ID |
Request Body
Required. Content-Type: application/json · Schema: BatchCreateCosellReferralsRequest
BatchCreateCosellReferralsRequest fields:
| Field | Type | Required | Description |
|---|---|---|---|
cosellReferrals | object | yes | |
crmPartner | Partner | yes | |
partner | Partner | yes |
Responses
200 — OK
Content-Type: application/json · Schema: OperationExecutionDetails
OperationExecutionDetails fields:
| Field | Type | Required | Description |
|---|---|---|---|
newWorkflowStarted | boolean | no | |
referralId | string | no | ReferralID is the created referral's id, set by the SUGER co-sell create so the caller can chain follow-up calls (e.g. InviteCosellPartners) onto the new engagement without re-querying. Empty elsewhere. |
runID | string | no | |
slackMirrorWarning | string | no | SlackMirrorWarning is a non-blocking advisory set when a SUGER co-sell console message was saved but could not be mirrored to the partner's Slack channel (no workspace connected, no channel mapped, bot not in the channel, or a transient post failure). Empty when the message mirrored or Slack is not involved. The console surfaces it as a warning toast; the message is always persisted regardless (best-effort mirror). |
status | string | no | |
workflowID | string | no |
400 — Bad request error
Content-Type: application/json · Schema: ErrorResponse
ErrorResponse fields:
| Field | Type | Required | Description |
|---|---|---|---|
code | ErrorCode | no | |
info | object | no | |
message | string | no |
500 — Internal server error
Content-Type: application/json · Schema: ErrorResponse
ErrorResponse fields:
| Field | Type | Required | Description |
|---|---|---|---|
code | ErrorCode | no | |
info | object | no | |
message | string | no |
Example
The request bodies are this operation's documented examples; the
response and error bodies are generated from its schema. Substitute your
own ids, and set SUGER_TOKEN to a bearer token from the
OAuth client-credentials exchange.
Request
`cosellReferrals` is keyed by the CRM record id each referral comes from (here Salesforce Opportunity ids); each value is the same body CreateCosellReferral takes. A record that already has a referral being created for the same partner is skipped. Keep a batch to at most 20 referrals.
curl -X POST 'https://api.suger.cloud/org/{orgId}/cosell/referral/batchCreate' \
-H "Authorization: Bearer $SUGER_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"partner": "AWS",
"crmPartner": "SALESFORCE",
"cosellReferrals": {
"006Oy00000AbCdEIAZ": {
"id": "3f0c6a52-6a0e-4f7c-9d0a-6c1f2b7e9a11",
"partner": "AWS",
"info": {
"aceOpportunityV2": {
"Customer": {
"Account": {
"CompanyName": "Contoso Analytics",
"Industry": "Software and Internet",
"WebsiteUrl": "https://contoso-analytics.example.com",
"Address": {
"CountryCode": "US",
"PostalCode": "94105",
"StateOrRegion": "California",
"City": "San Francisco"
}
},
"Contacts": [
{
"Email": "jamie.lee@contoso-analytics.example.com",
"FirstName": "Jamie",
"LastName": "Lee",
"BusinessTitle": "VP Engineering"
}
]
},
"PrimaryNeedsFromAws": [
"Co-Sell - Technical Consultation"
],
"OpportunityType": "Net New Business",
"Project": {
"Title": "Contoso Analytics - data platform migration",
"CustomerBusinessProblem": "Contoso runs its analytics stack in a colocation data center that is reaching end of life and wants to move it to AWS before renewal.",
"CustomerUseCase": "Migration / Database Migration",
"DeliveryModels": [
"SaaS or PaaS"
],
"ExpectedCustomerSpend": [
{
"Amount": "15000",
"CurrencyCode": "USD",
"Frequency": "Monthly",
"TargetCompany": "AWS"
}
],
"SalesActivities": [
"Initialized discussions with customer"
]
},
"RelatedEntityIdentifiers": {
"Solutions": [
"S-0060105"
]
},
"LifeCycle": {
"TargetCloseDate": "2027-06-30"
}
}
}
},
"006Oy00000FgHiJIAZ": {
"id": "5b7e2d90-1f4c-4a8b-8e36-9c0d4f2a7b58",
"partner": "AWS",
"info": {
"aceOpportunityV2": {
"Customer": {
"Account": {
"CompanyName": "Northwind Health",
"Industry": "Healthcare",
"WebsiteUrl": "https://northwind-health.example.com",
"Address": {
"CountryCode": "US",
"PostalCode": "94105",
"StateOrRegion": "California",
"City": "San Francisco"
}
},
"Contacts": [
{
"Email": "sam.ortiz@northwind-health.example.com",
"FirstName": "Sam",
"LastName": "Ortiz",
"BusinessTitle": "CTO"
}
]
},
"PrimaryNeedsFromAws": [
"Co-Sell - Technical Consultation"
],
"OpportunityType": "Net New Business",
"Project": {
"Title": "Northwind Health - patient analytics on AWS",
"CustomerBusinessProblem": "Northwind needs a HIPAA-eligible analytics platform to replace spreadsheets used for patient outcome reporting.",
"CustomerUseCase": "Healthcare and Life Sciences",
"DeliveryModels": [
"SaaS or PaaS"
],
"ExpectedCustomerSpend": [
{
"Amount": "15000",
"CurrencyCode": "USD",
"Frequency": "Monthly",
"TargetCompany": "AWS"
}
],
"SalesActivities": [
"Initialized discussions with customer"
]
},
"RelatedEntityIdentifiers": {
"Solutions": [
"S-0060105"
]
},
"LifeCycle": {
"TargetCloseDate": "2027-06-30"
}
}
}
}
}
}' Response — 200
{
"newWorkflowStarted": true,
"referralId": "01H0000000000000000000",
"runID": "01H0000000000000000000",
"slackMirrorWarning": "string",
"status": "string",
"workflowID": "01H0000000000000000000"
} Error — 400
{
"code": "InternalServerError",
"message": "string"
} View as Markdown · API reference overview
Spotted something wrong or out of date on this page? Tell us and we'll correct it.