AgencyAdd

AgencyAdd(
    object Agency,
    bool WebhookEvaluate
)

Creates a new Agency.

Request

Request Data:

  • (object) Agency
    • (string) Agency (optional) – Identify the agency name (if not provided the agency name will be “(no 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": {
        "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

  • “A unique agency name is required”