curl --request PATCH \
--url {{BASE_URL}}/v2/user/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"fallback_time_zone": "Europe/London",
"fallback_birth_date": "1980-03-13"
}
'
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.user.patch({
userId: "<user_id>",
fallbackTimeZone: "Europe/London",
fallbackBirthDate: "1980-03-13",
});
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
client.user.patch(
"<user_id>",
fallback_time_zone="Europe/London",
fallback_birth_date="1980-03-13",
)
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.user.requests.UserPatchBody;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
client.user().patch(
"<user_id>",
UserPatchBody.builder()
.fallbackTimeZone("Europe/London")
.fallbackBirthDate("1980-03-13")
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
fallbackTimeZone := "Europe/London"
fallbackBirthDate := "1980-03-13"
err := c.User.Patch(context.TODO(), &junction.UserPatchBody{
UserId: "<user_id>",
FallbackTimeZone: &fallbackTimeZone,
FallbackBirthDate: &fallbackBirthDate,
})
if err != nil {
return err
}
{
"detail": "<unknown>"
}User Management
Update user
Partially update user via the Junction API. Requires authentication with your team API key.
PATCH
/
v2
/
user
/
{user_id}
curl --request PATCH \
--url {{BASE_URL}}/v2/user/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"fallback_time_zone": "Europe/London",
"fallback_birth_date": "1980-03-13"
}
'
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.user.patch({
userId: "<user_id>",
fallbackTimeZone: "Europe/London",
fallbackBirthDate: "1980-03-13",
});
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
client.user.patch(
"<user_id>",
fallback_time_zone="Europe/London",
fallback_birth_date="1980-03-13",
)
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.user.requests.UserPatchBody;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
client.user().patch(
"<user_id>",
UserPatchBody.builder()
.fallbackTimeZone("Europe/London")
.fallbackBirthDate("1980-03-13")
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
fallbackTimeZone := "Europe/London"
fallbackBirthDate := "1980-03-13"
err := c.User.Patch(context.TODO(), &junction.UserPatchBody{
UserId: "<user_id>",
FallbackTimeZone: &fallbackTimeZone,
FallbackBirthDate: &fallbackBirthDate,
})
if err != nil {
return err
}
{
"detail": "<unknown>"
}curl --request PATCH \
--url {{BASE_URL}}/v2/user/{user_id} \
--header 'Accept: application/json' \
--header 'x-vital-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"fallback_time_zone": "Europe/London",
"fallback_birth_date": "1980-03-13"
}
'
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.user.patch({
userId: "<user_id>",
fallbackTimeZone: "Europe/London",
fallbackBirthDate: "1980-03-13",
});
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
client.user.patch(
"<user_id>",
fallback_time_zone="Europe/London",
fallback_birth_date="1980-03-13",
)
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.user.requests.UserPatchBody;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
client.user().patch(
"<user_id>",
UserPatchBody.builder()
.fallbackTimeZone("Europe/London")
.fallbackBirthDate("1980-03-13")
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
fallbackTimeZone := "Europe/London"
fallbackBirthDate := "1980-03-13"
err := c.User.Patch(context.TODO(), &junction.UserPatchBody{
UserId: "<user_id>",
FallbackTimeZone: &fallbackTimeZone,
FallbackBirthDate: &fallbackBirthDate,
})
if err != nil {
return err
}
Authorizations
Vital Team API Key
Path Parameters
Body
application/json
Fallback time zone of the user, in the form of a valid IANA tzdatabase identifier (e.g., `Europe/London` or `America/Los_Angeles`).
Used when pulling data from sources that are completely time zone agnostic (e.g., all time is relative to UTC clock, without any time zone attributions on data points).
Fallback date of birth of the user, in YYYY-mm-dd format. Used for calculating max heartrate for providers that don not provide users' age.
Starting bound for user data ingestion bounds.
Ending bound for user data ingestion bounds.
A unique ID representing the end user. Typically this will be a user ID from your application. Personally identifiable information, such as an email address or phone number, should not be used in the client_user_id.
Response
Successful Response
Was this page helpful?
⌘I