Create and Manage Distributors
Distributors are the top of the producer hierarchy, as a hub for all of your producers and groups.
A distributor is any organization that distributes Commercial Insurance, acting as an intermediary between an insurance carrier and producers (insurance agents and brokers). When creating producers with Heralds API, distributors serve as a layer between your platform and producers.
You must create a distributor before you can create a producer.
Create a Distributor
You can create a distributor using [.h-code]POST[.h-code] [.h-endpoint-link]/distributors[.h-endpoint-link] which only requires the distributors [.h-code]name[.h-code] and [.h-code]domains[.h-code]. Creating a distributor should look the example below.
As shown above, the response includes the information above as well as:
- The [.h-code]id[.h-code] for the distributor.
- An array of [.h-code]groups[.h-code] that belong to the distributor
- An array of [.h-code]producers[.h-code] that belong to the distributor
- An array of [.h-code]products[.h-code] the distributor has access to.
Note that when creating a new distributor, groups, producers, and products will all be [.h-code]null[.h-code]. As you create new groups and producers below this distributor, and give this distributor access to products, those relationships will be present in the response. You can get this information using [.h-code]GET[.h-code] [.h-endpoint-link]/distributors/{distributor_id}[.h-endpoint-link].
[.icon-circle-blue][.icon-circle-blue] Producers, groups, and products are read only in the distributors object. To add a producer or group to a distributor, you simply create a new producer or group which requires a [.h-code]distributor_id[.h-code]. A distributor's products are managed by Herald's team.
Get all Distributors
You can get a list of all your distributors using [.h-code]GET[.h-code] [.h-endpoint-link]/distributors[.h-endpoint-link]. The response will include an array of all distributors you have created. In the example above, we created a new distributor. Let’s look at an example response assuming that you have already created a distributor with groups, producers, and products in the past.
As you can see in the response above, the distributor that already has producers, groups, and products includes an array of objects for each concept.
- Each Group in the array contains the groups [.h-code]id[.h-code], [.h-code]typ[.h-code]e, and [.h-code]value[.h-code].
- Each Producer in the array contains the producers [.h-code]id[.h-code], [.h-code]name[.h-code], [.h-code]email[.h-code], and [.h-code]external_id[.h-code] (if you’ve provided one).
- Each Product in the array contains the products [.h-code]id[.h-code], [.h-code]name[.h-code], [.h-code]institution_id[.h-code], and [.h-code]product_line[.h-code].
Update a Distributor
You can update a distributor using [.h-code]PUT[.h-code] [.h-endpoint-link]/distributors/{distributor_id}[.h-endpoint-link] which allows you to update the distributors [.h-code]name[.h-code] and [.h-code]domains[.h-code]. The body to update a distributor should look identical to the body for creating a distributor. Let’s say we want to change the name of the distributor we created earlier, the request would look like this:
Get a Distributor
Similar to getting all distributors, you can get the details of an individual distributor using [.h-code]GET[.h-code] [.h-endpoint-link]/distributors/{distributor_id}[.h-endpoint-link] which will provide the details for that distributor. See an example below.
Adding Producers and Groups
Once you’ve created a distributor, you can create producers and create groups below that distributor. Creating a producer or group requires a [.h-code]distributor_id[.h-code].