POST api/Opportunity

Inserts or updates the opportunity data based on the provided request data.

Request Information

URI Parameters

None.

Body Parameters

The request data.

OpportunityInsertUpdateRequestModel
NameDescriptionTypeAdditional information
ApiToken

string

None.

OpportunityID

integer

None.

OpportunityCode

string

None.

OpportunityName

string

None.

ClosingDate

date

None.

OpportunityNextStep

string

None.

OpportunityAmount

decimal number

None.

OpportunityProbability

decimal number

None.

OpportunityExpectedRevenue

decimal number

None.

OpportunityContactCustomerID

integer

None.

OpportunityContactCustomerName

string

None.

OpportunityContactCustomerEmail

string

None.

OpportunityContactCustomerPhoneCode

string

None.

OpportunityContactCustomerPhoneNo

string

None.

OpportunitySourceID

integer

None.

OpportunityStageID

integer

None.

Description

string

None.

Notes

string

None.

OpportunityOwnerID

integer

None.

CurrencyID

integer

None.

IsActive

integer

None.

UserID

integer

None.

MinRevenue

decimal number

None.

MaxRevenue

decimal number

None.

ProjectID

integer

None.

OpportunityTagIDs

string

None.

FaultCode

string

None.

StageComment

string

None.

LLID

integer

None.

CustomerCompanyName

string

None.

ContactPersonID

integer

None.

CustomerAddressType

integer

None.

MarketID

integer

None.

SubMarketID

integer

None.

AwardedDate

date

None.

Request Formats

application/json, text/json, text/plain, text/html

Sample:
{
  "apiToken": "sample string 1",
  "opportunityID": 2,
  "opportunityCode": "sample string 3",
  "opportunityName": "sample string 4",
  "closingDate": "2025-07-17T05:23:35.2070581+00:00",
  "opportunityNextStep": "sample string 5",
  "opportunityAmount": 6.0,
  "opportunityProbability": 7.0,
  "opportunityExpectedRevenue": 8.0,
  "opportunityContactCustomerID": 9,
  "opportunityContactCustomerName": "sample string 10",
  "opportunityContactCustomerEmail": "sample string 11",
  "opportunityContactCustomerPhoneCode": "sample string 12",
  "opportunityContactCustomerPhoneNo": "sample string 13",
  "opportunitySourceID": 14,
  "opportunityStageID": 15,
  "description": "sample string 16",
  "notes": "sample string 17",
  "opportunityOwnerID": 18,
  "currencyID": 1,
  "isActive": 19,
  "userID": 1,
  "minRevenue": 1.0,
  "maxRevenue": 1.0,
  "projectID": 1,
  "opportunityTagIDs": "sample string 20",
  "faultCode": "sample string 21",
  "stageComment": "sample string 22",
  "llid": 1,
  "customerCompanyName": "sample string 23",
  "contactPersonID": 1,
  "customerAddressType": 1,
  "marketID": 1,
  "subMarketID": 1,
  "awardedDate": "2025-07-17T05:23:35.2070581+00:00"
}

application/xml, text/xml

Sample:
<OpportunityInsertUpdateRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CMMS_V2.Core.RequestModel">
  <ApiToken>sample string 1</ApiToken>
  <AwardedDate>2025-07-17T05:23:35.2070581+00:00</AwardedDate>
  <ClosingDate>2025-07-17T05:23:35.2070581+00:00</ClosingDate>
  <ContactPersonID>1</ContactPersonID>
  <CurrencyID>1</CurrencyID>
  <CustomerAddressType>1</CustomerAddressType>
  <CustomerCompanyName>sample string 23</CustomerCompanyName>
  <Description>sample string 16</Description>
  <FaultCode>sample string 21</FaultCode>
  <IsActive>19</IsActive>
  <LLID>1</LLID>
  <MarketID>1</MarketID>
  <MaxRevenue>1</MaxRevenue>
  <MinRevenue>1</MinRevenue>
  <Notes>sample string 17</Notes>
  <OpportunityAmount>6</OpportunityAmount>
  <OpportunityCode>sample string 3</OpportunityCode>
  <OpportunityContactCustomerEmail>sample string 11</OpportunityContactCustomerEmail>
  <OpportunityContactCustomerID>9</OpportunityContactCustomerID>
  <OpportunityContactCustomerName>sample string 10</OpportunityContactCustomerName>
  <OpportunityContactCustomerPhoneCode>sample string 12</OpportunityContactCustomerPhoneCode>
  <OpportunityContactCustomerPhoneNo>sample string 13</OpportunityContactCustomerPhoneNo>
  <OpportunityExpectedRevenue>8</OpportunityExpectedRevenue>
  <OpportunityID>2</OpportunityID>
  <OpportunityName>sample string 4</OpportunityName>
  <OpportunityNextStep>sample string 5</OpportunityNextStep>
  <OpportunityOwnerID>18</OpportunityOwnerID>
  <OpportunityProbability>7</OpportunityProbability>
  <OpportunitySourceID>14</OpportunitySourceID>
  <OpportunityStageID>15</OpportunityStageID>
  <OpportunityTagIDs>sample string 20</OpportunityTagIDs>
  <ProjectID>1</ProjectID>
  <StageComment>sample string 22</StageComment>
  <SubMarketID>1</SubMarketID>
  <UserID>1</UserID>
