PUT api/v1/Goals/{id}

Updates an existing goal

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The ID of the goal that you're updating

globally unique identifier

Required

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

New values for the goal

GoalUpdate
NameDescriptionTypeAdditional information
DataType

Numerical = 5, Monetary = 9, Percentage = 17

integer

None.

Category

WIG = 0, SubWIG = 1, Lead = 2

integer

None.

BoundaryType

Meet or Exceeds = 0, Not Greater Than = 1

integer

None.

StartValue

Value of the starting waypoint

decimal number

None.

EndValue

Value of the ending waypoint

decimal number

None.

StartDate

(UTC midnight) Date of the starting waypoint

date

None.

EndDate

(UTC midnight) Date of the ending waypoint

date

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

Current value of the goal

decimal number

None.

Title

Name/title of the goal

string

None.

Request Formats

application/json, text/json

Sample:
{
  "DataType": 1,
  "Category": 1,
  "BoundaryType": 1,
  "StartValue": 1.1,
  "EndValue": 1.1,
  "StartDate": "2024-05-19T11:30:45.1310101-04:00",
  "EndDate": "2024-05-19T11:30:45.1466461-04:00",
  "YellowVariance": 1.1,
  "RedVariance": 1.1,
  "Description": "sample string 1",
  "CurrentValue": 1.1,
  "Title": "sample string 2"
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Goal
NameDescriptionTypeAdditional 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

Sample:
{
  "ID": "1c56960c-c38a-44cf-9975-c3279fc10aa4",
  "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": "a84042db-8aed-42c8-93fb-220aec1ee27a",
  "YellowTolerance": 17.1,
  "RedTolerance": 18.1,
  "WaypointType": 19,
  "InTeamChildrenIDs": [
    "df797f5d-b402-4a70-a739-846d446ebbd0",
    "02424fdf-0238-4aac-a25b-60bb218eebdb"
  ],
  "InTeamParentIDs": [
    "eb0ed618-47ff-49f3-9aaa-edde501f0a57",
    "1366d972-6d7d-4133-8643-4a35448745f5"
  ],
  "OutTeamChildrenIDs": [
    "d1b73157-0bb9-4aed-a80a-65dc42eb19ce",
    "49b3c382-379a-4084-ad8a-e95d98ac9035"
  ],
  "OutTeamParentIDs": [
    "fd44d9b9-16ec-44d2-a7e0-38dc64249fa2",
    "bf74ae25-f095-4368-a15d-0d9c41311c43"
  ],
  "IsRetired": true,
  "IsDeleted": true,
  "IsFuture": true
}