POST v1/opportunities

Creates a new opportunity.

Request Information

URI Parameters

None.

Body Parameters

Opportunity
NameDescriptionTypeAdditional information
Id

Set Id to 0 to create a new Opportunity.

integer

None.

Title

string

Required

Max length: 500

Type

IdNamePair

Required

Stage

The Stage passed must belong to the Opportunity Type. If no Stage is passed, the default Stage for the Type will be used.

IdNamePair

None.

Priority

The Priority passed must be set up for the Tenant. If not passed, the default Priority for the Tenant will be used

IdNamePair

None.

Customer

IdNamePair

Required

CustomerContact

Contact must be from Account Contacts for Customer.

IdNamePair

None.

Assignments

List of Assignments by Object/Key ID - For Employee: ObjectID = 4, For Pool: ObjectID = 30

Collection of Assignment

None.

Description

string

None.

Categories

List of Categories that apply to the Opportunity.

Collection of IdNamePair

None.

EstimatedValue

decimal number

None.

ProbabilityPercentage

decimal number

None.

FollowupDate

date

None.

ExpectedCloseDate

date

None.

Location

Location must be from Account Locations for Customer.

IdNamePair

None.

VisibleToContacts

boolean

None.

ExcludeFromMultiTouchEmails

Flag that indicates if opportunity should be excluded from workflows

boolean

None.

SendNotification

If set to True, will create a notification for Assigned users that the Opportunity has been created.

boolean

None.

CustomFields

Collection of CustomField

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "title": "sample string 2",
  "type": {
    "id": 1,
    "name": "sample string 2"
  },
  "stage": {
    "id": 1,
    "name": "sample string 2"
  },
  "priority": {
    "id": 1,
    "name": "sample string 2"
  },
  "customer": {
    "id": 1,
    "name": "sample string 2"
  },
  "customerContact": {
    "id": 1,
    "name": "sample string 2"
  },
  "assignments": [
    {
      "objectID": 1,
      "keyID": 2,
      "assignedToName": "sample string 3"
    },
    {
      "objectID": 1,
      "keyID": 2,
      "assignedToName": "sample string 3"
    }
  ],
  "description": "sample string 3",
  "categories": [
    {
      "id": 1,
      "name": "sample string 2"
    },
    {
      "id": 1,
      "name": "sample string 2"
    }
  ],
  "estimatedValue": 1.0,
  "probabilityPercentage": 1.0,
  "followupDate": "2024-04-18T23:14:15.6258661-04:00",
  "expectedCloseDate": "2024-04-18T23:14:15.6258661-04:00",
  "location": {
    "id": 1,
    "name": "sample string 2"
  },
  "visibleToContacts": true,
  "excludeFromMultiTouchEmails": true,
  "sendNotification": true,
  "customFields": [
    {
      "id": 1,
      "name": "sample string 2",
      "fieldType": {
        "id": 1,
        "name": "sample string 2"
      },
      "sourceId": 3,
      "value": "sample string 4",
      "valueText": "sample string 5",
      "isRequired": true
    },
    {
      "id": 1,
      "name": "sample string 2",
      "fieldType": {
        "id": 1,
        "name": "sample string 2"
      },
      "sourceId": 3,
      "value": "sample string 4",
      "valueText": "sample string 5",
      "isRequired": true
    }
  ]
}

application/xml, text/xml

