Opportunities

The Opportunity object is used to represent an opportunity in the remote system.

The Opportunity object

Properties


idString
Required

remote_idString
Optional
The third-party API ID of the matching object.

nameString
Optional
The opportunity's name.

descriptionString
Optional
The opportunity's description.

amountInteger
Optional
The opportunity's amount.

ownerString
Optional

accountString
Optional

stageString
Optional

statusEnum
Optional
The opportunity's status. Possible values include: OPEN, WON, LOST, or - in cases where there is no clear mapping - the original value passed through.

last_activity_atString
Optional
When the opportunity's last activity occurred.

close_dateString
Optional
When the opportunity was closed.

remote_created_atString
Optional
When the third party's opportunity was created.

remote_was_deletedBoolean
Required

The Opportunity object
JSON
{
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"name": "Needs Integrations",
"description": "Needs a Unified API for Integrations!",
"amount": 100000,
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"account": "0958cbc6-6040-430a-848e-aafacbadf4ae",
"stage": "1968cbc6-6040-430a-848e-aafacbadf4ad",
"status": "WON",
"last_activity_at": "2022-02-10T00:00:00Z",
"close_date": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"remote_was_deleted": true
}

GET

/opportunities

Returns a list of Opportunity objects.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


account_idString
Optional
If provided, will only return opportunities with this account.

created_afterString
Optional
If provided, will only return objects created after this datetime.

created_beforeString
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

include_deleted_dataBoolean
Optional
Whether to include data that was marked as deleted by third party webhooks.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

modified_afterString
Optional
If provided, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

owner_idString
Optional
If provided, will only return opportunities with this owner.

page_sizeInteger
Optional
Number of results to return per page.

remote_fieldsString
Optional
Which fields should be returned in non-normalized form.

remote_idString
Optional
The API provider's ID for the given object.

stage_idString
Optional
If provided, will only return opportunities with this stage.

statusString
Optional
If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST')

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"name": "Needs Integrations",
"description": "Needs a Unified API for Integrations!",
"amount": 100000,
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"account": "0958cbc6-6040-430a-848e-aafacbadf4ae",
"stage": "1968cbc6-6040-430a-848e-aafacbadf4ad",
"status": "WON",
"last_activity_at": "2022-02-10T00:00:00Z",
"close_date": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"remote_was_deleted": true
}
]
}
Field support by platform

Capsule

Capsule

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Close

Close

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

ownerString

remote_created_atString

remote_idString

stageString

Copper

Copper

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Hubspot

Hubspot

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Pipedrive

Pipedrive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

last_activity_atString

nameString

ownerString

remote_idString

stageString

Salesflare

Salesflare

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

statusEnum

Salesforce

Salesforce

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString
Hint: Use the /linked-accounts endpoint to pull platform support information.
POST

/opportunities

Creates an Opportunity object with the given values.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.

Body Parameters


modelObject
Required
Find available fields below under “Model Parameters”.

Model Parameters


remote_idString
Optional
The third-party API ID of the matching object.

nameString
Optional
The opportunity's name.

descriptionString
Optional
The opportunity's description.

amountInteger
Optional
The opportunity's amount.

ownerString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Owner table.

accountString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Account table.

stageString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Stage table.

statusEnum
Optional
The opportunity's status. Must pass in one of the following choices: OPEN, WON, LOST.

last_activity_atString
Optional
When the opportunity's last activity occurred.

close_dateString
Optional
When the opportunity was closed.

remote_created_atString
Optional
When the third party's opportunity was created.

integration_paramsObject
Optional

linked_account_paramsObject
Optional

Response
JSON
{
"model": {
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"name": "Needs Integrations",
"description": "Needs a Unified API for Integrations!",
"amount": 100000,
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"account": "0958cbc6-6040-430a-848e-aafacbadf4ae",
"stage": "1968cbc6-6040-430a-848e-aafacbadf4ad",
"status": "WON",
"last_activity_at": "2022-02-10T00:00:00Z",
"close_date": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"remote_was_deleted": true
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"problem_type": "MISSING_REQUIRED_FIELD"
}
],
"logs": [
{
"log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
"dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
"log_summary": {
"url": "https://harvest.greenhouse.io/v1/candidates/",
"method": "POST",
"status_code": 200
}
}
]
}
GET

/opportunities/{id}

Returns an Opportunity object with the given id.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

idString
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

remote_fieldsString
Optional
Which fields should be returned in non-normalized form.

Response
JSON
{
"id": "03455bc6-6040-430a-848e-aafacbfdf4fg",
"remote_id": "19202938",
"name": "Needs Integrations",
"description": "Needs a Unified API for Integrations!",
"amount": 100000,
"owner": "0358cbc6-2040-430a-848e-aafacbadf3aa",
"account": "0958cbc6-6040-430a-848e-aafacbadf4ae",
"stage": "1968cbc6-6040-430a-848e-aafacbadf4ad",
"status": "WON",
"last_activity_at": "2022-02-10T00:00:00Z",
"close_date": "2022-02-10T00:00:00Z",
"remote_created_at": "2021-11-10T00:00:00Z",
"remote_was_deleted": true
}
Field support by platform

Capsule

Capsule

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Close

Close

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

ownerString

remote_created_atString

remote_idString

stageString

Copper

Copper

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Hubspot

Hubspot

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Pipedrive

Pipedrive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

last_activity_atString

nameString

ownerString

remote_idString

stageString

Salesflare

Salesflare

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

statusEnum

Salesforce

Salesforce

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET

/opportunities/meta/post

Returns metadata for Opportunity POSTs.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Response
JSON
{
"request_schema": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
Field support by platform

Capsule

Capsule

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Close

Close

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

ownerString

remote_created_atString

remote_idString

stageString

Copper

Copper

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Hubspot

Hubspot

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

Pipedrive

Pipedrive

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

last_activity_atString

nameString

ownerString

remote_idString

stageString

Salesflare

Salesflare

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString

statusEnum

Salesforce

Salesforce

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


accountString

amountInteger

close_dateString

descriptionString

last_activity_atString

nameString

ownerString

remote_created_atString

remote_idString

stageString
Hint: Use the /linked-accounts endpoint to pull platform support information.