The crmopportunity object
Attributes |
Id: int required, autogenerated, unique
The unique identifier for this crmopportunity |
AgentId: Id optional |
Completed: bool optional |
CoworkerId: Id required |
CrmBoardColumnId: Id required |
DueDate: DateTime? optional |
LeadSource: Nexudus.Coworking.Core.Enums.eCrmOpportunitySource? optional |
LossReason: Nexudus.Coworking.Core.Enums.eCrmOpportunityLossReason? optional |
LostOn: DateTime? optional |
Notes: string optional |
OpportunityTypeId: Id optional |
Position: int required |
ReferrerId: Id optional |
ResponsibleId: Id optional |
Status: Nexudus.Coworking.Core.Enums.eCrmOpportunityStatus optional |
TeamId: Id optional |
Value: decimal? optional |
WonOn: DateTime? optional |
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this crmopportunity |
SystemId: string optional api-only
User defined data about this crmopportunity. This property can only be seen and updated using the API. |
Json Structure Example
{
"Id": 1234567,
"AgentId": 12345678,
"Completed": false,
"CoworkerId": 12345678,
"CrmBoardColumnId": 12345678,
"DueDate": ,
"LeadSource": 1,
"LossReason": 1,
"LostOn": ,
"Notes": "Notes",
"OpportunityTypeId": 12345678,
"Position": ,
"ReferrerId": 12345678,
"ResponsibleId": 12345678,
"Status": 1,
"TeamId": 12345678,
"Value": ,
"WonOn": ,
"UniqueId": "a043e2d1-0301-429e-acb8-56fddf57ef3c",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}
Find a CrmOpportunity
This endpoint allows you to GET a list of crmopportunities based on one or more filter querystring parameters.
GET https://spaces.nexudus.com/api/crm/crmopportunities?...
π Requires role "CrmOpportunity-List"
Pagination querystring parameters
Lets control how many records to return at a time and their order. |
page integer optional
?page=1 |
size integer optional default=25
Sets the maximum number of records to return each page of results. ?size=25 |
orderby string optional default=Id
Sets the property to use when ordering the results of the search. ?orderby=Id |
dir 'ascending' or 'descending' optional default=SortDirection.Ascending
Sets the direction to use when ordering the records. ?sort=ascending |
Search querystring parameters
Lets you search crmopportunity records based on their different properties. |
Id number
?Id=12345678 |
CrmOpportunity_Agent Coworker
?CrmOpportunity_Agent=... |
CrmOpportunity_Completed bool
?CrmOpportunity_Completed=... |
CrmOpportunity_Coworker Coworker
?CrmOpportunity_Coworker=... |
CrmOpportunity_CrmBoardColumn CrmBoardColumn
?CrmOpportunity_CrmBoardColumn=... |
CrmOpportunity_DueDate DateTime?
?CrmOpportunity_DueDate=... |
CrmOpportunity_LeadSource Nexudus.Coworking.Core.Enums.eCrmOpportunitySource?
?CrmOpportunity_LeadSource=... |
CrmOpportunity_LossReason Nexudus.Coworking.Core.Enums.eCrmOpportunityLossReason?
?CrmOpportunity_LossReason=... |
CrmOpportunity_LostOn DateTime?
?CrmOpportunity_LostOn=... |
CrmOpportunity_Notes string
?CrmOpportunity_Notes=... |
CrmOpportunity_OpportunityType OpportunityType
?CrmOpportunity_OpportunityType=... |
CrmOpportunity_Position int
?CrmOpportunity_Position=... |
CrmOpportunity_Referrer Coworker
?CrmOpportunity_Referrer=... |
CrmOpportunity_Responsible User
?CrmOpportunity_Responsible=... |
CrmOpportunity_Status Nexudus.Coworking.Core.Enums.eCrmOpportunityStatus
?CrmOpportunity_Status=... |
CrmOpportunity_Team Team
?CrmOpportunity_Team=... |
CrmOpportunity_Value decimal?
?CrmOpportunity_Value=... |
CrmOpportunity_WonOn DateTime?
?CrmOpportunity_WonOn=... |
CrmOpportunity_CrmBoardColumnName string
?CrmOpportunity_CrmBoardColumnName=... |
CrmOpportunity_CrmBoardColumnCrmBoard_Id string
?CrmOpportunity_CrmBoardColumnCrmBoard_Id=... |
CrmOpportunity_CrmBoardColumnCrmBoard_Name string
?CrmOpportunity_CrmBoardColumnCrmBoard_Name=... |
CrmOpportunity_CrmBoardColumnCrmBoard_Business_Id string
?CrmOpportunity_CrmBoardColumnCrmBoard_Business_Id=... |
CrmOpportunity_CrmBoardColumnCrmBoard_Business_Name string
?CrmOpportunity_CrmBoardColumnCrmBoard_Business_Name=... |
CrmOpportunity_CrmBoardColumnCrmBoard_Business_Currency_Id string
?CrmOpportunity_CrmBoardColumnCrmBoard_Business_Currency_Id=... |
CrmOpportunity_CrmBoardColumnCrmBoard_Business_Currency_Code string
?CrmOpportunity_CrmBoardColumnCrmBoard_Business_Currency_Code=... |
CrmOpportunity_CoworkerFullName string
?CrmOpportunity_CoworkerFullName=... |
CrmOpportunity_CoworkerCoworkerType string
?CrmOpportunity_CoworkerCoworkerType=... |
CrmOpportunity_CoworkerCompanyName string
?CrmOpportunity_CoworkerCompanyName=... |
CrmOpportunity_CoworkerEmail string
?CrmOpportunity_CoworkerEmail=... |
CrmOpportunity_TeamName string
?CrmOpportunity_TeamName=... |
CrmOpportunity_TeamDescription string
?CrmOpportunity_TeamDescription=... |
CrmOpportunity_TeamProfileWebsite string
?CrmOpportunity_TeamProfileWebsite=... |
CrmOpportunity_OpportunityTypeName string
?CrmOpportunity_OpportunityTypeName=... |
CrmOpportunity_ResponsibleFullName string
?CrmOpportunity_ResponsibleFullName=... |
Range search querystring parameters
Lets you search crmopportunity records based on a range of date or numeric values. |
To_CrmOpportunity_CreatedOn date
?To_CrmOpportunity_CreatedOn=2010-01-01T20:32 |
From_CrmOpportunity_CreatedOn date
?From_CrmOpportunity_CreatedOn=2010-01-01T20:32 |
To_CrmOpportunity_UpdatedOn date
?To_CrmOpportunity_UpdatedOn=2010-01-01T20:32 |
From_CrmOpportunity_UpdatedOn date
?From_CrmOpportunity_UpdatedOn=2010-01-01T20:32 |
To_CrmOpportunity_DueDate date
?To_CrmOpportunity_DueDate=2010-01-01T20:32 |
From_CrmOpportunity_DueDate date
?From_CrmOpportunity_DueDate=2010-01-01T20:32 |
To_CrmOpportunity_Value number
?To_CrmOpportunity_Value=0 |
From_CrmOpportunity_Value number
?From_CrmOpportunity_Value=10 |
To_CrmOpportunity_WonOn date
?To_CrmOpportunity_WonOn=2010-01-01T20:32 |
From_CrmOpportunity_WonOn date
?From_CrmOpportunity_WonOn=2010-01-01T20:32 |
To_CrmOpportunity_LostOn date
?To_CrmOpportunity_LostOn=2010-01-01T20:32 |
From_CrmOpportunity_LostOn date
?From_CrmOpportunity_LostOn=2010-01-01T20:32 |
To_CrmOpportunity_Position number
?To_CrmOpportunity_Position=0 |
From_CrmOpportunity_Position number
?From_CrmOpportunity_Position=10 |
Example request
GET https://spaces.nexudus.com/api/crm/crmopportunities?CrmOpportunity_Name=... Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example response
{
"Records": [{
"Id": 1234567,
"CrmBoardColumn": ,
"Coworker": ,
"Team": ,
"OpportunityType": ,
"Responsible": ,
"Referrer": ,
"Agent": ,
"Notes": "Notes",
"Completed": false,
"DueDate": ,
"Value": ,
"LeadSource": 1,
"LossReason": 1,
"Status": 1,
"WonOn": ,
"LostOn": ,
"Position": ,
"CrmOpportunityCrmBoardColumnName": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Id": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Name": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Id": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Name": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Currency_Id": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Currency_Code": "...",
"CrmOpportunityCoworkerFullName": "...",
"CrmOpportunityCoworkerCoworkerType": "...",
"CrmOpportunityCoworkerCompanyName": "...",
"CrmOpportunityCoworkerEmail": "...",
"CrmOpportunityTeamName": "...",
"CrmOpportunityTeamDescription": "...",
"CrmOpportunityTeamProfileWebsite": "...",
"CrmOpportunityOpportunityTypeName": "...",
"CrmOpportunityResponsibleFullName": "...",
"CreatedOn": "2018-07-03T06:23:01Z",
"UpdatedOn": "2020-01-01T21:57:21Z",
"UpdatedBy": "System",
"UniqueId": "0cf10f51-216f-4f9f-ab9a-961eaa7f6f28",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}],
"CurrentPageSize": 25,
"CurrentPage": 1,
"CurrentOrderField": "Id",
"CurrentSortDirection": 1,
"FirstItem": 1,
"HasNextPage": true,
"HasPreviousPage": false,
"LastItem": 25,
"PageNumber": 1,
"PageSize": 25,
"TotalItems": 60,
"TotalPages": 3
}
Find CrmOpportunities by IDs
Gets one or more crmopportunity records based on their Id.GET https://spaces.nexudus.com/api/crm/crmopportunities?CrmOpportunity_Id=[:id1,:id2,...]
π Requires role "CrmOpportunity-List"
Querystring parameters |
CrmOpportunity_Id: array requried
?CrmOpportunity_Id=[12345678,87654651] |
Example request
GET https://spaces.nexudus.com/api/crm/crmopportunities?CrmOpportunity_Id=[1234567,9876541] Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example response
{
"Records": [{
"Id": 1234567,
"CrmBoardColumn": ,
"Coworker": ,
"Team": ,
"OpportunityType": ,
"Responsible": ,
"Referrer": ,
"Agent": ,
"Notes": "Notes",
"Completed": false,
"DueDate": ,
"Value": ,
"LeadSource": 1,
"LossReason": 1,
"Status": 1,
"WonOn": ,
"LostOn": ,
"Position": ,
"CrmOpportunityCrmBoardColumnName": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Id": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Name": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Id": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Name": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Currency_Id": "...",
"CrmOpportunityCrmBoardColumnCrmBoard_Business_Currency_Code": "...",
"CrmOpportunityCoworkerFullName": "...",
"CrmOpportunityCoworkerCoworkerType": "...",
"CrmOpportunityCoworkerCompanyName": "...",
"CrmOpportunityCoworkerEmail": "...",
"CrmOpportunityTeamName": "...",
"CrmOpportunityTeamDescription": "...",
"CrmOpportunityTeamProfileWebsite": "...",
"CrmOpportunityOpportunityTypeName": "...",
"CrmOpportunityResponsibleFullName": "...",
"CreatedOn": "2018-07-03T06:23:01Z",
"UpdatedOn": "2020-01-01T21:57:21Z",
"UpdatedBy": "System",
"UniqueId": "0b38cf71-c07c-4073-8ab2-9b5cd8cc81de",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}],
"CurrentPageSize": 25,
"CurrentPage": 1,
"CurrentOrderField": "Id",
"CurrentSortDirection": 1,
"FirstItem": 1,
"HasNextPage": true,
"HasPreviousPage": false,
"LastItem": 1,
"PageNumber": 1,
"PageSize": 25,
"TotalItems": 1,
"TotalPages": 1
}
Get single CrmOpportunity by Id
Gets one crmopportunity record by its Id.GET https://spaces.nexudus.com/api/crm/crmopportunities/:Id
π Requires role "CrmOpportunity-Read"
URL parameters |
Id: number requried |
Example request
GET https://spaces.nexudus.com/api/crm/crmopportunities/1234567 Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example response
{
"Id": 1234567,
"AgentId": 12345678,
"Completed": false,
"CoworkerId": 12345678,
"CrmBoardColumnId": 12345678,
"DueDate": ,
"LeadSource": 1,
"LossReason": 1,
"LostOn": ,
"Notes": "Notes",
"OpportunityTypeId": 12345678,
"Position": ,
"ReferrerId": 12345678,
"ResponsibleId": 12345678,
"Status": 1,
"TeamId": 12345678,
"Value": ,
"WonOn": ,
"CreatedOn": "2018-07-03T06:23:01Z",
"UpdatedOn": "2020-01-01T21:57:21Z",
"UpdatedBy": "System",
"UniqueId": "725f4748-da22-4fe0-9a83-c533820ed3b4",
"SystemId": "{ metadata: { id: 887766, processed: true } }"
}
Create new CrmOpportunity
Creates a new crmopportunity.POST https://spaces.nexudus.com/api/crm/crmopportunities
π Requires role "CrmOpportunity-Create"
Body parameters |
CrmBoardColumnId: number required |
CoworkerId: number required |
TeamId: number optional |
OpportunityTypeId: number optional |
ResponsibleId: number optional |
ReferrerId: number optional |
AgentId: number optional |
Notes: string optional |
Completed: bool optional |
DueDate: DateTime? optional |
Value: decimal? optional |
LeadSource: Nexudus.Coworking.Core.Enums.eCrmOpportunitySource? optional |
LossReason: Nexudus.Coworking.Core.Enums.eCrmOpportunityLossReason? optional |
Status: Nexudus.Coworking.Core.Enums.eCrmOpportunityStatus optional |
WonOn: DateTime? optional |
LostOn: DateTime? optional |
Position: int required |
Example request
POST https://spaces.nexudus.com/api/crm/crmopportunities Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
{
"CrmBoardColumnId": 12345678,
"CoworkerId": 12345678,
"TeamId": 12345678,
"OpportunityTypeId": 12345678,
"ResponsibleId": 12345678,
"ReferrerId": 12345678,
"AgentId": 12345678,
"Notes": "Notes",
"Completed": false,
"DueDate": ,
"Value": ,
"LeadSource": 1, //(check Enumerated values section below)
"LossReason": 1, //(check Enumerated values section below)
"Status": 1, //(check Enumerated values section below)
"WonOn": ,
"LostOn": ,
"Position": ,
}
Example valid response
{
"Status": 200,
"WasSuccessful": true,
"Message": "Record 'Name of the record' has been succesfully created.",
"Value": {
"Id": 12354678
}
}
Example invalid response
{
"Status": 500,
"Message": "Name: may not be null or empty",
"Value": null,
"WasSuccessful": false,
"Errors": [
{
"AttemptedValue": null,
"Message": "may not be null or empty",
"PropertyName": "Name"
},
]
}
Update CrmOpportunity
Updates an existing crmopportunity.PUT https://spaces.nexudus.com/api/crm/crmopportunities
PUT requests require ALL record properties to be submitted with every request. Any missing properties will be cleared or set to false.
π Requires role "CrmOpportunity-Edit"
Body parameters |
Id: number required
The unique Id of the crmopportunity to update. |
CrmBoardColumnId: number cleared if missing |
CoworkerId: number cleared if missing |
TeamId: number cleared if missing |
OpportunityTypeId: number cleared if missing |
ResponsibleId: number cleared if missing |
ReferrerId: number cleared if missing |
AgentId: number cleared if missing |
Notes: string cleared if missing |
Completed: bool cleared if missing |
DueDate: DateTime? cleared if missing |
Value: decimal? cleared if missing |
LeadSource: Nexudus.Coworking.Core.Enums.eCrmOpportunitySource? cleared if missing |
LossReason: Nexudus.Coworking.Core.Enums.eCrmOpportunityLossReason? cleared if missing |
Status: Nexudus.Coworking.Core.Enums.eCrmOpportunityStatus cleared if missing |
WonOn: DateTime? cleared if missing |
LostOn: DateTime? cleared if missing |
Position: int cleared if missing |
Example request
PUT https://spaces.nexudus.com/api/crm/crmopportunities Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
{
"Id": 12345678,
"CrmBoardColumnId": 12345678,
"CoworkerId": 12345678,
"TeamId": 12345678,
"OpportunityTypeId": 12345678,
"ResponsibleId": 12345678,
"ReferrerId": 12345678,
"AgentId": 12345678,
"Notes": "Notes",
"Completed": false,
"DueDate": ,
"Value": ,
"LeadSource": 1, //(check Enumerated values section below)
"LossReason": 1, //(check Enumerated values section below)
"Status": 1, //(check Enumerated values section below)
"WonOn": ,
"LostOn": ,
"Position": ,
}
Example valid response
{
"Status": 200,
"WasSuccessful": true,
"Message": "Record 'Name of the record' has been succesfully updated.",
"Value": {
"Id": 12354678
}
}
Example invalid response
{
"Status": 500,
"Message": "Name: may not be null or empty",
"Value": null,
"WasSuccessful": false,
"Errors": [
{
"AttemptedValue": null,
"Message": "may not be null or empty",
"PropertyName": "Name"
},
]
}
Delete CrmOpportunity
Deletes an existing crmopportunity by its Id.DELETE https://spaces.nexudus.com/api/crm/crmopportunities/:Id
π Requires role "CrmOpportunity-Delete"
URL parameters |
Id: number required
The unique Id of the crmopportunity to update. |
Example request
DELETE https://spaces.nexudus.com/api/crm/crmopportunities/12345678 Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example valid response
{
"Status": 200,
"WasSuccessful": true,
"Message": "The record was deleted successfully.",
"Value": null,
"OpenInDialog": false,
"RedirectURL": null,
"JavaScript": null,
"Errors": null
}
Commands
Commands allow to perform actions against one or more crmopportunity records. Some commands accept only one record while others can run an action for a number of records at the same time. Each command has metadata with information about how it can be used and the amount of records, if any, it needs to run.Get Commands
Get all commands available to run for crmopportunity records.GET https://spaces.nexudus.com/api/crm/crmopportunities/commands
Example request
GET https://spaces.nexudus.com/api/crm/crmopportunities/commands Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
Example valid response
[
{
"Key": "COMMAND_KEY_1",
"Name": "Command 1 english description",
"AppliesOnlyToMultipleEntities": false,
"DisplayInDropdown": true,
"DisplayInDropdownV2": true,
"AppliesOnlyToOneEntity": false,
"AppliesOnlyToTwoEntities": false,
"DisplayInGrid": false,
"NeedsEntitiesToRun": true,
"Order": 2,
"RequiresParameters": []
},
{
"Key": "COMMAND_KEY_2",
"Name": "Command 2 english description",
"AppliesOnlyToMultipleEntities": false,
"DisplayInDropdown": true,
"DisplayInDropdownV2": true,
"AppliesOnlyToOneEntity": true,
"AppliesOnlyToTwoEntities": false,
"DisplayInGrid": true,
"NeedsEntitiesToRun": true,
"Order": 10,
"RequiresParameters":
[
{
"Name": "Parameter 1 description",
"Type": "string",
},
{
"Name": "Parameter 2 description",
"Type": "Boolean",
}
]
},
...
]
Run Command
Runs a command based on its Key and one or more crmopportunity record IDs.POST https://spaces.nexudus.com/api/crm/crmopportunities/runacommandπ Requires role "CrmOpportunity-Edit"
Example request
POST https://spaces.nexudus.com/api/crm/crmopportunities/runcommand Content-Type: application/json Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==
{
"Ids":[1329961649],
"Parameters":
[
{
"Type": "string"
"Value":987654321
},
{
"Type": "Boolean",
"Value":true
},
...
],
"Key":"COMMAND_KEY_2"
}
Example valid response
{
"Errors": null
"JavaScript": null
"Message": "Result description"
"OpenInDialog": false
"OpenInWindow": false
"RedirectURL": null
"Status": 200
"UpdatedBy": "email@example.net"
"UpdatedOn: "2020-06-04T11:40:20Z"
"Value: {Id: 12345678}
"WasSuccessful: true
}
Enumerated values
LeadSource
GET /api/utils/enums?name=eCrmOpportunitySource
LossReason
GET /api/utils/enums?name=eCrmOpportunityLossReason
Status
GET /api/utils/enums?name=eCrmOpportunityStatus
Comments
Please sign in to leave a comment.