Retorna os dados completos do colaborador
curl --request GET \
--url https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail} \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}', 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://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <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://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "Nome",
"surname": "Sobrenome",
"email": "email@email.com",
"cellphone": "(00) 00000-0000",
"role": "Vendedor",
"address": {
"CEP": "00000-000",
"state": "SC",
"city": "Nome da Cidade",
"neighborhood": "Nome do Bairro",
"patio": "Nome da Rua",
"number": "1000",
"complement": "Bloco X, Casa Y"
},
"responsibleByCompanies": [
{
"cnpj": "00.000.000/0000-00",
"cpf": "000.000.000-00",
"fantasyName": "Nome fantasia",
"companyName": "Razão social",
"mainContact": {
"name": "Nome",
"surname": "Sobrenome",
"email": "email@email.com",
"cellphone": "(00) 00000-0000",
"address": {
"CEP": "00000-000",
"state": "SC",
"city": "Nome da Cidade",
"neighborhood": "Nome do Bairro",
"patio": "Nome da Rua",
"number": "1000",
"complement": "Bloco X, Casa Y"
}
},
"address": {
"CEP": "00000-000",
"state": "SC",
"city": "Nome da Cidade",
"neighborhood": "Nome do Bairro",
"patio": "Nome da Rua",
"number": "1000",
"complement": "Bloco X, Casa Y"
}
}
],
"budgets": [
"200000000"
],
"orders": [
"200000000"
]
}Colaboradores
Retorna os dados completos do colaborador
Retorna os dados completos do colaborador, incluindo a lista de todos os orçamentos, pedidos e empresas de energia no qual este colaborador é responsável.
GET
/
staff
/
{staffEmail}
Retorna os dados completos do colaborador
curl --request GET \
--url https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail} \
--header 'Authorization: Bearer <token>'import requests
url = "https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}', 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://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <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://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend-pied-prod.piedadmin.com.br/api/v1/staff/{staffEmail}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "Nome",
"surname": "Sobrenome",
"email": "email@email.com",
"cellphone": "(00) 00000-0000",
"role": "Vendedor",
"address": {
"CEP": "00000-000",
"state": "SC",
"city": "Nome da Cidade",
"neighborhood": "Nome do Bairro",
"patio": "Nome da Rua",
"number": "1000",
"complement": "Bloco X, Casa Y"
},
"responsibleByCompanies": [
{
"cnpj": "00.000.000/0000-00",
"cpf": "000.000.000-00",
"fantasyName": "Nome fantasia",
"companyName": "Razão social",
"mainContact": {
"name": "Nome",
"surname": "Sobrenome",
"email": "email@email.com",
"cellphone": "(00) 00000-0000",
"address": {
"CEP": "00000-000",
"state": "SC",
"city": "Nome da Cidade",
"neighborhood": "Nome do Bairro",
"patio": "Nome da Rua",
"number": "1000",
"complement": "Bloco X, Casa Y"
}
},
"address": {
"CEP": "00000-000",
"state": "SC",
"city": "Nome da Cidade",
"neighborhood": "Nome do Bairro",
"patio": "Nome da Rua",
"number": "1000",
"complement": "Bloco X, Casa Y"
}
}
],
"budgets": [
"200000000"
],
"orders": [
"200000000"
]
}API v1 - Este endpoint está disponível apenas na v1
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Determina o e-mail do colaborador a ser retornado.