Request rating plans for product states
curl --request POST \
--url https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"states": [
"<string>"
],
"note": "<string>"
}
'import requests
url = "https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests"
payload = {
"states": ["<string>"],
"note": "<string>"
}
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({states: ['<string>'], note: '<string>'})
};
fetch('https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests', 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.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests",
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([
'states' => [
'<string>'
],
'note' => '<string>'
]),
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.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests"
payload := strings.NewReader("{\n \"states\": [\n \"<string>\"\n ],\n \"note\": \"<string>\"\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.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"states\": [\n \"<string>\"\n ],\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests")
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 \"states\": [\n \"<string>\"\n ],\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"productId": "<string>",
"requests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "<string>",
"state": "<string>",
"status": "requested",
"note": "<string>",
"resolutionNote": "<string>",
"raterId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"created": true
}
]
}{
"productId": "<string>",
"requests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "<string>",
"state": "<string>",
"status": "requested",
"note": "<string>",
"resolutionNote": "<string>",
"raterId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"created": true
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}Products
Request rating plans for product states
Ask Effective to provide a rating plan for one or more of the product’s configured states. Each state gets its own request, which Effective staff resolve as available or unavailable; poll listProductRatingPlanRequests for the outcome. Safe to retry: a state that already has an open or available request is returned unchanged with created: false, and the note is not updated. An unavailable state is requested again. Returns 201 when any request was created, otherwise 200. Requires a writable user credential.
POST
/
insurance
/
products
/
{productId}
/
rating-plan-requests
Request rating plans for product states
curl --request POST \
--url https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"states": [
"<string>"
],
"note": "<string>"
}
'import requests
url = "https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests"
payload = {
"states": ["<string>"],
"note": "<string>"
}
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({states: ['<string>'], note: '<string>'})
};
fetch('https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests', 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.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests",
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([
'states' => [
'<string>'
],
'note' => '<string>'
]),
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.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests"
payload := strings.NewReader("{\n \"states\": [\n \"<string>\"\n ],\n \"note\": \"<string>\"\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.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"states\": [\n \"<string>\"\n ],\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.effectiveai.app/api/v2/insurance/products/{productId}/rating-plan-requests")
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 \"states\": [\n \"<string>\"\n ],\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"productId": "<string>",
"requests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "<string>",
"state": "<string>",
"status": "requested",
"note": "<string>",
"resolutionNote": "<string>",
"raterId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"created": true
}
]
}{
"productId": "<string>",
"requests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "<string>",
"state": "<string>",
"status": "requested",
"note": "<string>",
"resolutionNote": "<string>",
"raterId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"created": true
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>",
"dataset": "naic"
}Authorizations
Effective API key. Send Authorization: Bearer sk-eai-...
Path Parameters
Managed product_ ID or bare checked code; case-insensitive with Crockford aliases.
Body
application/json