curl --request PATCH \
--url https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"draft": {
"trigger": {
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"course_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"exit_on_access_lost": true,
"exit_when": {
"rules": [
{
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"steps": [
{
"id": "<string>",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"text": "<string>",
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"amount": 1,
"days": 182
},
"condition": {
"rules": [
{
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"then": "<array>",
"else": "<array>"
}
]
}
}
'import requests
url = "https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}"
payload = {
"name": "<string>",
"draft": {
"trigger": {
"delivery_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"course_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"lesson_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"exit_on_access_lost": True,
"exit_when": { "rules": [
{
"negate": True,
"delivery_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cohort_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
] },
"steps": [
{
"id": "<string>",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"text": "<string>",
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"amount": 1,
"days": 182
},
"condition": { "rules": [
{
"negate": True,
"delivery_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cohort_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
] },
"then": "<array>",
"else": "<array>"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
draft: {
trigger: {
delivery_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
course_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
lesson_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
exit_on_access_lost: true,
exit_when: {
rules: [
{
negate: true,
delivery_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cohort_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
lesson_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
course_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
percent: 50,
step_id: '<string>'
}
]
},
steps: [
{
id: '<string>',
email: {
subject: '<string>',
preheader: '<string>',
reply_to: '<string>',
blocks: [
{
text: '<string>',
url: '<string>',
media_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
alt: '<string>'
}
]
},
wait: {amount: 1, days: 182},
condition: {
rules: [
{
negate: true,
delivery_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cohort_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
lesson_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
course_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
percent: 50,
step_id: '<string>'
}
]
},
then: '<array>',
else: '<array>'
}
]
}
})
};
fetch('https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}', 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.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'draft' => [
'trigger' => [
'delivery_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'course_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'lesson_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'exit_on_access_lost' => true,
'exit_when' => [
'rules' => [
[
'negate' => true,
'delivery_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cohort_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'lesson_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'course_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'percent' => 50,
'step_id' => '<string>'
]
]
],
'steps' => [
[
'id' => '<string>',
'email' => [
'subject' => '<string>',
'preheader' => '<string>',
'reply_to' => '<string>',
'blocks' => [
[
'text' => '<string>',
'url' => '<string>',
'media_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'alt' => '<string>'
]
]
],
'wait' => [
'amount' => 1,
'days' => 182
],
'condition' => [
'rules' => [
[
'negate' => true,
'delivery_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cohort_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'lesson_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'course_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'percent' => 50,
'step_id' => '<string>'
]
]
],
'then' => '<array>',
'else' => '<array>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"draft\": {\n \"trigger\": {\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"course_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"exit_on_access_lost\": true,\n \"exit_when\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"email\": {\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"reply_to\": \"<string>\",\n \"blocks\": [\n {\n \"text\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alt\": \"<string>\"\n }\n ]\n },\n \"wait\": {\n \"amount\": 1,\n \"days\": 182\n },\n \"condition\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"then\": \"<array>\",\n \"else\": \"<array>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"draft\": {\n \"trigger\": {\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"course_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"exit_on_access_lost\": true,\n \"exit_when\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"email\": {\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"reply_to\": \"<string>\",\n \"blocks\": [\n {\n \"text\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alt\": \"<string>\"\n }\n ]\n },\n \"wait\": {\n \"amount\": 1,\n \"days\": 182\n },\n \"condition\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"then\": \"<array>\",\n \"else\": \"<array>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"draft\": {\n \"trigger\": {\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"course_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"exit_on_access_lost\": true,\n \"exit_when\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"email\": {\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"reply_to\": \"<string>\",\n \"blocks\": [\n {\n \"text\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alt\": \"<string>\"\n }\n ]\n },\n \"wait\": {\n \"amount\": 1,\n \"days\": 182\n },\n \"condition\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"then\": \"<array>\",\n \"else\": \"<array>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "draft",
"draft": {
"trigger": {
"kind": "access_granted",
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"course_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"reentry": "once",
"exit_on_access_lost": true,
"exit_when": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"steps": [
{
"id": "<string>",
"kind": "send_email",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"kind": "heading",
"text": "<string>",
"level": 1,
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"kind": "delay",
"amount": 1,
"unit": "minutes",
"days": 182
},
"condition": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"then": "<array>",
"else": "<array>"
}
]
},
"active_runs": 123,
"total_runs": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"published": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 123,
"trigger_kind": "access_granted",
"published_at": "2023-11-07T05:31:56Z",
"definition": {
"trigger": {
"kind": "access_granted",
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"course_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"reentry": "once",
"exit_on_access_lost": true,
"exit_when": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"steps": [
{
"id": "<string>",
"kind": "send_email",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"kind": "heading",
"text": "<string>",
"level": 1,
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"kind": "delay",
"amount": 1,
"unit": "minutes",
"days": 182
},
"condition": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"then": "<array>",
"else": "<array>"
}
]
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Alterar automação
Mudar o rascunho não muda o que está rodando.
curl --request PATCH \
--url https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"draft": {
"trigger": {
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"course_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"exit_on_access_lost": true,
"exit_when": {
"rules": [
{
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"steps": [
{
"id": "<string>",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"text": "<string>",
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"amount": 1,
"days": 182
},
"condition": {
"rules": [
{
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"then": "<array>",
"else": "<array>"
}
]
}
}
'import requests
url = "https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}"
payload = {
"name": "<string>",
"draft": {
"trigger": {
"delivery_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"course_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"lesson_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"exit_on_access_lost": True,
"exit_when": { "rules": [
{
"negate": True,
"delivery_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cohort_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
] },
"steps": [
{
"id": "<string>",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"text": "<string>",
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"amount": 1,
"days": 182
},
"condition": { "rules": [
{
"negate": True,
"delivery_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"cohort_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
] },
"then": "<array>",
"else": "<array>"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
draft: {
trigger: {
delivery_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
course_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
lesson_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
exit_on_access_lost: true,
exit_when: {
rules: [
{
negate: true,
delivery_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cohort_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
lesson_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
course_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
percent: 50,
step_id: '<string>'
}
]
},
steps: [
{
id: '<string>',
email: {
subject: '<string>',
preheader: '<string>',
reply_to: '<string>',
blocks: [
{
text: '<string>',
url: '<string>',
media_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
alt: '<string>'
}
]
},
wait: {amount: 1, days: 182},
condition: {
rules: [
{
negate: true,
delivery_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
cohort_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
lesson_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
course_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
percent: 50,
step_id: '<string>'
}
]
},
then: '<array>',
else: '<array>'
}
]
}
})
};
fetch('https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}', 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.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'draft' => [
'trigger' => [
'delivery_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'course_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'lesson_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'exit_on_access_lost' => true,
'exit_when' => [
'rules' => [
[
'negate' => true,
'delivery_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cohort_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'lesson_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'course_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'percent' => 50,
'step_id' => '<string>'
]
]
],
'steps' => [
[
'id' => '<string>',
'email' => [
'subject' => '<string>',
'preheader' => '<string>',
'reply_to' => '<string>',
'blocks' => [
[
'text' => '<string>',
'url' => '<string>',
'media_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'alt' => '<string>'
]
]
],
'wait' => [
'amount' => 1,
'days' => 182
],
'condition' => [
'rules' => [
[
'negate' => true,
'delivery_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'cohort_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'lesson_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'course_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'percent' => 50,
'step_id' => '<string>'
]
]
],
'then' => '<array>',
'else' => '<array>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"draft\": {\n \"trigger\": {\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"course_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"exit_on_access_lost\": true,\n \"exit_when\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"email\": {\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"reply_to\": \"<string>\",\n \"blocks\": [\n {\n \"text\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alt\": \"<string>\"\n }\n ]\n },\n \"wait\": {\n \"amount\": 1,\n \"days\": 182\n },\n \"condition\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"then\": \"<array>\",\n \"else\": \"<array>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"draft\": {\n \"trigger\": {\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"course_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"exit_on_access_lost\": true,\n \"exit_when\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"email\": {\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"reply_to\": \"<string>\",\n \"blocks\": [\n {\n \"text\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alt\": \"<string>\"\n }\n ]\n },\n \"wait\": {\n \"amount\": 1,\n \"days\": 182\n },\n \"condition\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"then\": \"<array>\",\n \"else\": \"<array>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/{clubId}/workflows/{workflowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"draft\": {\n \"trigger\": {\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"course_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"exit_on_access_lost\": true,\n \"exit_when\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"steps\": [\n {\n \"id\": \"<string>\",\n \"email\": {\n \"subject\": \"<string>\",\n \"preheader\": \"<string>\",\n \"reply_to\": \"<string>\",\n \"blocks\": [\n {\n \"text\": \"<string>\",\n \"url\": \"<string>\",\n \"media_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"alt\": \"<string>\"\n }\n ]\n },\n \"wait\": {\n \"amount\": 1,\n \"days\": 182\n },\n \"condition\": {\n \"rules\": [\n {\n \"negate\": true,\n \"delivery_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"cohort_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"lesson_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"course_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"percent\": 50,\n \"step_id\": \"<string>\"\n }\n ]\n },\n \"then\": \"<array>\",\n \"else\": \"<array>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "draft",
"draft": {
"trigger": {
"kind": "access_granted",
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"course_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"reentry": "once",
"exit_on_access_lost": true,
"exit_when": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"steps": [
{
"id": "<string>",
"kind": "send_email",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"kind": "heading",
"text": "<string>",
"level": 1,
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"kind": "delay",
"amount": 1,
"unit": "minutes",
"days": 182
},
"condition": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"then": "<array>",
"else": "<array>"
}
]
},
"active_runs": 123,
"total_runs": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"published": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 123,
"trigger_kind": "access_granted",
"published_at": "2023-11-07T05:31:56Z",
"definition": {
"trigger": {
"kind": "access_granted",
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"course_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"reentry": "once",
"exit_on_access_lost": true,
"exit_when": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"steps": [
{
"id": "<string>",
"kind": "send_email",
"email": {
"subject": "<string>",
"preheader": "<string>",
"reply_to": "<string>",
"blocks": [
{
"kind": "heading",
"text": "<string>",
"level": 1,
"url": "<string>",
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"alt": "<string>"
}
]
},
"wait": {
"kind": "delay",
"amount": 1,
"unit": "minutes",
"days": 182
},
"condition": {
"match": "all",
"rules": [
{
"kind": "has_access",
"negate": true,
"delivery_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"cohort_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"percent": 50,
"step_id": "<string>"
}
]
},
"then": "<array>",
"else": "<array>"
}
]
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Token OPACO de sessão de quem administra, emitido por
/v1/auth/admin/sign-in e verificado contra a nossa tabela — o mesmo
desenho do studentSession, para a outra identidade.
É o esquema de quem ADMINISTRA — o dashboard. O aluno do classroom usa o
studentSession; uma rota consumida pelos dois declara os dois
esquemas, e o middleware aceita qualquer um deles. As duas credenciais
são opacas e chegam pelo mesmo cabeçalho: quem as separa é a tabela em
que cada uma existe.
O dashboard o guarda em cookie httpOnly, que o BFF troca pelo
Authorization a cada chamada.
Path Parameters
Id público da organização — o mesmo que GET /v1/me devolve em
organization_id.
Na URL o recurso se chama club; no contrato e no domínio, organization.
A divergência é deliberada: clubs é a palavra do produto, e a URL é o que
as pessoas leem.
É o identificador do provedor de autenticação, e é assim de propósito: o cliente precisa nomear a organização ao pedir o token, e o token é o que prova o escopo. Um id só nosso obrigaria a traduzir um no outro antes de ter um token — e a tradução exigiria uma chamada escopada, que é justamente a que ainda não dá para fazer.
O uuid interno da organização não aparece no contrato: ele é o que as chaves estrangeiras do domínio referenciam, e continua sendo nosso.
Body
1 - 120A automação inteira. reentry diz quantas vezes a mesma pessoa passa por
ela: once (padrão, uma vez na vida), one_at_a_time (a cada evento,
mas nunca duas em curso) ou always (uma por evento).
exit_on_access_lost encerra a execução quando a matrícula que disparou
é revogada ou vence (só access_granted). exit_when é a meta, conferida
antes de cada passo.
Show child attributes
Show child attributes
Response
A automação
Show child attributes
Show child attributes