Help Page Home - Activities
POST Activity
Insert an activity.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
WsAccessKey | The Web Service access key for this user and file which allows access to the API for the associated file (found in File - Settings). Using OAuth authentication mechanism is the preferred method to allow API access. | string |
Optional. Legacy authentication method and only required if not using OAuth. OAuth is preferred. |
FileId | Specifies the file id of the file to perform the operation upon. | integer |
Required |
Body Parameters
ActivityDetailName | Description | Type | Additional information |
---|---|---|---|
Details | Details of activity. | string |
None. |
Attachments | List of attachments associated with this activity. This data is returned only and cannot be added or updated when issuing a POST or PUT. | Collection of FileAttachmentInfo |
None. |
Id | The Id/key of the activity. This data is returned only and cannot be added or updated when issuing a POST or PUT. | integer |
None. |
LastUpdatedId | A data field used to check concurreny when performing updates. This data is returned only and used for concurrency checking when performing an update/PUT. | string |
None. |
ActivityType | The type of activity. Valid values are all tags with activity flag set to true. Note - invalid values will be ignored when issuing a POST or PUT. | string |
None. |
Done | Whether the activity is done. | boolean |
None. |
Due | Due date for the activity. | date |
None. |
Title | The title of the activity. | string |
None. |
OwnerFirstName | Owner/user responsible for the activity's first name. This data is returned only and cannot be added or updated when issuing a POST or PUT. | string |
None. |
OwnerLastName | Owner/user responsible for the activity's last name. This data is returned only and cannot be added or updated when issuing a POST or PUT. | string |
None. |
OwnerEmail | Owner/user responsible for this activity's email. This field is used to identify the user. User must have access to the file which this activity belongs to. | string |
None. |
AttachedToType | The entity type the activity is attached to. Valid values are Contact, Employee, Sale and Purchase. If not null then AttachedToId must also be provided. | string |
None. |
AttachedToId | The entity id the activity is attached to. If not null then AttachedToType must also be provided. | integer |
None. |
Tags | List of tags associated with this resource. | Collection of string |
None. |
CreatedDateUtc | The date and time this resource was created in UTC. This data is returned only and cannot be added or updated when issuing a POST or PUT. | date |
None. |
LastModifiedDateUtc | The date and time this resource was last modified in UTC. This data is returned only and cannot be added or updated when issuing a POST or PUT. | date |
None. |
_links | Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. | Collection of Link |
None. |
Request Formats
application/json, text/json
Sample:
{ "Details": "Test Activity 1 details", "Attachments": [ { "Id": 1, "Size": 111111, "Name": "test.txt", "Description": "Test document", "ItemIdAttachedTo": 111, "_links": [] } ], "Id": 111, "LastUpdatedId": "AAAAKlh=", "ActivityType": "TestType", "Done": false, "Due": "2024-12-31T05:00:08.6343101+11:00", "Title": "Test Actvity 1", "OwnerFirstName": "John", "OwnerLastName": "Smith", "OwnerEmail": "someone@test.com", "AttachedToType": "sale", "AttachedToId": 321, "Tags": [ "testTag1", "testTag2" ], "CreatedDateUtc": "2024-09-12T05:00:08.6343101+10:00", "LastModifiedDateUtc": "2024-12-20T05:00:08.6343101+11:00", "_links": [] }
application/xml, text/xml
Sample:
<ActivityDetail xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <_links /> <Id>111</Id> <LastUpdatedId>AAAAKlh=</LastUpdatedId> <ActivityType>TestType</ActivityType> <Done>false</Done> <Due>2024-12-31T05:00:08.6343101+11:00</Due> <Title>Test Actvity 1</Title> <OwnerFirstName>John</OwnerFirstName> <OwnerLastName>Smith</OwnerLastName> <OwnerEmail>someone@test.com</OwnerEmail> <AttachedToType>sale</AttachedToType> <AttachedToId>321</AttachedToId> <Tags> <string>testTag1</string> <string>testTag2</string> </Tags> <CreatedDateUtc>2024-09-12T05:00:08.6343101+10:00</CreatedDateUtc> <LastModifiedDateUtc>2024-12-20T05:00:08.6343101+11:00</LastModifiedDateUtc> <Details>Test Activity 1 details</Details> <Attachments> <FileAttachmentInfo> <_links /> <Name>test.txt</Name> <Description>Test document</Description> <ItemIdAttachedTo>111</ItemIdAttachedTo> <Id>1</Id> <Size>111111</Size> </FileAttachmentInfo> </Attachments> </ActivityDetail>
Response Information
Resource Description
InsertActivityResultName | Description | Type | Additional information |
---|---|---|---|
InsertedEntityId | The Id/key of the newly created/inserted activity. | integer |
None. |
LastUpdatedId | The unique identifier generated as part of the update. This value is required when submitting subsequent update to prevent concurrency errors. | string |
None. |
UtcLastModified | The date and time this resource was modified in UTC. | date |
None. |
_links | Hypermedia links. Contains contextual links to possible next actions related to this resource. Only present in responses. This data is not to be sent to the server. | Collection of Link |
None. |
Response Formats
application/json, text/json
Sample:
{ "InsertedEntityId": 111, "LastUpdatedId": "AAAAKlh=", "UtcLastModified": "2024-12-15T18:00:08.6569989Z", "_links": [ { "rel": "self", "href": "https://api.saasu.com/Activity/111?FileId=123", "method": "POST", "title": null }, { "rel": "list", "href": "https://api.saasu.com/Activities?FileId=123", "method": "GET", "title": null }, { "rel": "update", "href": "https://api.saasu.com/Activity/111?FileId=123", "method": "PUT", "title": null }, { "rel": "delete", "href": "https://api.saasu.com/Activity/111?FileId=123", "method": "DELETE", "title": null } ] }
application/xml, text/xml
Sample:
<InsertActivityResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <_links> <Link> <rel>self</rel> <href>https://api.saasu.com/Activity/111?FileId=123</href> <method>POST</method> </Link> <Link> <rel>list</rel> <href>https://api.saasu.com/Activities?FileId=123</href> <method>GET</method> </Link> <Link> <rel>update</rel> <href>https://api.saasu.com/Activity/111?FileId=123</href> <method>PUT</method> </Link> <Link> <rel>delete</rel> <href>https://api.saasu.com/Activity/111?FileId=123</href> <method>DELETE</method> </Link> </_links> <LastUpdatedId>AAAAKlh=</LastUpdatedId> <UtcLastModified>2024-12-15T18:00:08.6569989Z</UtcLastModified> <InsertedEntityId>111</InsertedEntityId> </InsertActivityResult>