Hi, I am using the below code snippet to assign points to the user based on the previous activity. But I see an issue with the createddate field. It doesn't take the value I specified.
It just defaults to the current date.
Any help on this will be greatly appreciated.
API Url - "">communityqa.abcd.com/.../pointtransactions.json";
System.Collections.Specialized.NameValueCollection values = new NameValueCollection();
values["UserId"] = "5753";
values["ContentId"] = "78573349-3A44-4BC4-AC2E-47AAD3AD84EC";
values["ContentTypeId"] = "00000000-0000-0000-0000-000000000000";
values["Value"] = "5";
values["Description"] = "Reset Points";
values["CreatedDate"] = "2012-01-04T00:00:00";
string xml = Encoding.UTF8.GetString(webClient.UploadValues(targeturl, values1));
POST api.ashx/v2/pointtransactions.xml (or .json)
Request Parameters
Name | Type | Description | Location | Required | Default | Options |
---|---|---|---|---|---|---|
Description | string |
Short explanation of why points are being awarded | Request Body | Required | ||
UserId | int |
Which user points are being awarded to | Request Body | Required | ||
Value | int |
Amount of points being awarded (or removed if this number is negative) | Request Body | Required | ||
ContentId | Guid |
Identifier of content related to this point transaction | Request Body | Required | ||
ContentTypeId | Guid |
Content Type identifier of content related to this point transaction | Request Body | Required | ||
CreatedDate | DateTime |
Date and time the point transaction was created. The current time will be used if not specified. | Request Body | Optional |
Thank you!