List teams you can bill
curl --request GET \
--url https://app.escrybe.com.br/api/v2/teams/{securityToken}import requests
url = "https://app.escrybe.com.br/api/v2/teams/{securityToken}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.escrybe.com.br/api/v2/teams/{securityToken}', 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://app.escrybe.com.br/api/v2/teams/{securityToken}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.escrybe.com.br/api/v2/teams/{securityToken}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.escrybe.com.br/api/v2/teams/{securityToken}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/v2/teams/{securityToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 200,
"status_message": "Sucesso",
"data": {
"teams": [
{
"team_member_id": 57,
"team_id": 12,
"team_name": "Financeiro",
"owner_name": "Acme Ltda",
"you_are_owner": false
}
]
}
}{
"status": 400,
"status_message": "Requisição incompleta",
"data": null
}{
"status": 401,
"status_message": "Token inválido",
"data": null
}Account & Favorites
List teams you can bill
The teams in which this account can bill an order with paymentMethod=team, each with the team_member_id the order endpoints require (letters, registered e-mail and WhatsApp). It is the same list as the “Times” group of the payment select on the panel’s send pages: active memberships only, and only teams whose owner is on a plan that allows invoicing. The team owner is listed too (you_are_owner: true), so an owner can bill their own team through the API with their own team_member_id. An empty teams list means there is nothing to bill to. The token is also accepted as the securityToken header or as Authorization: Bearer (then call /api/v2/teams without the path segment).
GET
/
api
/
v2
/
teams
/
{securityToken}
List teams you can bill
curl --request GET \
--url https://app.escrybe.com.br/api/v2/teams/{securityToken}import requests
url = "https://app.escrybe.com.br/api/v2/teams/{securityToken}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.escrybe.com.br/api/v2/teams/{securityToken}', 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://app.escrybe.com.br/api/v2/teams/{securityToken}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://app.escrybe.com.br/api/v2/teams/{securityToken}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.escrybe.com.br/api/v2/teams/{securityToken}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/v2/teams/{securityToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": 200,
"status_message": "Sucesso",
"data": {
"teams": [
{
"team_member_id": 57,
"team_id": 12,
"team_name": "Financeiro",
"owner_name": "Acme Ltda",
"you_are_owner": false
}
]
}
}{
"status": 400,
"status_message": "Requisição incompleta",
"data": null
}{
"status": 401,
"status_message": "Token inválido",
"data": null
}