v1

latestOpenAPI 3.0.3Apache 2.02026-07-1352108391.8 KB
Opportunities

Update opportunity

Update opportunity

patch/crm/opportunities/{id}

Path parameters

idstring required

ID of the record you are acting upon.

Query parameters

rawboolean

Include raw response. Mostly used for debugging purposes

Headers

x-apideck-consumer-idstring required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

Request body

idstring

A unique identifier for the opportunity.

titlestring required

The title or name of the opportunity.

primary_contact_idstring nullable

The unique identifier of the primary contact associated with the opportunity.

descriptionstring nullable

A description of the opportunity.

typestring nullable

The type of the opportunity

monetary_amountnumber nullable

The monetary value associated with the opportunity

currency'UNKNOWN_CURRENCY' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRC' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XTS' | 'XXX' | 'YER' | 'ZAR' | 'ZMK' | 'ZMW' | 'BTC' | 'ETH' nullable

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

win_probabilitynumber nullable

The probability of winning the opportunity, expressed as a percentage.

expected_revenuenumber nullable

The expected revenue from the opportunity

close_datestring date nullable

The actual closing date for the opportunity. If close_date is null, the opportunity is not closed yet.

loss_reason_idstring nullable

The unique identifier of the reason why the opportunity was lost.

loss_reasonstring nullable

The reason why the opportunity was lost.

won_reason_idstring nullable

The unique identifier of the reason why the opportunity was won.

won_reasonstring nullable

The reason why the opportunity was won.

pipeline_idstring nullable

The unique identifier of the pipeline associated with the opportunity

pipeline_stage_idstring nullable

The unique identifier of the stage in the pipeline associated with the opportunity.

source_idstring nullable

The unique identifier of the source of the opportunity.

lead_idstring nullable

The unique identifier of the lead associated with the opportunity.

lead_sourcestring nullable

The source of the lead associated with the opportunity.

contact_idstring nullable

The unique identifier of the contact associated with the opportunity.

contact_idsstring[]

An array of unique identifiers of all contacts associated with the opportunity.

company_idstring nullable

The unique identifier of the company associated with the opportunity.

company_namestring nullable

The name of the company associated with the opportunity.

owner_idstring nullable

The unique identifier of the user who owns the opportunity.

prioritystring nullable

The priority level of the opportunity.

statusstring nullable

The current status of the opportunity.

status_idstring nullable

The unique identifier of the current status of the opportunity.

tagsstring[] nullable
interaction_countnumber nullable

The number of interactions with the opportunity.

stage_last_changed_atstring date-time nullable

The date and time when the stage of the opportunity was last changed.

last_activity_atstring nullable

The date and time of the last activity associated with the opportunity.

deletedboolean

Indicates whether the opportunity has been deleted.

date_stage_changedstring date-time nullable

The date and time when the stage of the opportunity was last changed.

date_last_contactedstring date-time nullable

The date and time when the opportunity was last contacted.

date_lead_createdstring date-time nullable

The date and time when the lead associated with the opportunity was created.

custom_mappingsCustomMappings nullable

When custom mappings are configured on the resource, the result is included here.

updated_bystring nullable

The unique identifier of the user who last updated the opportunity.

created_bystring nullable

The unique identifier of the user who created the opportunity.

updated_atstring date-time nullable

The date and time when the opportunity was last updated.

created_atstring date-time nullable

The date and time when the opportunity was created.

Example request

{
  "id": "12345",
  "title": "New Rocket",
  "primary_contact_id": "12345",
  "description": "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.",
  "type": "Existing Customer - Upgrade",
  "monetary_amount": 75000,
  "currency": "USD",
  "win_probability": 40,
  "expected_revenue": 75000,
  "close_date": "2020-10-30",
  "loss_reason_id": "12345",
  "loss_reason": "No budget",
  "won_reason_id": "12345",
  "won_reason": "Best pitch",
  "pipeline_id": "12345",
  "pipeline_stage_id": "12345",
  "source_id": "12345",
  "lead_id": "12345",
  "lead_source": "Website",
  "contact_id": "12345",
  "contact_ids": [
    "12345"
  ],
  "company_id": "12345",
  "company_name": "Copper",
  "owner_id": "12345",
  "priority": "None",
  "status": "Open",
  "status_id": "12345",
  "tags": [
    "New"
  ],
  "custom_fields": [
    {
      "id": "2389328923893298",
      "name": "employee_level",
      "description": "Employee Level",
      "value": "Uses Salesforce and Marketo"
    }
  ],
  "stage_last_changed_at": "2020-09-30T07:43:32.000Z",
  "last_activity_at": "2020-09-30T07:43:32.000Z",
  "date_stage_changed": "2020-09-30T00:00:00.000Z",
  "date_last_contacted": "2020-09-30T00:00:00.000Z",
  "date_lead_created": "2020-09-30T00:00:00.000Z",
  "updated_by": "12345",
  "created_by": "12345",
  "updated_at": "2020-09-30T07:43:32.000Z",
  "created_at": "2020-09-30T07:43:32.000Z",
  "pass_through": [
    {
      "extend_paths": [
        {
          "path": "$.nested.property",
          "value": {
            "TaxClassificationRef": {
              "value": "EUC-99990201-V1-00020000"
            }
          }
        }
      ]
    }
  ]
}

Response

Opportunity updated

status_codeinteger required

HTTP Response Status Code

statusstring required

HTTP Response Status

servicestring required

Apideck ID of service provider

resourcestring required

Unified API resource name

operationstring required

Operation performed

_rawRaw nullable

Raw response from the integration when raw=true query param is provided

Example response

{
  "status_code": 200,
  "status": "OK",
  "service": "zoho-crm",
  "resource": "companies",
  "operation": "update",
  "data": {
    "id": "12345"
  }
}