AgencyEdit(
    object Agency,
    bool WebhookEvaluate
)

Edit an existing Agency.

Works very similar to api/AgencyAdd but to identify which agency to edit provide the AgencyID key.

Request

Identifying the Agency:
You can identify the Agency to in three different ways:

  • Agency ID provide the ID inside the Agency object.
  • Agency Name provide the agency name inside the AGency object.

If the Agency ID is provided, the API will not attempt to use the name. If none are provided the API will require the ID.

Request Data:

  • (object) Agency
    • (int) AgencyID (required) – Identify the agency to edit by its ID.
    • (string) Agency (optional) – the agency name.
    • (string) Website (optional) – Website url.
    • (string) Address (optional) – the main streent information section of the Agency’s address
    • (string) City (optional) – the city section of the Agency’s address
    • (string) StateProvince (optional) – the State/Province section of the Agency’s address
    • (string) ZipPostalCode (optional) – the Zip/Postal code section of the Agency’s address
    • (object) Contact(optional) – the main contact information for the Agency:
      • (string) Salutation (optional) – it can be one these: “Mr”, “Ms”, “Dr”.
      • (string) FirstName (optional) – the contact’s first name.
      • (string) LastName (optional) – the contact’s last name.
      • (string) Title (optional) – the contact’s title or position.
      • (string) Email (optional) – the contact’s email.
      • (array) PhoneNumbers(optional) – a list of up to 4 phone numbers, each using the following structure:
        • (string) Number (optional) – the phone number.
        • (enum) Type (optional) – number indicating the type phone number it is: 1-Business, 2-Home, 3-Fax, 6-Other. There cannot be repeated types.
      • (array) Fields(optional) – a list of custom fields to fill in for the Agency, each using the following structure:
        • (string) Name (optional) – the custom field name.
        • (string) Value (optional) – the value to give the custom field.
  • (bool) WebhookEvaluate (optional, default=false) – Whether to evaluate any action related webhooks. (Since: RPM 22)
{
    "Agency": {
        "AgencyID": <int>,
        "Agency": <string>,
        "Website": <string>,
        "Address": <string>,
        "City": <string>,
        "StateProvince": <string>,
        "ZipPostalCode": <string>,
        "Contact": {
            "ContactID": <int>,
            "Email": <string>,
            "FirstName": <string>,
            "LastName": <string>,
            "PhoneNumbers": [
                {
                    "Number": <string>,
                    "PhoneNumberID": <int>,
                    "Type": <enum:
                        1=Business,
                        2=Home,
                        3=Fax,
                        6=Other
                    >
                },
                ... <More Results>
 
            ],
            "Salutation": <string>,
            "Title": <string>
        },
        "Fields": [
            {
                "Field": <string>,
                "Value": <string>
            },
            ... <More Custom Fields>
        ],
    }
}

Response

Same structure as api/Agency

Errors

  • “Agency not found”
  • “An agency with that name already exists”