Skip to content

Update Endpoint

PATCH
/api/v1/goal-templates/{template_id}
curl --request PATCH \
--url https://example.com/api/v1/goal-templates/1 \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "kind": "example", "amount": 1 }'
template_id
required
Template Id
integer
Media typeapplication/json
GoalTemplateUpdate
object
name
Any of:
string
>= 1 characters <= 100 characters
kind
Any of:
string
/^(per_paycheck|per_month)$/
amount
Any of:
number
> 0

Example generated

{
"name": "example",
"kind": "example",
"amount": 1
}

Successful Response

Media typeapplication/json
GoalTemplateOut
object
id
required
Id
integer
name
required
Name
string
kind
required
Kind
string
Allowed values: per_paycheck per_month
amount
required
Amount
string
usage_count
Usage Count
integer
0
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time

Example

{
"kind": "per_paycheck",
"usage_count": 0
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}