Registra um Plano Anual
curl --request POST \
--url https://homolog.clubfix.com.br/webservice/annual-plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://homolog.clubfix.com.br/webservice/annual-plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://homolog.clubfix.com.br/webservice/annual-plans', 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://homolog.clubfix.com.br/webservice/annual-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://homolog.clubfix.com.br/webservice/annual-plans"
req, _ := http.NewRequest("POST", 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.post("https://homolog.clubfix.com.br/webservice/annual-plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://homolog.clubfix.com.br/webservice/annual-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyPlanos Anuais
Registra um Plano Anual
Contrata uma proteção anual com pagamento único para o dispositivo do cliente
POST
/
annual-plans
Registra um Plano Anual
curl --request POST \
--url https://homolog.clubfix.com.br/webservice/annual-plans \
--header 'Authorization: Bearer <token>'import requests
url = "https://homolog.clubfix.com.br/webservice/annual-plans"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://homolog.clubfix.com.br/webservice/annual-plans', 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://homolog.clubfix.com.br/webservice/annual-plans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://homolog.clubfix.com.br/webservice/annual-plans"
req, _ := http.NewRequest("POST", 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.post("https://homolog.clubfix.com.br/webservice/annual-plans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://homolog.clubfix.com.br/webservice/annual-plans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodystring
required
Token de autenticação do tipo Bearer obtido através do endpoint de login.
string
required
Deve ser definido como
application/json.string
required
Deve ser definido como
application/json.integer
required
ID do modelo do dispositivo a ser protegido. Obtido via
GET /models. O modelo deve estar ativo e não listado como indisponível.integer
required
ID do cliente (segurado). Obtido via
POST /customers ou GET /customers/{document}.integer
required
ID do plano de proteção (apólice). Vinculado ao parceiro autenticado — verificar quais estão disponíveis com o suporte ClubFix.
string
required
IMEI principal do dispositivo. Deve ser diferente de
imei_2 quando ambos forem informados.string
Segundo IMEI para aparelhos dual-SIM. Opcional. Deve ser diferente de
imei.boolean
Indica se o dispositivo possui mais de 3 meses de uso.
true ou false. Padrão: false.integer
ID de uma sub-loja vinculada ao parceiro. Opcional — permite atribuir a venda a uma filial. Obtido via
GET /shopkeepers.number
Valor do LMI (Limite Máximo de Indenização) desejado. Validado contra a faixa autorizada do parceiro — se fora da faixa, usa o padrão do modelo sem gerar erro.
object
Dados de pagamento. Obrigatório para parceiros com gateway externo. Ignorado para parceiros com gateway ClubFix (o pagamento é processado via
POST /annual-plans/{id}/payment).string
Método de pagamento. Valores:
credit_card, slip, pix. Obrigatório quando payment for informado.integer
Número de parcelas para pagamento no cartão de crédito. Inteiro entre
1 e 12. Obrigatório quando payment.method for credit_card.Resposta
Retorna o recurso do Plano Anual criado.| Campo | Tipo | Descrição |
|---|---|---|
id | integer | Identificador do plano. Usar nas chamadas de pagamento e cancelamento |
status | string | awaiting_payment — aguardando confirmação de pagamento |
lmi | number | LMI aplicado ao contrato |
premium | number | Prêmio total do plano anual |
Para parceiros com gateway ClubFix: após criar o plano, chame
POST /annual-plans/{id}/payment para processar o pagamento.Para parceiros com gateway externo: realize a cobrança no seu sistema e chame POST /annual-plans/{id}/notify-payment para ativar o plano.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200
Success
Was this page helpful?
