Opportunities

Operations related to opportunities

Get all Opportunities

get

Returns a list of opportunities with pagination support.

Autorizaciones
Parámetros de consulta
pagenumberOpcional

Page number to retrieve.

limitnumberOpcional

Number of items per page.

namestringOpcional

Opportunity name to filter opportunities by (partial match).

contactIdstringOpcional

Contact ID to filter opportunities by contact relationship.

Respuestas
200Éxito
application/json
get
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"
    }
  ]
}

Create Opportunity

post

Creates a new opportunity.

Autorizaciones
Cuerpo
namestringRequerido

Name of the opportunity

Example: Enterprise Software License
amountnumberOpcional

Opportunity amount

Example: 50000
finalAmountnumberOpcional

Final opportunity amount

Example: 45000
riskstring · enumOpcional

Opportunity risk level

Example: LowValores posibles:
prioritystring · enumOpcional

Opportunity priority level

Example: HighValores posibles:
descriptionstringOpcional

Opportunity description

Example: Enterprise software license for 500 users
featuredNotesstringOpcional

Featured notes for the opportunity

Example: Key decision maker is the CTO
nextStepstringOpcional

Next step for the opportunity

Example: FollowUp
closeDatestring · date-timeOpcional

Actual close date

Example: 2024-03-10T00:00:00.000Z
closeProbabilitynumberOpcional

Close probability (0-100)

Example: 75
statusstring · enumOpcional

Opportunity status

Example: openValores posibles:
Respuestas
201Éxito
application/json
post
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 Opportunity by ID

get

Get an opportunity by ID.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID to retrieve.

Respuestas
200Éxito
application/json
get
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"
  }
}

Update Opportunity

put

Updates an existing opportunity.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID to update.

Cuerpo
namestringOpcional

Name of the opportunity

Example: Enterprise Software License
amountnumberOpcional

Opportunity amount

Example: 50000
finalAmountnumberOpcional

Final opportunity amount

Example: 45000
riskstring · enumOpcional

Opportunity risk level

Example: LowValores posibles:
prioritystring · enumOpcional

Opportunity priority level

Example: HighValores posibles:
descriptionstringOpcional

Opportunity description

Example: Enterprise software license for 500 users
featuredNotesstringOpcional

Featured notes for the opportunity

Example: Key decision maker is the CTO
nextStepstringOpcional

Next step for the opportunity

Example: FollowUp
closeDatestring · date-timeOpcional

Actual close date

Example: 2024-03-10T00:00:00.000Z
closeProbabilitynumberOpcional

Close probability (0-100)

Example: 75
statusstring · enumOpcional

Opportunity status

Example: openValores posibles:
Respuestas
200Éxito
application/json
put
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"
  }
}

Delete Opportunity

delete

Deletes an opportunity by ID.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID to delete.

Respuestas
200Éxito
application/json
delete
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
}

Get Opportunity Integrations

get

Returns a list of integrations for a given opportunity ID.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID to get integrations from.

Respuestas
200Éxito
application/json
get
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"
      }
    ]
  }
}

Get Opportunity Contacts

get

Returns a list of contacts associated with an opportunity.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID to get contacts from.

Parámetros de consulta
pagenumberOpcional

Page number to retrieve.

limitnumberOpcional

Number of items per page.

Respuestas
200Éxito
application/json
get
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"
    }
  ]
}

Create Opportunity Contact Relationship

post

Creates a relationship between an opportunity and a contact.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID.

Cuerpo
contactIdstringRequerido

Contact ID

Example: 5516cd47-2bd0-4f4f-adc2-22524e54ba4d
Respuestas
201Éxito
application/json
post
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
}

Get Opportunity Companies

get

Returns a list of companies associated with an opportunity.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID to get companies from.

Parámetros de consulta
pagenumberOpcional

Page number to retrieve.

limitnumberOpcional

Number of items per page.

Respuestas
200Éxito
application/json
get
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
    }
  ]
}

Create Opportunity Company Relationship

post

Creates a relationship between an opportunity and a company.

Autorizaciones
Parámetros de ruta
idstringRequerido
Cuerpo
companyIdstringRequerido

Company ID

Example: 5516cd47-2bd0-4f4f-adc2-22524e54ba4d
Respuestas
201Éxito
application/json
post
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
}

Delete Opportunity Contact Relationship

delete

Deletes a relationship between an opportunity and a contact.

Autorizaciones
Parámetros de ruta
idstringRequerido

Opportunity ID.

contactIdstringRequerido

Contact ID.

Respuestas
200Éxito
application/json
delete
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
}

Delete Opportunity Company Relationship

delete

Deletes a relationship between an opportunity and a company.

Autorizaciones
Parámetros de ruta
idstringRequerido
companyIdstringRequerido

Company ID.

Respuestas
200Éxito
application/json
delete
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
}