CoworkerTask API Resource


Base URL

https://spaces.nexudus.com/api/crm/coworkertasks

GET a list of CoworkerTasks

Calling this API method requires your App to be assinged one of the following roles:

  • CoworkerTask-List

GET https://spaces.nexudus.com/api/crm/coworkertasks
Request Url: crm/coworkertasks
Request Method: GET
Request Params: {}

Response Status Code: 200
Response Body:
{

    "Records": [{
        "BusinessId": 123456
        "CoworkerId": 123456
        "Name": "00001"
        "Completed": true
        "DueDate": null
        "ResponsibleId": 123456
        "UpdatedOn": "2010-09-16T03:05:32",
        "CreatedOn": "2010-08-31T13:45:29",
        "UniqueId": "a7399f21-8a5a-4837-a200-a44131ec50b3",
        "UpdatedBy": "user@example.com"
    }, {
        ...
    }, {
        ...
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 45,
    "TotalPages": 2
}

Although the data structure returned by the request may contain several properties, only the ones outlined above will actually contain data. If you want the complete data structure for a coworkertask use the GET method to retrieve a single record.

Use the parameters below to filter and search the list of results. You can pass any combinations of the parameters in the querystring of the request

GET https://spaces.nexudus.com/api/crm/coworkertasks?CoworkerTask_Id=123456
GET https://spaces.nexudus.com/api/crm/coworkertasks?CoworkerTask_Name=ABC12354
  • CoworkerTask_Id

  • CoworkerTask_Business

  • CoworkerTask_Coworker

  • CoworkerTask_Name

  • CoworkerTask_Notes

  • CoworkerTask_TaskItemUniqueId

  • CoworkerTask_Completed

  • CoworkerTask_DueDate

  • CoworkerTask_Reminded

  • CoworkerTask_Responsible

  • CoworkerTask_NotifyByEmail

  • CoworkerTask_DisplayToEveryone

  • CoworkerTask_DueDateLocal

  • CoworkerTask_Responsible_FullName

You can also get a list of records based when they were created or updated. This is useful if you want to get a list of records created after or before a particuar id or point in time. The IDs are always unique and they always represent the order in which records are created. So a record with an Id of 10 will always be created before a record with an Id of 21.

If you use a date make sure is in the follwing format: yyyy-MM-ddTHH:mm:ssZ. For example: 2012-10-08T23:13:38Z

You use two special querystring parameters:

  • from_coworkertask_id={id}: returns records with an Id greater (not equal) than {id}.

  • to_coworkertask_id={id}: returns records with an Id smaller (not equal) than {id}.

GET https://spaces.nexudus.com/api/crm/coworkertasks?from_CoworkerTask_Id=123456
GET https://spaces.nexudus.com/api/crm/coworkertasks?to_CoworkerTask_id=123456
GET https://spaces.nexudus.com/api/crm/coworkertasks?from_CoworkerTask_CreatedOn=2012-10-08T23:13:38Z
GET https://spaces.nexudus.com/api/crm/coworkertasks?to_CoworkerTask_CreatedOn=2012-10-08T23:13:38Z
GET https://spaces.nexudus.com/api/crm/coworkertasks?from_CoworkerTask_UpdatedOn=2012-10-08T23:13:38Z
GET https://spaces.nexudus.com/api/crm/coworkertasks?to_CoworkerTask_UpdatedOn=2012-10-08T23:13:38Z

Additionally, as with all the listings, you can pass parameters to control sorting and page sizes

  • page (default: 1)

  • size (the size of each page. Default: 25, max: 1000)

  • orderby (the field used to order the results)

  • dir (default: Descending. options: Ascending or Descending)


Get single

Calling this API method requires your App to be assinged one of the following roles:

  • CoworkerTask-Read

GET https://spaces.nexudus.com/api/crm/coworkertasks/{id}
Request Url: crm/coworkertasks
Request Method: GET
Request Params: {}
Response Status Code: 200
Response Body:
{
    "BusinessId": 123456
    "CoworkerId": 123456
    "Name": "00001"
    "Notes": "Notes"
    "Completed": true
    "DueDate": null
    "ResponsibleId": 123456
    "NotifyByEmail": true
    "DisplayToEveryone": true
    "UpdatedOn": "2010-09-16T03:05:32",
    "CreatedOn": "2010-08-31T13:45:29",
    "UniqueId": "a7399f21-8a5a-4837-a200-a44131ec50b3",
    "UpdatedBy": "user@example.com"
}

Create

Invoking this method will create a coworkertask record.

Calling this API method requires your App to be assinged one of the following roles:

  • CoworkerTask-Create

POST https://spaces.nexudus.com/api/crm/coworkertasks
Request Url: crm/coworkertasks
Request Method: POST
Request Params: {}
Request Content-Type: application/json
Request Body:
{
    "BusinessId": 123456
    "CoworkerId": 123456
    "Name": "00001"
    "ResponsibleId": 123456
}
Response Status Code: 200
Response Body:
{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record "Name of the record" has been succesfully created.",
    "Value": {
        "BusinessId": 123456
        "CoworkerId": 123456
        "Name": "00001"
        "Notes": "Notes"
        "Completed": true
        "DueDate": null
        "ResponsibleId": 123456
        "NotifyByEmail": true
        "DisplayToEveryone": true
        "Id": 123456,
        "UpdatedOn": "2013-02-13T13:15:07.7527111Z",
        "CreatedOn": "2013-02-13T13:15:07.7527111Z",
        "UniqueId": "8a2648c6-f440-48f5-8601-ec96dee5f823",
        "UpdatedBy": "user@example.com",
    },
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}

Please note that the data displayed in this request only includes those properties required to create a coworkertask. You can also provide additional data when creating this record if you need to.


Delete

Invoking this method will delete a record based on its ID. The ID of the record is passed as part of the URL of the request.

Calling this API method requires your App to be assinged one of the following roles:

  • CoworkerTask-Delete

DELETE https://spaces.nexudus.com/api/crm/coworkertasks/{id}
Request Url: crm/coworkertasks/123456
Request Method: DELETE
Response Status Code: 200
Response Body:

{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "The record was deleted successfully.",
    "Value": null,
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}

Update

Calling this API method requires your App to be assinged one of the following roles:

  • CoworkerTask-Update

PUT https://spaces.nexudus.com/api/crm/coworkertasks
Request Url: crm/coworkertasks
Request Method: PUT
Request Content-Type: application/json
Params: {}

Request Body:
{
    "Id": 123456
    "BusinessId": 789456
    "CoworkerId": 789456
    "Name": "00001"
    "ResponsibleId": 789456
}
Response Status Code: 200
Response Body:
{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "The record "name of the record" was updated successfully,
    "Value": {
        "Id": 123456
    },
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}

Complete Data Structure

Below is displayed the complete data structure for a coworkertask. Not all the methods outlined in this page will populate data for all the properties in the structure. For example, the GET method to retrieve a list of coworkertasks will only return a subset of this.

Response Status Code: 200
Response Body:
{

   "BusinessId": 123456
   "CoworkerId": 123456
   "Name": "00001"
   "Notes": "Notes"
   "Completed": true
   "DueDate": null
   "ResponsibleId": 123456
   "NotifyByEmail": true
   "DisplayToEveryone": true
   "Id": 123456,
   "UpdatedOn": "2013-02-13T13:15:07.7527111Z",
   "CreatedOn": "2013-02-13T13:15:07.7527111Z",
   "UniqueId": "8a2648c6-f440-48f5-8601-ec96dee5f823",
   "UpdatedBy": "user@example.com"
}

Data Types

The list below provides the type for each of the fields avaialble for the coworkertask entities.

"BusinessId": int
"CoworkerId": int
"Name": string
"Notes": string
"Completed": bool
"DueDate": DateTime?
"ResponsibleId": int
"NotifyByEmail": bool
"DisplayToEveryone": bool
"Id": int,
"UpdatedOn": DateTime,
"CreatedOn": DateTime,
"UniqueId": GUID,
"UpdatedBy": string
		

Related API Resources




Source: XML ! RSS