Vincula um plano ao veículo
curl --request POST \
--url https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contractPlanId": 73
}
'import requests
url = "https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans"
payload = { "contractPlanId": 73 }
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({contractPlanId: 73})
};
fetch('https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/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://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans",
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([
'contractPlanId' => 73
]),
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-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans"
payload := strings.NewReader("{\n \"contractPlanId\": 73\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-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contractPlanId\": 73\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans")
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 \"contractPlanId\": 73\n}"
response = http.request(request)
puts response.read_body{
"data": {
"contractPlanId": 73,
"contractCode": "CT-2026-0001",
"planName": "Plano Proteção Total",
"appliesTo": "VEHICLE",
"linkedTo": "VEHICLE",
"vehicleId": 9001,
"startedAt": "2026-08-20T13:05:00.000Z"
},
"meta": {},
"errors": []
}{
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "customerDocument: Documento do cliente é obrigatório",
"field": "customerDocument"
}
]
}{
"data": null,
"errors": [
{
"code": "INVALID_TOKEN",
"message": "Token inválido."
}
]
}{
"data": null,
"errors": [
{
"code": "INSUFFICIENT_SCOPE",
"message": "Escopo insuficiente para este endpoint.",
"details": {
"requiredScope": "attendances.read"
}
}
]
}{
"data": null,
"errors": [
{
"code": "NOT_FOUND",
"message": "Attendance not found"
}
]
}{
"data": null,
"errors": [
{
"code": "PLAN_ALREADY_LINKED",
"message": "Este plano já está vigente para este beneficiário",
"details": {
"beneficiaryPlanId": 3101
}
}
]
}{
"data": null,
"errors": [
{
"code": "PLAN_NOT_AVAILABLE",
"message": "Plano inativo neste contrato"
}
]
}{
"data": null,
"errors": [
{
"code": "RATE_LIMITED",
"message": "Limite de requisições excedido.",
"details": {
"retryAfterSeconds": 42
}
}
]
}{
"data": null,
"errors": [
{
"code": "FEATURE_DISABLED",
"message": "Feature is disabled: public_api.enabled"
}
]
}vehicles
Vincula um plano ao veículo
Vincula um plano do contrato (o contractPlanId de GET /v1/company) ao veículo informado. Só planos com appliesTo: VEHICLE — um plano de cliente devolve 422 PLAN_TARGET_MISMATCH (use POST /v1/customers/{id}/plans). Plano inativo ou contrato fora de vigência devolve 422 PLAN_NOT_AVAILABLE; o mesmo plano já vigente no veículo devolve 409 PLAN_ALREADY_LINKED com details.beneficiaryPlanId apontando o vínculo existente. Veículo ou plano de outra contratante devolve 404.
POST
/
v1
/
vehicles
/
{id}
/
plans
Vincula um plano ao veículo
curl --request POST \
--url https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contractPlanId": 73
}
'import requests
url = "https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans"
payload = { "contractPlanId": 73 }
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({contractPlanId: 73})
};
fetch('https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/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://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans",
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([
'contractPlanId' => 73
]),
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-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans"
payload := strings.NewReader("{\n \"contractPlanId\": 73\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-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contractPlanId\": 73\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-koolisys.eixoassistencia.com.br/v1/vehicles/{id}/plans")
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 \"contractPlanId\": 73\n}"
response = http.request(request)
puts response.read_body{
"data": {
"contractPlanId": 73,
"contractCode": "CT-2026-0001",
"planName": "Plano Proteção Total",
"appliesTo": "VEHICLE",
"linkedTo": "VEHICLE",
"vehicleId": 9001,
"startedAt": "2026-08-20T13:05:00.000Z"
},
"meta": {},
"errors": []
}{
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "customerDocument: Documento do cliente é obrigatório",
"field": "customerDocument"
}
]
}{
"data": null,
"errors": [
{
"code": "INVALID_TOKEN",
"message": "Token inválido."
}
]
}{
"data": null,
"errors": [
{
"code": "INSUFFICIENT_SCOPE",
"message": "Escopo insuficiente para este endpoint.",
"details": {
"requiredScope": "attendances.read"
}
}
]
}{
"data": null,
"errors": [
{
"code": "NOT_FOUND",
"message": "Attendance not found"
}
]
}{
"data": null,
"errors": [
{
"code": "PLAN_ALREADY_LINKED",
"message": "Este plano já está vigente para este beneficiário",
"details": {
"beneficiaryPlanId": 3101
}
}
]
}{
"data": null,
"errors": [
{
"code": "PLAN_NOT_AVAILABLE",
"message": "Plano inativo neste contrato"
}
]
}{
"data": null,
"errors": [
{
"code": "RATE_LIMITED",
"message": "Limite de requisições excedido.",
"details": {
"retryAfterSeconds": 42
}
}
]
}{
"data": null,
"errors": [
{
"code": "FEATURE_DISABLED",
"message": "Feature is disabled: public_api.enabled"
}
]
}Authorizations
Token de curta duração devolvido por POST /v1/auth/token, carregando os escopos concedidos à chave — exigido por todo endpoint de dados.
Path Parameters
Example:
9001
Body
application/json
Identificador do plano dentro do contrato — o mesmo contractPlanId devolvido por GET /v1/company.
Example:
73
