Producer contacts

A producer contact is a person or company that represents or is associated with a producer.

Producer contacts have contact information and can have one or more roles. A contact role is an identification of the role or relationship that a given contact has with its parent object. In the base configuration, the two available roles for producer contacts are "primary" and "secondary." A producer can only have one primary contact.

In the base configuration:
  • The primary contact is set as the payee when BillingCenter makes commission payments.
  • There is no functionality tied to secondary contacts.

For more information, see Producer contacts.

Querying for producer contacts

Query for producer contacts using the following endpoints:

  • GET /producers/{producerId}/contacts
  • GET /producers/{producerId}/contacts/{contactId}

The following example call retrieves all of the contacts on a producer:

Command
GET /billing/v1/producers/bc:186/contacts
Response
{
    "count": 1,
    "data": [
        {
            "attributes": {
                "authorizationID": "SQOA9JWaJwI0315-b71bv",
                "contactSubtype": "Person",
                "displayName": "Bill Baker",
                "emailAddress1": "producer@guidewire.com",
                "firstName": "Bill",
                "id": "bc:SXwewVPiEPAqZwsZ3pUsr",
                ...
	     }
	 }
    ]
}   

Creating producer contacts

Create a producer contact using the following endpoint:

  • POST /producers/{producerId}/contacts
The following fields are required when creating a producer contact.
  • contactSubtype - An entry from the contact typelist, as a string. In the base configuration, the only accepted values are person and company.
  • companyName - The name of the company.
    • Required only if the contact is a company
  • lastName - The last name of the person.
    • Required only if the contact is a person or one of its subtypes

Minimal producer contact example

The following is a minimal request to create a company contact on a producer:

Command
POST /billing/v1/producers/bc:187/contacts
Request body
{
    "data": {
        "attributes": {
            "contactSubtype": "company",
            "companyName": "Producers Inc."
        }
    }
}

Specifying roles and additional information

When creating producer contacts through Cloud API, you can specify a contact’s roles. Take note of the following when working with contact roles:
  • When you create a producer through the user interface, the producer must have a primary contact. This is not enforced when creating producer contacts through Cloud API. You can create contacts with no roles or with non-primary roles, even when the producer does not have a primary contact.
  • A producer contact cannot have duplicate roles.
  • If there is already a primary contact on the producer, another contact with the "primary" role cannot be created. However, any number of contacts with the "secondary" role can be created.

The following call creates a person contact as the primary producer contact. It also specifies additional contact information: a cell phone number, primary address, and the contact’s gender and pronouns.

Command
POST /billing/v1/producers/bc:187/contacts
Request body
{
    "data": {
        "attributes": {
            "cellPhone": {
                "countryCode": {
                    "code": "US"
                },
                "number": "555-408-1324"
            },
            "contactSubtype": "person",
            "lastName": "Smith",
            "firstName": "John",
            "roles": [
                {
                    "code": "primary"
                }
            ],
            "primaryAddress": {
                "addressLine1": "10 Main St.",
                "city": "San Mateo",
                "country": "US",
                "postalCode": "94403"
            }
            "gender": {
                "code": "m"
            },
            "pronounAggregate": {
                "code": "hehimhis"
            }
        }
    }
}

Modifying producer contacts

Modify producer contacts with the following endpoint:

  • PATCH /producers/{producerId}/contacts/{contactId}

For example, the following request sets the contact with id bc:196 to the primary contact for producer bc:188.

Command
PATCH /billing/v1/producers/bc:188/contacts/bc:196
Request body
{
    "data": {
        "attributes": {
            "roles": [
                {
                    "code": "primary"
                }
            ]
        }
    }
}

Deleting producer contacts

Delete producer contacts using the following endpoint:
  • DELETE /producers/{producerId}/contacts/{contactId}

The following deletes a producer contact:

Command
DELETE /billing/v1/producers/bc:188/contacts/bc:196

The command returns a success message with no body.