Producer codes
In PolicyCenter, a producer refers to any third party who brings business to the insurer, such as an agent or broker. A producer code is an identifier used in Guidewire systems to reference a specific producer.
With the Admin API, callers can create, update, and retrieve producer code data through the
/admin/v1/producer-codes
endpoints. Typically, internal services associated
with administrator or underwriter roles are authorized to access the
producer-codes
endpoints.
Querying for producer codes
Authorized internal users can query for producer codes. Callers can use the following endpoints to GET producer code resources:
- GET
/admin/v1/producer-codes
: Returns all producer codes - GET
/admin/v1/producer-codes/{producerCodeId}
: Returns a resource for the given producer code - GET
/admin/v1/organizations/{organizationId}/producer-codes
: Returns all producer codes associated with the given organization - GET
/admin/v1/organizations/{organizationId}/producer-codes/{producerCodeId}
: Returns a resource for the given producer code associated with the given organization
Alternatively, callers can use the Account API to retrieve producer codes through the
/account/v1/producer-codes
endpoint. Calls to this endpoint return a
collection of producer codes that are available to the caller. This endpoint is useful when
creating policy submissions.
Creating producer codes
Authorized internal users can create producer codes. To create a producer code, callers can
submit a POST request to the /admin/v1/producer-codes
endpoint. At
minimum, the request body must contain the following fields:
code
: The public code for the producerorganization.id
: The ID for the producer organizationroles
: An array of one or more roles associated with the producer. Each role is an object containing anid
field associated with a valid value.
{
"data": {
"attributes": {
"code": "301-008578",
"organization": {
"id": "pc:4"
},
"roles": [
{
"id": "producer"
}
]
}
}
}
The request body can also contain the following optional fields:
address
: An Address resourceappointmentDate
: A UTC timestamp indicating appointment datebranch.id
: The ID for the branch officedescription
: A stringparent.id
: The ID for the parent organizationpreferredUnderwriter.id
: The ID for the preferred underwriterproducerStatus
: The status of the producerterminationDate
: A UTC timestamp indicating termination date
Updating producer codes
Authorized internal users can update producer codes. To update a producer code, callers can
submit a PATCH request to the
/admin/v1/producer-codes/{producerCodeId}
endpoint.
Managing a user's producer codes
By default, PolicyCenter users who have sufficient permission to work on policies can work on any policy in the database. PolicyCenter can also restrict a user's access to only the policies with a certain set of producer codes. This feature is known as producer code security.
Producer code security lets you associate specific producer codes with a group or with a user. When a user is subject to producer code security, they can only interact with policies whose producer code is associate with them directly or with a group they belong to.
For more information on producer code security, see the Application Guide.
You can manage a user's producer codes through Cloud API. As of this release, there are no endpoints for managing the association between producer codes and groups.
The UserProducerCode
endpoints
Users and producer codes are tracked as separate User
and
ProducerCode
entities. There is a third entity,
UserProducerCode
, whose purpose is to track information about
one association between a user and a producer code. When you call an endpoint that
ends with "/{userId}/producer-codes
", you are retrieving,
creating, or modifying instances of UserProducerCode
. Note the
following:
- The id field in a
UserProducerCode
instance is the id of the association. - When you create or delete a
UserProducerCode
instance, you are not creating or deleting producer codes. You are only creating or deleting associations between users and producer codes.
The UserProducerCode
endpoints can be used only on users that are
subject to producer code security.
Querying for a user's producer codes
To retrieve information about a user's producer codes, use the following endpoints:
- GET
/admin/v1/users/{userId}/producer-codes
- GET
/admin/v1/users/{userId}/producer-codes/{producerCodeId}
GET /admin/v1/users/pc:305/producer-codes
{
"count": 1,
"data": [
{
"attributes": {
"id": "pc:707",
"producerCode": {
"displayName": "301-008578",
"id": "pc:535"
},
"roles": [
{
"displayName": "Producer Code - Submissions",
"id": "producercode_submission",
"type": "Role",
"uri": "/admin/v1/roles/producercode_submission"
}
]
}
...
Associating producer codes with users
Creating an association
To associate a producer code with a user, use the following endpoint:
- POST
/admin/v1/users/{userId}/producer-codes
The only required field is the id of the producer code to be associated with the user.
For example, the following request associates producer code pc:535 with user pc:310.
POST /admin/v1/users/pc:310/producer-codes
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:535"
}
}
}
}
Deleting an association
To remove the association between a producer code and a user, use the following endpoint:
- DELETE
/admin/v1/users/{userId}/producer-codes/{producerCodeId}
For example, the following request disassociates producer code pc:535 with user pc:310.
DELETE /admin/v1/users/pc:310/producer-codes/pc:535
<no request body>
Exposing producer codes to external users
By default, producer codes are not exposed to external users. An external user is a user that is not in the PolicyCenter database, such as an account holder.
In the PolicyCenter config.xml
configuration file, the
ExternallyVisibleProducerCodes
parameter can be used to expose one or
more producer codes to external users. The parameter accepts a comma-separated list of
producer codes, in string format:
<param name="ExternallyVisibleProducerCodes" value="ProdCode1,ProdCode2"/>
For details on PolicyCenter configuration, see the Configuration Guide.