Read a week
curl --request GET \
--url https://api.example.com/v1/week \
--cookie __Secure-better-auth.session_token=import requests
url = "https://api.example.com/v1/week"
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__Secure-better-auth.session_token='}};
fetch('https://api.example.com/v1/week', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/week",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/week"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__Secure-better-auth.session_token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/week")
.header("cookie", "__Secure-better-auth.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/week")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
response = http.request(request)
puts response.read_body{
"household": {
"name": "<string>"
},
"week": {
"id": "<string>",
"days": [
{
"date": "<string>",
"weekday": "seg",
"weather": {
"condition": "sun",
"minC": 123,
"maxC": 123
}
}
],
"previous": "<string>",
"next": "<string>",
"isCurrent": true
},
"items": [
{
"id": "<string>",
"activityId": "<string>",
"scheduleId": "<string>",
"date": "<string>",
"title": "<string>",
"subjects": [
{
"personId": "<string>",
"displayName": "<string>"
}
],
"assignee": {
"personId": "<string>",
"displayName": "<string>"
},
"mine": true,
"confidence": "confirmed",
"provenance": {
"sourceKind": "text",
"sourceRef": "<string>",
"authorId": "<string>",
"appliedAt": "2023-11-07T05:31:56Z",
"quote": "<string>"
},
"kind": "event",
"start": "<string>",
"suppressedBy": "exception",
"place": {
"name": "<string>",
"address": "<string>",
"mapUrl": "<string>"
},
"leaveAt": "<string>",
"reassignedFrom": {
"personId": "<string>",
"displayName": "<string>"
},
"reassignedBy": "<string>"
}
],
"bands": [
{
"id": "<string>",
"kind": "trip",
"label": "<string>",
"start": {
"date": "<string>",
"time": "<string>"
},
"end": {
"date": "<string>",
"time": "<string>"
},
"who": [
{
"personId": "<string>",
"displayName": "<string>"
}
],
"confidence": "confirmed",
"provenance": {
"sourceKind": "text",
"sourceRef": "<string>",
"authorId": "<string>",
"appliedAt": "2023-11-07T05:31:56Z",
"quote": "<string>"
}
}
]
}{
"code": "<string>",
"details": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"code": "request.timeout",
"correlationId": "<string>"
}{
"code": "request.timeout",
"correlationId": "<string>"
}Week
Read a week
The household’s week: its seven days, the ISO ids of the weeks before and after, the items on each day, and the trips and vacations that cross it. A suppressed item stays and says what suppressed it. Without week, the current week in America/Sao_Paulo.
GET
/
v1
/
week
Read a week
curl --request GET \
--url https://api.example.com/v1/week \
--cookie __Secure-better-auth.session_token=import requests
url = "https://api.example.com/v1/week"
headers = {"cookie": "__Secure-better-auth.session_token="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: '__Secure-better-auth.session_token='}};
fetch('https://api.example.com/v1/week', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/week",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/week"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "__Secure-better-auth.session_token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/week")
.header("cookie", "__Secure-better-auth.session_token=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/week")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
response = http.request(request)
puts response.read_body{
"household": {
"name": "<string>"
},
"week": {
"id": "<string>",
"days": [
{
"date": "<string>",
"weekday": "seg",
"weather": {
"condition": "sun",
"minC": 123,
"maxC": 123
}
}
],
"previous": "<string>",
"next": "<string>",
"isCurrent": true
},
"items": [
{
"id": "<string>",
"activityId": "<string>",
"scheduleId": "<string>",
"date": "<string>",
"title": "<string>",
"subjects": [
{
"personId": "<string>",
"displayName": "<string>"
}
],
"assignee": {
"personId": "<string>",
"displayName": "<string>"
},
"mine": true,
"confidence": "confirmed",
"provenance": {
"sourceKind": "text",
"sourceRef": "<string>",
"authorId": "<string>",
"appliedAt": "2023-11-07T05:31:56Z",
"quote": "<string>"
},
"kind": "event",
"start": "<string>",
"suppressedBy": "exception",
"place": {
"name": "<string>",
"address": "<string>",
"mapUrl": "<string>"
},
"leaveAt": "<string>",
"reassignedFrom": {
"personId": "<string>",
"displayName": "<string>"
},
"reassignedBy": "<string>"
}
],
"bands": [
{
"id": "<string>",
"kind": "trip",
"label": "<string>",
"start": {
"date": "<string>",
"time": "<string>"
},
"end": {
"date": "<string>",
"time": "<string>"
},
"who": [
{
"personId": "<string>",
"displayName": "<string>"
}
],
"confidence": "confirmed",
"provenance": {
"sourceKind": "text",
"sourceRef": "<string>",
"authorId": "<string>",
"appliedAt": "2023-11-07T05:31:56Z",
"quote": "<string>"
}
}
]
}{
"code": "<string>",
"details": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"code": "request.timeout",
"correlationId": "<string>"
}{
"code": "request.timeout",
"correlationId": "<string>"
}Authorizations
sessiontoken
The session cookie set when you sign in to the web app.
Query Parameters
Maximum string length:
8Pattern:
^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])$