Apideck · Schema

Opportunity

IntegrationsUnified API

Properties

Name Type Description
id string A unique identifier for the opportunity.
title string The title or name of the opportunity.
primary_contact_id string The unique identifier of the primary contact associated with the opportunity.
description string A description of the opportunity.
type string The type of the opportunity
monetary_amount number The monetary value associated with the opportunity
currency object
win_probability number The probability of winning the opportunity, expressed as a percentage.
expected_revenue number The expected revenue from the opportunity
close_date string The actual closing date for the opportunity. If close_date is null, the opportunity is not closed yet.
loss_reason_id string The unique identifier of the reason why the opportunity was lost.
loss_reason string The reason why the opportunity was lost.
won_reason_id string The unique identifier of the reason why the opportunity was won.
won_reason string The reason why the opportunity was won.
pipeline_id string The unique identifier of the pipeline associated with the opportunity
pipeline_stage_id string The unique identifier of the stage in the pipeline associated with the opportunity.
source_id string The unique identifier of the source of the opportunity.
lead_id string The unique identifier of the lead associated with the opportunity.
lead_source string The source of the lead associated with the opportunity.
contact_id string The unique identifier of the contact associated with the opportunity.
contact_ids array An array of unique identifiers of all contacts associated with the opportunity.
company_id string The unique identifier of the company associated with the opportunity.
company_name string The name of the company associated with the opportunity.
owner_id string The unique identifier of the user who owns the opportunity.
priority string The priority level of the opportunity.
status string The current status of the opportunity.
status_id string The unique identifier of the current status of the opportunity.
tags object
interaction_count number The number of interactions with the opportunity.
custom_fields array
stage_last_changed_at string The date and time when the stage of the opportunity was last changed.
last_activity_at string The date and time of the last activity associated with the opportunity.
deleted boolean Indicates whether the opportunity has been deleted.
date_stage_changed string The date and time when the stage of the opportunity was last changed.
date_last_contacted string The date and time when the opportunity was last contacted.
date_lead_created string The date and time when the lead associated with the opportunity was created.
custom_mappings object
updated_by string The unique identifier of the user who last updated the opportunity.
created_by string The unique identifier of the user who created the opportunity.
updated_at string The date and time when the opportunity was last updated.
created_at string The date and time when the opportunity was created.
pass_through object
View JSON Schema on GitHub

JSON Schema

