Documentation

Goals

Update user's meditation goals

Creates or updates user's goals. Partial updates supported - only provided fields are updated.

ProductionStagingUAT
PUThttps://ankiren.com/api/meditations/goals

Request Body

Bắt buộc.

  • weeklyMinutesinteger

    Weekly goal in minutes (1 to 10080, i.e., 1 week)

    min: 1max: 10080
  • monthlyMinutesinteger

    Monthly goal in minutes (1 to 44640, i.e., 31 days)

    min: 1max: 44640
  • yearlyMinutesinteger

    Yearly goal in minutes (1 to 525600, i.e., 1 year)

    min: 1max: 525600
application/json
{
  "weeklyMinutes": 1,
  "monthlyMinutes": 1,
  "yearlyMinutes": 1
}

Responses

200 · Updated goals

  • weeklyMinutesinteger

    Weekly goal in minutes

    default: 60
  • monthlyMinutesinteger

    Monthly goal in minutes

    default: 300
  • yearlyMinutesinteger

    Yearly goal in minutes

    default: 3600
application/json
{
  "weeklyMinutes": 60,
  "monthlyMinutes": 300,
  "yearlyMinutes": 3600
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X PUT 'https://ankiren.com/api/meditations/goals' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "weeklyMinutes": 1,
  "monthlyMinutes": 1,
  "yearlyMinutes": 1
}'