Inclusão de benefício em membro existente
curl --request POST \
--url https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company-tax-id": "12345678000190",
"member-benefits": {
"beneficiary-type": "primary",
"products": {
"health-insurance": [
{
"name": "Plano Saúde Premium",
"start-option": "on-inclusion-date"
}
]
}
}
}
'import requests
url = "https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}"
payload = {
"company-tax-id": "12345678000190",
"member-benefits": {
"beneficiary-type": "primary",
"products": { "health-insurance": [
{
"name": "Plano Saúde Premium",
"start-option": "on-inclusion-date"
}
] }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'company-tax-id': '12345678000190',
'member-benefits': {
'beneficiary-type': 'primary',
products: {
'health-insurance': [{name: 'Plano Saúde Premium', 'start-option': 'on-inclusion-date'}]
}
}
})
};
fetch('https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}', 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.pipo.health/v1/enrollment/inclusion/{member-tax-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'company-tax-id' => '12345678000190',
'member-benefits' => [
'beneficiary-type' => 'primary',
'products' => [
'health-insurance' => [
[
'name' => 'Plano Saúde Premium',
'start-option' => 'on-inclusion-date'
]
]
]
]
]),
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.pipo.health/v1/enrollment/inclusion/{member-tax-id}"
payload := strings.NewReader("{\n \"company-tax-id\": \"12345678000190\",\n \"member-benefits\": {\n \"beneficiary-type\": \"primary\",\n \"products\": {\n \"health-insurance\": [\n {\n \"name\": \"Plano Saúde Premium\",\n \"start-option\": \"on-inclusion-date\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company-tax-id\": \"12345678000190\",\n \"member-benefits\": {\n \"beneficiary-type\": \"primary\",\n \"products\": {\n \"health-insurance\": [\n {\n \"name\": \"Plano Saúde Premium\",\n \"start-option\": \"on-inclusion-date\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company-tax-id\": \"12345678000190\",\n \"member-benefits\": {\n \"beneficiary-type\": \"primary\",\n \"products\": {\n \"health-insurance\": [\n {\n \"name\": \"Plano Saúde Premium\",\n \"start-option\": \"on-inclusion-date\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"request-id": "aaa11111-e89b-12d3-a456-426614174006"
}{
"error": "Member is not primary with the specified company"
}{
"error": "Not entitled to modify this member"
}{
"result": {
"beneficiary-type": "primary",
"company-tax-id": "12345678000190",
"products": {
"health-insurance": [
{
"name": "Plano Saúde Premium",
"start-option": "on-inclusion-date"
}
]
},
"offenses": [
"product-health-insurance-0-already-exists"
]
}
}Inclusão de benefício em membro existente
Inclui um novo benefício para um membro já existente.
POST
/
v1
/
enrollment
/
inclusion
/
{member-tax-id}
Inclusão de benefício em membro existente
curl --request POST \
--url https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company-tax-id": "12345678000190",
"member-benefits": {
"beneficiary-type": "primary",
"products": {
"health-insurance": [
{
"name": "Plano Saúde Premium",
"start-option": "on-inclusion-date"
}
]
}
}
}
'import requests
url = "https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}"
payload = {
"company-tax-id": "12345678000190",
"member-benefits": {
"beneficiary-type": "primary",
"products": { "health-insurance": [
{
"name": "Plano Saúde Premium",
"start-option": "on-inclusion-date"
}
] }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'company-tax-id': '12345678000190',
'member-benefits': {
'beneficiary-type': 'primary',
products: {
'health-insurance': [{name: 'Plano Saúde Premium', 'start-option': 'on-inclusion-date'}]
}
}
})
};
fetch('https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}', 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.pipo.health/v1/enrollment/inclusion/{member-tax-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'company-tax-id' => '12345678000190',
'member-benefits' => [
'beneficiary-type' => 'primary',
'products' => [
'health-insurance' => [
[
'name' => 'Plano Saúde Premium',
'start-option' => 'on-inclusion-date'
]
]
]
]
]),
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.pipo.health/v1/enrollment/inclusion/{member-tax-id}"
payload := strings.NewReader("{\n \"company-tax-id\": \"12345678000190\",\n \"member-benefits\": {\n \"beneficiary-type\": \"primary\",\n \"products\": {\n \"health-insurance\": [\n {\n \"name\": \"Plano Saúde Premium\",\n \"start-option\": \"on-inclusion-date\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company-tax-id\": \"12345678000190\",\n \"member-benefits\": {\n \"beneficiary-type\": \"primary\",\n \"products\": {\n \"health-insurance\": [\n {\n \"name\": \"Plano Saúde Premium\",\n \"start-option\": \"on-inclusion-date\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pipo.health/v1/enrollment/inclusion/{member-tax-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company-tax-id\": \"12345678000190\",\n \"member-benefits\": {\n \"beneficiary-type\": \"primary\",\n \"products\": {\n \"health-insurance\": [\n {\n \"name\": \"Plano Saúde Premium\",\n \"start-option\": \"on-inclusion-date\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"request-id": "aaa11111-e89b-12d3-a456-426614174006"
}{
"error": "Member is not primary with the specified company"
}{
"error": "Not entitled to modify this member"
}{
"result": {
"beneficiary-type": "primary",
"company-tax-id": "12345678000190",
"products": {
"health-insurance": [
{
"name": "Plano Saúde Premium",
"start-option": "on-inclusion-date"
}
]
},
"offenses": [
"product-health-insurance-0-already-exists"
]
}
}Authorizations
Token Bearer obtido em POST /v1/authenticate.
Path Parameters
CPF do membro. CPF (Cadastro de Pessoas Físicas). Aceita apenas dígitos ou formatado.
Examples:
"12345678900"
"123.456.789-00"
Query Parameters
Resolve automaticamente a movimentação: approve aprova; reject rejeita.
Esta opção existe apenas no ambiente de Homologação, para testes.
Available options:
approve, reject Body
application/json
Response
Movimentação processada com sucesso.
Identificador da requisição. Use em GET /v1/request/{request-id}.