Opportunities
Operations related to opportunities
Returns a list of opportunities with pagination support.
Page number to retrieve.
Number of items per page.
Opportunity name to filter opportunities by (partial match).
Contact ID to filter opportunities by contact relationship.
Unauthorized - missing or invalid API key
GET /api/v1/opportunities HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": [
{
"id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
]
}Creates a new opportunity.
Name of the opportunity
Enterprise Software LicenseOpportunity amount
50000Final opportunity amount
45000Opportunity risk level
LowValores posibles: Opportunity priority level
HighValores posibles: Opportunity description
Enterprise software license for 500 usersFeatured notes for the opportunity
Key decision maker is the CTONext step for the opportunity
FollowUpActual close date
2024-03-10T00:00:00.000ZClose probability (0-100)
75Opportunity status
openValores posibles: Unauthorized - missing or invalid API key
POST /api/v1/opportunities HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 309
{
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open"
}{
"statusCode": 200,
"count": 1,
"error": "text",
"data": {
"id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}Get an opportunity by ID.
Opportunity ID to retrieve.
Unauthorized - missing or invalid API key
GET /api/v1/opportunities/{id} HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": {
"id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}Updates an existing opportunity.
Opportunity ID to update.
Name of the opportunity
Enterprise Software LicenseOpportunity amount
50000Final opportunity amount
45000Opportunity risk level
LowValores posibles: Opportunity priority level
HighValores posibles: Opportunity description
Enterprise software license for 500 usersFeatured notes for the opportunity
Key decision maker is the CTONext step for the opportunity
FollowUpActual close date
2024-03-10T00:00:00.000ZClose probability (0-100)
75Opportunity status
openValores posibles: Unauthorized - missing or invalid API key
PUT /api/v1/opportunities/{id} HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 309
{
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open"
}{
"statusCode": 200,
"count": 1,
"error": "text",
"data": {
"id": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"name": "Enterprise Software License",
"amount": 50000,
"finalAmount": 45000,
"risk": "Low",
"priority": "High",
"description": "Enterprise software license for 500 users",
"featuredNotes": "Key decision maker is the CTO",
"nextStep": "FollowUp",
"closeDate": "2024-03-10T00:00:00.000Z",
"closeProbability": 75,
"status": "open",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}Deletes an opportunity by ID.
Opportunity ID to delete.
Unauthorized - missing or invalid API key
DELETE /api/v1/opportunities/{id} HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": true
}Returns a list of integrations for a given opportunity ID.
Opportunity ID to get integrations from.
Unauthorized - missing or invalid API key
GET /api/v1/opportunities/{id}/integrations HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": {
"opportunityId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"integrations": [
{
"integrationType": "crm",
"integrationName": "HubSpot",
"integrationId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d"
}
]
}
}Returns a list of contacts associated with an opportunity.
Opportunity ID to get contacts from.
Page number to retrieve.
Number of items per page.
Unauthorized - missing or invalid API key
GET /api/v1/opportunities/{id}/contacts HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": [
{
"contactId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"contactFirstName": "John",
"contactLastName": "Doe",
"contactEmail": "[email protected]",
"contactTitlePosition": "Software Engineer"
}
]
}Creates a relationship between an opportunity and a contact.
Opportunity ID.
Contact ID
5516cd47-2bd0-4f4f-adc2-22524e54ba4dUnauthorized - missing or invalid API key
POST /api/v1/opportunities/{id}/contacts HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"contactId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d"
}{
"statusCode": 200,
"count": 1,
"error": "text",
"data": true
}Returns a list of companies associated with an opportunity.
Opportunity ID to get companies from.
Page number to retrieve.
Number of items per page.
Unauthorized - missing or invalid API key
GET /api/v1/opportunities/{id}/companies HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": [
{
"companyId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d",
"companyName": "Acme Corp",
"companyDomain": "acme.com",
"isPrimary": true
}
]
}Creates a relationship between an opportunity and a company.
Company ID
5516cd47-2bd0-4f4f-adc2-22524e54ba4dUnauthorized - missing or invalid API key
POST /api/v1/opportunities/{id}/companies HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"companyId": "5516cd47-2bd0-4f4f-adc2-22524e54ba4d"
}{
"statusCode": 200,
"count": 1,
"error": "text",
"data": true
}Deletes a relationship between an opportunity and a contact.
Opportunity ID.
Contact ID.
Unauthorized - missing or invalid API key
DELETE /api/v1/opportunities/{id}/contacts/{contactId} HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": true
}Deletes a relationship between an opportunity and a company.
Company ID.
Unauthorized - missing or invalid API key
DELETE /api/v1/opportunities/{id}/companies/{companyId} HTTP/1.1
Host: api.salescaling.com
x-api-key: YOUR_API_KEY
Accept: */*
{
"statusCode": 200,
"count": 1,
"error": "text",
"data": true
}Última actualización
