POST api/v1/Goals
Create a new goal
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
fields |
Use this to only return the data fields you're interested in. Field names not found are ignored and no error is thrown. If no fields are found then the full object is returned. |
Collection of string |
None. |
suppressResponseCodes |
Some applications do wonky things if error codes are used. Use this to force 200s to always return. |
boolean |
None. |
APIKey |
This is your unique key that identifies you as the developer of this app. Required for all calls. |
string |
None. |
APIToken |
This is the user's session token generated when you authenticate the user |
string |
None. |
Body Parameters
Values for the new goal
NewGoalName | Description | Type | Additional information |
---|---|---|---|
DataType |
Numerical = 5, Monetary = 9, Percentage = 17 |
integer |
None. |
TeamID |
The ID of the team you want to create the goal on |
globally unique identifier |
None. |
Category |
WIG = 0, SubWIG = 1, Lead = 2 |
integer |
None. |
BoundaryType |
Meet or Exceeds = 0, Not Greater Than = 1 |
integer |
None. |
Waypoints |
(Required minimum of 2) New waypoints for this goal |
Collection of NewWaypoint |
None. |
YellowVariance |
Yellow tolerance/variance value |
decimal number |
None. |
RedVariance |
Red tolerance/variance value |
decimal number |
None. |
Description |
Description of the goal |
string |
None. |
CurrentValue |
This goal will be initialized with this value |
decimal number |
None. |
Title |
Name/title of the goal |
string |
None. |
ParentIDs |
IDs of any parents this goal has; could be multiple, but the majority of the time there should be only 1 element present here |
Collection of globally unique identifier |
None. |
DateAvailable |
(UTC midnight) If this date is null or before today this goal will automatically become available. If this goal is set to a future date it won't appear until then unless you specifically request to show future goals. |
date |
None. |
RetireDate |
(UTC midnight) If this date is before today it will be initialized in the retired state. If this date is null it will not retire unless you retire it manually OR retire a parent goal manually. If it's set in the future it won't retire until that date UTC. |
date |
None. |
Order |
The order of the goal in relation to other goals when displayed on a team. If you are changing the order on one goal make sure that you update the other goals to correspond to that change. |
byte |
None. |
Request Formats
application/json, text/json
{ "DataType": 1, "TeamID": "8bc9c925-763f-4b9d-821e-2bbaf0dbff59", "Category": 3, "BoundaryType": 4, "Waypoints": [ { "Name": "sample string 1", "Date": "2024-11-20T17:34:16.7298628-05:00", "Value": 3.1 }, { "Name": "sample string 1", "Date": "2024-11-20T17:34:16.7298628-05:00", "Value": 3.1 } ], "YellowVariance": 5.1, "RedVariance": 6.1, "Description": "sample string 7", "CurrentValue": 1.1, "Title": "sample string 8", "ParentIDs": [ "d2b9a762-3dde-42d1-b279-39ff6ea0e49c", "fc20ee0d-f110-48e1-8d98-e36be9baa3fb" ], "DateAvailable": "2024-11-20T17:34:16.7298628-05:00", "RetireDate": "2024-11-20T17:34:16.7298628-05:00", "Order": 64 }
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
GoalName | Description | Type | Additional information |
---|---|---|---|
ID |
The goal's ID |
globally unique identifier |
None. |
Name |
The goal's name/title |
string |
None. |
Description |
The goal's description |
string |
None. |
GoalType |
The goal's type/category: WIG = 0, SubWIG = 1, Lead = 2 |
byte |
None. |
DisplayType |
The goal's value storage type: Number = 5, Money = 9, Percentage = 17 |
byte |
None. |
DisplayColor |
The goal's current state color: Red = 255, Yellow = 0, Green = 1 |
byte |
None. |
BoundaryType |
The goal's boundary condition type: Meet or Exceeds = 0, Not Greater Than = 1 |
byte |
None. |
CurrentValue |
The goal's current value |
decimal number |
None. |
TargetValue |
The current target value for this goal with respect to the current UTC date and goal waypoints. |
decimal number |
None. |
DisplayValue |
The goal's display value. This could be different than the current value if it is an aggregate or composite goal. |
decimal number |
None. |
StartValue |
The value of the starting waypoint |
decimal number |
None. |
EndValue |
The value of the ending waypoint |
decimal number |
None. |
CurrentDecimalLength |
The decimal precision required when displaying the display or current value. This is NOT applied to the data value coming down from the server. |
integer |
None. |
TargetDecimalLength |
The decimal precision required when displaying the target value. This is NOT applied to the data value coming down from the server. |
integer |
None. |
FinalDecimalLength |
The decimal precision required when displaying the final value. This is NOT applied to the data value coming down from the server. |
integer |
None. |
TeamID |
The goal's team ID |
globally unique identifier |
None. |
YellowTolerance |
Yellow tolerance/variance value |
decimal number |
None. |
RedTolerance |
Red tolerance/variance value |
decimal number |
None. |
WaypointType |
Linear = 0, Step = 1, Periodstep = 2, Weekly Reset Daily Step = 3 |
integer |
None. |
InTeamChildrenIDs |
IN team goal child IDs |
Collection of globally unique identifier |
None. |
InTeamParentIDs |
IN team goal parent IDs |
Collection of globally unique identifier |
None. |
OutTeamChildrenIDs |
OUT of team goal child IDs |
Collection of globally unique identifier |
None. |
OutTeamParentIDs |
OUT of team goal parent IDs |
Collection of globally unique identifier |
None. |
IsRetired |
If the goal is retired |
boolean |
None. |
IsDeleted |
If the goal is deleted |
boolean |
None. |
IsFuture |
If the goal isn't active yet (future goal) |
boolean |
None. |
Response Formats
application/json, text/json
{ "ID": "79f79699-eaf1-4fc6-a88f-515f44260d9e", "Name": "sample string 2", "Description": "sample string 3", "GoalType": 64, "DisplayType": 64, "DisplayColor": 64, "BoundaryType": 64, "CurrentValue": 8.1, "TargetValue": 9.1, "DisplayValue": 10.1, "StartValue": 11.1, "EndValue": 12.1, "CurrentDecimalLength": 13, "TargetDecimalLength": 14, "FinalDecimalLength": 15, "TeamID": "91d39d19-9bc3-441d-9910-821ed4a05fc2", "YellowTolerance": 17.1, "RedTolerance": 18.1, "WaypointType": 19, "InTeamChildrenIDs": [ "d0d52591-f53f-44ec-bced-c8c98dcc64f4", "fce3612f-b260-4b7e-a74c-71a7e507901f" ], "InTeamParentIDs": [ "805ab39e-6dcd-48ae-b32c-65f867dcdae4", "3e3af822-2a57-415d-a826-f47ad5a6d855" ], "OutTeamChildrenIDs": [ "3d1e8525-3555-41b7-bf4a-727ab3d3fbce", "740540c7-9c4b-4795-9b87-8fc692635a1a" ], "OutTeamParentIDs": [ "34bc0b44-fbad-4361-bfae-0d2f76bc7ec0", "1ea4ed7d-ff56-4194-8169-24eb452b881a" ], "IsRetired": true, "IsDeleted": true, "IsFuture": true }