</OpportunityInsertUpdateRequestModel>

multipart/form-data

Sample:
<OpportunityInsertUpdateRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CMMS_V2.Core.RequestModel"><ApiToken>sample string 1</ApiToken><AwardedDate>2025-07-17T05:23:35.2070581+00:00</AwardedDate><ClosingDate>2025-07-17T05:23:35.2070581+00:00</ClosingDate><ContactPersonID>1</ContactPersonID><CurrencyID>1</CurrencyID><CustomerAddressType>1</CustomerAddressType><CustomerCompanyName>sample string 23</CustomerCompanyName><Description>sample string 16</Description><FaultCode>sample string 21</FaultCode><IsActive>19</IsActive><LLID>1</LLID><MarketID>1</MarketID><MaxRevenue>1</MaxRevenue><MinRevenue>1</MinRevenue><Notes>sample string 17</Notes><OpportunityAmount>6</OpportunityAmount><OpportunityCode>sample string 3</OpportunityCode><OpportunityContactCustomerEmail>sample string 11</OpportunityContactCustomerEmail><OpportunityContactCustomerID>9</OpportunityContactCustomerID><OpportunityContactCustomerName>sample string 10</OpportunityContactCustomerName><OpportunityContactCustomerPhoneCode>sample string 12</OpportunityContactCustomerPhoneCode><OpportunityContactCustomerPhoneNo>sample string 13</OpportunityContactCustomerPhoneNo><OpportunityExpectedRevenue>8</OpportunityExpectedRevenue><OpportunityID>2</OpportunityID><OpportunityName>sample string 4</OpportunityName><OpportunityNextStep>sample string 5</OpportunityNextStep><OpportunityOwnerID>18</OpportunityOwnerID><OpportunityProbability>7</OpportunityProbability><OpportunitySourceID>14</OpportunitySourceID><OpportunityStageID>15</OpportunityStageID><OpportunityTagIDs>sample string 20</OpportunityTagIDs><ProjectID>1</ProjectID><StageComment>sample string 22</StageComment><SubMarketID>1</SubMarketID><UserID>1</UserID></OpportunityInsertUpdateRequestModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The HTTP response message containing the result of the operation.

CommonResponseDataModel
NameDescriptionTypeAdditional information
ReturnID

integer

Required

Message

string

Required

Successful

boolean

Required

Code

integer

None.

TotalRecord

integer

None.

Response Formats

application/json, text/json, text/plain, text/html

Sample:
{
  "returnID": 1,
  "message": "sample string 2",
  "successful": true,
  "code": 4,
  "totalRecord": 5
}

application/xml, text/xml

Sample:
<CommonResponseDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATMP.Core.DataModel">
  <Code>4</Code>
  <Message>sample string 2</Message>
  <ReturnID>1</ReturnID>
  <Successful>true</Successful>
  <TotalRecord>5</TotalRecord>
</CommonResponseDataModel>

multipart/form-data

Sample:
<CommonResponseDataModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATMP.Core.DataModel"><Code>4</Code><Message>sample string 2</Message><ReturnID>1</ReturnID><Successful>true</Successful><TotalRecord>5</TotalRecord></CommonResponseDataModel>