Skip to main content
GET
/
policies
/
{policyId}
/
branches
List branches on the policy
curl --request GET \
  --url https://api.example.com/policies/{policyId}/branches
import requests

url = "https://api.example.com/policies/{policyId}/branches"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/policies/{policyId}/branches', 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.example.com/policies/{policyId}/branches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://api.example.com/policies/{policyId}/branches"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/policies/{policyId}/branches")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/policies/{policyId}/branches")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "total": 123,
  "offset": 123,
  "limit": 123,
  "data": [
    {
      "id": "<string>",
      "type": "BRANCH",
      "createdAt": "<string>",
      "lastModifiedAt": "<string>",
      "name": "<string>",
      "mergedAt": "<string>",
      "derogations": [
        {
          "derogationId": "<string>",
          "createdAt": "<string>"
        }
      ]
    }
  ]
}
{
"title": "FORBIDDEN"
}
{
"title": "POLICY_NOT_FOUND"
}

Path Parameters

policyId
string
required

the policy id

Query Parameters

whenAt
string

Optional: the whenAt datetime

simulatedAt
string

Optional: the simulatedAt datetime

branchType
enum<string>

the branch type

Available options:
BASE,
NEW_BUSINESS,
MTA,
RENEWAL,
REPRICING
branchStatus
enum<string>

the branch status

Available options:
BRANCH_OPEN,
BRANCH_MERGED,
BRANCH_CLOSED

Response

total
number
required

Total number of policies

offset
number
required

Offset used for pagination

limit
number
required

Page size used for pagination

data
object[]
required

List of policies