Skip to main content
PUT
/
v1
/
integrations
/
sync
/
opportunities
Sync an opportunity
curl --request PUT \
  --url https://functions.siro.ai/api-externalApi/v1/integrations/sync/opportunities \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "externalId": "<string>",
  "name": "<string>",
  "amount": 123,
  "closedAt": "<string>",
  "remoteCreatedAt": "<string>",
  "lastActivityAt": "<string>",
  "deletedAt": "2023-11-07T05:31:56Z",
  "disposition": "OPEN",
  "accountId": "<string>",
  "account": {
    "externalId": "<string>",
    "name": "<string>",
    "latitude": 123,
    "longitude": 123,
    "addresses": [
      {
        "country": "<string>",
        "street": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zip": "<string>"
      }
    ],
    "phoneNumbers": [
      "<string>"
    ],
    "emailAddresses": [
      "<string>"
    ],
    "lastActivityAt": "<string>",
    "deletedAt": "2023-11-07T05:31:56Z",
    "owner": {
      "externalId": "<string>"
    },
    "mergedToExternalId": "<string>",
    "mergedFromExternalIds": [
      "<string>"
    ]
  },
  "contact": {
    "externalId": "<string>",
    "name": "<string>",
    "latitude": 123,
    "longitude": 123,
    "account": {
      "externalId": "<string>",
      "name": "<string>",
      "latitude": 123,
      "longitude": 123,
      "addresses": [
        {
          "country": "<string>",
          "street": "<string>",
          "city": "<string>",
          "state": "<string>",
          "zip": "<string>"
        }
      ],
      "phoneNumbers": [
        "<string>"
      ],
      "emailAddresses": [
        "<string>"
      ],
      "lastActivityAt": "<string>",
      "deletedAt": "2023-11-07T05:31:56Z",
      "owner": {
        "externalId": "<string>"
      },
      "mergedToExternalId": "<string>",
      "mergedFromExternalIds": [
        "<string>"
      ]
    },
    "addresses": [
      {
        "country": "<string>",
        "street": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zip": "<string>"
      }
    ],
    "phoneNumbers": [
      "<string>"
    ],
    "emailAddresses": [
      "<string>"
    ],
    "lastActivityAt": "<string>",
    "deletedAt": "2023-11-07T05:31:56Z",
    "owner": {
      "externalId": "<string>"
    },
    "mergedToExternalId": "<string>",
    "mergedFromExternalIds": [
      "<string>"
    ]
  },
  "opportunityContacts": [
    {
      "externalId": "<string>",
      "name": "<string>",
      "latitude": 123,
      "longitude": 123,
      "account": {
        "externalId": "<string>",
        "name": "<string>",
        "latitude": 123,
        "longitude": 123,
        "addresses": [
          {
            "country": "<string>",
            "street": "<string>",
            "city": "<string>",
            "state": "<string>",
            "zip": "<string>"
          }
        ],
        "phoneNumbers": [
          "<string>"
        ],
        "emailAddresses": [
          "<string>"
        ],
        "lastActivityAt": "<string>",
        "deletedAt": "2023-11-07T05:31:56Z",
        "owner": {
          "externalId": "<string>"
        },
        "mergedToExternalId": "<string>",
        "mergedFromExternalIds": [
          "<string>"
        ]
      },
      "addresses": [
        {
          "country": "<string>",
          "street": "<string>",
          "city": "<string>",
          "state": "<string>",
          "zip": "<string>"
        }
      ],
      "phoneNumbers": [
        "<string>"
      ],
      "emailAddresses": [
        "<string>"
      ],
      "lastActivityAt": "<string>",
      "deletedAt": "2023-11-07T05:31:56Z",
      "owner": {
        "externalId": "<string>"
      },
      "mergedToExternalId": "<string>",
      "mergedFromExternalIds": [
        "<string>"
      ],
      "isPrimary": true
    }
  ],
  "opportunityUsers": [
    {
      "externalId": "<string>",
      "email": "<string>",
      "shareOfSale": 123,
      "name": "<string>",
      "deletedAt": "2023-11-07T05:31:56Z"
    }
  ]
}
'
{
  "data": {
    "id": "<string>",
    "externalId": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "organizationId": "<string>",
    "name": "<string>",
    "amount": 123,
    "closedAt": "<string>",
    "disposition": "<string>",
    "recordingId": "<string>",
    "accountId": "<string>",
    "account": null,
    "opportunityUsers": [
      null
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
externalId
string
required

The ID of the opportunity in the external system

name
string

The name of the opportunity

amount
number

The dollar amount of the opportunity

closedAt
string

The closure date of the opportunity in string format e.g. 2024-02-28 20:09:58.692

remoteCreatedAt
string

date the opportunity was created

lastActivityAt
string

date of last external update

deletedAt
string<date-time> | null

The datetime when this record was deleted in the external system

disposition
enum<string>

"WON" | "LOST" | "OPEN"

Available options:
OPEN,
LOST,
WON
accountId
string | null

Internal SIRO accountId override for this opportunity. OPTIONAL -- only use if you know the internal value of the Account as it will override the account object args.

account
object

The associated account for this opportunity. Note: supplying just an externalId will resolve to an already-synced account

contact
object

(DEPRECATED IN FAVOR OF CONTACTS ARRAY) The associated contact for this opportunity. Note: supplying just an externalId will resolve to an already-synced contact

opportunityContacts
object[]

The associated contacts for this opportunity. Note: supplying just an externalId will resolve to an already-synced contact

opportunityUsers
object[]

The users associated with this opportunity

Response

200 - application/json

Sync an opportunity

data
object
required