apideck-opportunity-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Opportunity",
  "title": "Opportunity",
  "type": "object",
  "x-apideck-schema-id": "Opportunity",
  "x-apideck-weights": {
    "id": "critical",
    "title": "critical",
    "primary_contact_id": "critical",
    "description": "medium",
    "type": "high",
    "monetary_amount": "high",
    "currency": "high",
    "win_probability": "high",
    "expected_revenue": "medium",
    "close_date": "medium",
    "loss_reason_id": "edge-case",
    "loss_reason": "edge-case",
    "won_reason_id": "edge-case",
    "won_reason": "edge-case",
    "pipeline_id": "edge-case",
    "pipeline_stage_id": "edge-case",
    "source_id": "medium",
    "lead_id": "medium",
    "lead_source": "edge-case",
    "contact_id": "medium",
    "company_id": "high",
    "company_name": "medium",
    "owner_id": "high",
    "priority": "medium",
    "status": "high",
    "status_id": "edge-case",
    "tags": "low",
    "interaction_count": "low",
    "custom_fields": "medium",
    "stage_last_changed_at": "edge-case",
    "last_activity_at": "medium",
    "deleted": "low",
    "date_stage_changed": "edge-case",
    "date_last_contacted": "medium",
    "date_lead_created": "edge-case",
    "updated_by": "edge-case",
    "created_by": "edge-case",
    "updated_at": "medium",
    "created_at": "medium"
  },
  "required": [
    "title"
  ],
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "example": "12345",
      "description": "A unique identifier for the opportunity.",
      "readOnly": true
    },
    "title": {
      "type": "string",
      "description": "The title or name of the opportunity.",
      "example": "New Rocket",
      "minLength": 1
    },
    "primary_contact_id": {
      "type": "string",
      "example": "12345",
      "description": "The unique identifier of the primary contact associated with the opportunity.",
      "nullable": true
    },
    "description": {
      "type": "string",
      "description": "A description of the opportunity.",
      "example": "Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.",
      "nullable": true
    },
    "type": {
      "type": "string",
      "description": "The type of the opportunity",
      "example": "Existing Customer - Upgrade",
      "nullable": true
    },
    "monetary_amount": {
      "type": "number",
      "description": "The monetary value associated with the opportunity",
      "example": 75000,
      "nullable": true
    },
    "currency": {
      "$ref": "#/components/schemas/Currency"
    },
    "win_probability": {
      "type": "number",
      "description": "The probability of winning the opportunity, expressed as a percentage.",
      "example": 40,
      "nullable": true
    },
    "expected_revenue": {
      "description": "The expected revenue from the opportunity",
      "type": "number",
      "example": 75000,
      "nullable": true,
      "readOnly": true
    },
    "close_date": {
      "type": "string",
      "description": "The actual closing date for the opportunity. If close_date is null, the opportunity is not closed yet.",
      "example": "2020-10-30",
      "format": "date",
      "nullable": true
    },
    "loss_reason_id": {
      "type": "string",
      "description": "The unique identifier of the reason why the opportunity was lost.",
      "example": "12345",
      "nullable": true
    },
    "loss_reason": {
      "type": "string",
      "description": "The reason why the opportunity was lost.",
      "example": "No budget",
      "nullable": true
    },
    "won_reason_id": {
      "type": "string",
      "description": "The unique identifier of the reason why the opportunity was won.",
      "example": "12345",
      "nullable": true
    },
    "won_reason": {
      "type": "string",
      "description": "The reason why the opportunity was won.",
      "example": "Best pitch",
      "nullable": true
    },
    "pipeline_id": {
      "type": "string",
      "description": "The unique identifier of the pipeline associated with the opportunity",
      "example": "12345",
      "nullable": true
    },
    "pipeline_stage_id": {
      "type": "string",
      "description": "The unique identifier of the stage in the pipeline associated with the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "source_id": {
      "type": "string",
      "description": "The unique identifier of the source of the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "lead_id": {
      "type": "string",
      "description": "The unique identifier of the lead associated with the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "lead_source": {
      "description": "The source of the lead associated with the opportunity.",
      "type": "string",
      "example": "Website",
      "nullable": true
    },
    "contact_id": {
      "type": "string",
      "description": "The unique identifier of the contact associated with the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "contact_ids": {
      "type": "array",
      "description": "An array of unique identifiers of all contacts associated with the opportunity.",
      "items": {
        "type": "string",
        "example": "12345"
      }
    },
    "company_id": {
      "type": "string",
      "description": "The unique identifier of the company associated with the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "company_name": {
      "type": "string",
      "description": "The name of the company associated with the opportunity.",
      "example": "Copper",
      "nullable": true
    },
    "owner_id": {
      "type": "string",
      "description": "The unique identifier of the user who owns the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "priority": {
      "type": "string",
      "description": "The priority level of the opportunity.",
      "example": "None",
      "nullable": true
    },
    "status": {
      "type": "string",
      "description": "The current status of the opportunity.",
      "example": "Open",
      "nullable": true
    },
    "status_id": {
      "type": "string",
      "description": "The unique identifier of the current status of the opportunity.",
      "example": "12345",
      "nullable": true
    },
    "tags": {
      "$ref": "#/components/schemas/Tags"
    },
    "interaction_count": {
      "type": "number",
      "example": 0,
      "description": "The number of interactions with the opportunity.",
      "readOnly": true,
      "nullable": true
    },
    "custom_fields": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CustomField"
      }
    },
    "stage_last_changed_at": {
      "type": "string",
      "example": "2020-09-30T07:43:32.000Z",
      "description": "The date and time when the stage of the opportunity was last changed.",
      "format": "date-time",
      "nullable": true
    },
    "last_activity_at": {
      "type": "string",
      "example": "2020-09-30T07:43:32.000Z",
      "description": "The date and time of the last activity associated with the opportunity.",
      "readOnly": true,
      "nullable": true
    },
    "deleted": {
      "type": "boolean",
      "description": "Indicates whether the opportunity has been deleted.",
      "example": false,
      "readOnly": true
    },
    "date_stage_changed": {
      "type": "string",
      "description": "The date and time when the stage of the opportunity was last changed.",
      "example": "2020-09-30T00:00:00.000Z",
      "format": "date-time",
      "nullable": true,
      "readOnly": true
    },
    "date_last_contacted": {
      "type": "string",
      "description": "The date and time when the opportunity was last contacted.",
      "example": "2020-09-30T00:00:00.000Z",
      "format": "date-time",
      "nullable": true,
      "readOnly": true
    },
    "date_lead_created": {
      "type": "string",
      "example": "2020-09-30T00:00:00.000Z",
      "description": "The date and time when the lead associated with the opportunity was created.",
      "format": "date-time",
      "nullable": true,
      "readOnly": true
    },
    "custom_mappings": {
      "$ref": "#/components/schemas/CustomMappings"
    },
    "updated_by": {
      "type": "string",
      "example": "12345",
      "description": "The unique identifier of the user who last updated the opportunity.",
      "nullable": true,
      "readOnly": true
    },
    "created_by": {
      "type": "string",
      "example": "12345",
      "description": "The unique identifier of the user who created the opportunity.",
      "nullable": true,
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "example": "2020-09-30T07:43:32.000Z",
      "format": "date-time",
      "description": "The date and time when the opportunity was last updated.",
      "readOnly": true,
      "nullable": true
    },
    "created_at": {
      "type": "string",
      "example": "2020-09-30T07:43:32.000Z",
      "format": "date-time",
      "description": "The date and time when the opportunity was created.",
      "readOnly": true,
      "nullable": true
    },
    "pass_through": {
      "$ref": "#/components/schemas/PassThroughBody"
    }
  }
}