Sample:
<Opportunity xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.CRM">
  <Assignments>
    <Assignment>
      <AssignedToName>sample string 3</AssignedToName>
      <KeyID>2</KeyID>
      <ObjectID>1</ObjectID>
    </Assignment>
    <Assignment>
      <AssignedToName>sample string 3</AssignedToName>
      <KeyID>2</KeyID>
      <ObjectID>1</ObjectID>
    </Assignment>
  </Assignments>
  <Categories xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:IdNamePair>
      <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
      <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
    </d2p1:IdNamePair>
    <d2p1:IdNamePair>
      <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
      <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
    </d2p1:IdNamePair>
  </Categories>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.Core">
    <d2p1:CustomField>
      <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:FieldType>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:IsRequired>true</d2p1:IsRequired>
      <d2p1:Name>sample string 2</d2p1:Name>
      <d2p1:SourceId>3</d2p1:SourceId>
      <d2p1:Value>sample string 4</d2p1:Value>
      <d2p1:ValueText>sample string 5</d2p1:ValueText>
    </d2p1:CustomField>
    <d2p1:CustomField>
      <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:FieldType>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:IsRequired>true</d2p1:IsRequired>
      <d2p1:Name>sample string 2</d2p1:Name>
      <d2p1:SourceId>3</d2p1:SourceId>
      <d2p1:Value>sample string 4</d2p1:Value>
      <d2p1:ValueText>sample string 5</d2p1:ValueText>
    </d2p1:CustomField>
  </CustomFields>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Customer>
  <CustomerContact xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </CustomerContact>
  <Description>sample string 3</Description>
  <EstimatedValue>1</EstimatedValue>
  <ExcludeFromMultiTouchEmails>true</ExcludeFromMultiTouchEmails>
  <ExpectedCloseDate>2024-04-18T23:14:15.6258661-04:00</ExpectedCloseDate>
  <FollowupDate>2024-04-18T23:14:15.6258661-04:00</FollowupDate>
  <Id>1</Id>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Location>
  <Priority xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Priority>
  <ProbabilityPercentage>1</ProbabilityPercentage>
  <SendNotification>true</SendNotification>
  <Stage xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Stage>
  <Title>sample string 2</Title>
  <Type xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Type>
  <VisibleToContacts>true</VisibleToContacts>
</Opportunity>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Opportunity
NameDescriptionTypeAdditional information
Id

Set Id to 0 to create a new Opportunity.

integer

None.

Title

string

Required

Max length: 500

Type

IdNamePair

Required

Stage

The Stage passed must belong to the Opportunity Type. If no Stage is passed, the default Stage for the Type will be used.

IdNamePair

None.

Priority

The Priority passed must be set up for the Tenant. If not passed, the default Priority for the Tenant will be used

IdNamePair

None.

Customer

IdNamePair

Required

CustomerContact

Contact must be from Account Contacts for Customer.

IdNamePair

None.

Assignments

List of Assignments by Object/Key ID - For Employee: ObjectID = 4, For Pool: ObjectID = 30

Collection of Assignment

None.

Description

string

None.

Categories

List of Categories that apply to the Opportunity.

Collection of IdNamePair

None.

EstimatedValue

decimal number

None.

ProbabilityPercentage

decimal number

None.

FollowupDate

date

None.

ExpectedCloseDate

date

None.

Location

Location must be from Account Locations for Customer.

IdNamePair

None.

VisibleToContacts

boolean

None.

ExcludeFromMultiTouchEmails

Flag that indicates if opportunity should be excluded from workflows

boolean

None.

SendNotification

If set to True, will create a notification for Assigned users that the Opportunity has been created.

boolean

None.

CustomFields

Collection of CustomField

None.

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "title": "sample string 2",
  "type": {
    "id": 1,
    "name": "sample string 2"
  },
  "stage": {
    "id": 1,
    "name": "sample string 2"
  },
  "priority": {
    "id": 1,
    "name": "sample string 2"
  },
  "customer": {
    "id": 1,
    "name": "sample string 2"
  },
  "customerContact": {
    "id": 1,
    "name": "sample string 2"
  },
  "assignments": [
    {
      "objectID": 1,
      "keyID": 2,
      "assignedToName": "sample string 3"
    },
    {
      "objectID": 1,
      "keyID": 2,
      "assignedToName": "sample string 3"
    }
  ],
  "description": "sample string 3",
  "categories": [
    {
      "id": 1,
      "name": "sample string 2"
    },
    {
      "id": 1,
      "name": "sample string 2"
    }
  ],
  "estimatedValue": 1.0,
  "probabilityPercentage": 1.0,
  "followupDate": "2024-04-18T23:14:15.6258661-04:00",
  "expectedCloseDate": "2024-04-18T23:14:15.6258661-04:00",
  "location": {
    "id": 1,
    "name": "sample string 2"
  },
  "visibleToContacts": true,
  "excludeFromMultiTouchEmails": true,
  "sendNotification": true,
  "customFields": [
    {
      "id": 1,
      "name": "sample string 2",
      "fieldType": {
        "id": 1,
        "name": "sample string 2"
      },
      "sourceId": 3,
      "value": "sample string 4",
      "valueText": "sample string 5",
      "isRequired": true
    },
    {
      "id": 1,
      "name": "sample string 2",
      "fieldType": {
        "id": 1,
        "name": "sample string 2"
      },
      "sourceId": 3,
      "value": "sample string 4",
      "valueText": "sample string 5",
      "isRequired": true
    }
  ]
}

application/xml, text/xml

Sample:
<Opportunity xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAPI.Models.CRM">
  <Assignments>
    <Assignment>
      <AssignedToName>sample string 3</AssignedToName>
      <KeyID>2</KeyID>
      <ObjectID>1</ObjectID>
    </Assignment>
    <Assignment>
      <AssignedToName>sample string 3</AssignedToName>
      <KeyID>2</KeyID>
      <ObjectID>1</ObjectID>
    </Assignment>
  </Assignments>
  <Categories xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:IdNamePair>
      <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
      <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
    </d2p1:IdNamePair>
    <d2p1:IdNamePair>
      <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
      <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
    </d2p1:IdNamePair>
  </Categories>
  <CustomFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/BAPI.Models.Core">
    <d2p1:CustomField>
      <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:FieldType>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:IsRequired>true</d2p1:IsRequired>
      <d2p1:Name>sample string 2</d2p1:Name>
      <d2p1:SourceId>3</d2p1:SourceId>
      <d2p1:Value>sample string 4</d2p1:Value>
      <d2p1:ValueText>sample string 5</d2p1:ValueText>
    </d2p1:CustomField>
    <d2p1:CustomField>
      <d2p1:FieldType xmlns:d4p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
        <d4p1:_x003C_Id_x003E_k__BackingField>1</d4p1:_x003C_Id_x003E_k__BackingField>
        <d4p1:_x003C_Name_x003E_k__BackingField>sample string 2</d4p1:_x003C_Name_x003E_k__BackingField>
      </d2p1:FieldType>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:IsRequired>true</d2p1:IsRequired>
      <d2p1:Name>sample string 2</d2p1:Name>
      <d2p1:SourceId>3</d2p1:SourceId>
      <d2p1:Value>sample string 4</d2p1:Value>
      <d2p1:ValueText>sample string 5</d2p1:ValueText>
    </d2p1:CustomField>
  </CustomFields>
  <Customer xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Customer>
  <CustomerContact xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </CustomerContact>
  <Description>sample string 3</Description>
  <EstimatedValue>1</EstimatedValue>
  <ExcludeFromMultiTouchEmails>true</ExcludeFromMultiTouchEmails>
  <ExpectedCloseDate>2024-04-18T23:14:15.6258661-04:00</ExpectedCloseDate>
  <FollowupDate>2024-04-18T23:14:15.6258661-04:00</FollowupDate>
  <Id>1</Id>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Location>
  <Priority xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Priority>
  <ProbabilityPercentage>1</ProbabilityPercentage>
  <SendNotification>true</SendNotification>
  <Stage xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Stage>
  <Title>sample string 2</Title>
  <Type xmlns:d2p1="http://schemas.datacontract.org/2004/07/Striven.Common.Models">
    <d2p1:_x003C_Id_x003E_k__BackingField>1</d2p1:_x003C_Id_x003E_k__BackingField>
    <d2p1:_x003C_Name_x003E_k__BackingField>sample string 2</d2p1:_x003C_Name_x003E_k__BackingField>
  </Type>
  <VisibleToContacts>true</VisibleToContacts>
</Opportunity>