Skip to content
English
  • There are no suggestions because the search field is empty.

API AgencyEdit

AgencyEdit(
    object Agency,
    bool WebhookEvaluate
)

Edit an existing Agency.

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 

{
  "Result": {
    "Agency": <string>,
    "AgencyID": <int>,
    "Archived": <bool>,
    "AgencyGroupID": <int>,
    "AgencyGroup": <string>,
    "Website": <string>,
    "Address": <string>,
    "City": <string>,
    "StateProvince": <string>,
    "Country": <string>,
    "ZipPostalCode": <string>,
    "Added": <string>,
    "Modified": <string>,
    "Contact": { // Note: before RPM20 all the attributes of Contact were directly under Result
      "ContactID": <int>,
      "Salutation": <string>,
      "FirstName": <string>,
      "LastName": <string>,
      "Title": <string>,
      "Email": <string>,
      "PhoneNumbers": [
        {
          "PhoneNumberID": <int>,
          "Type": <enum 1=Business, 2=Home, 3=Fax, 6=Other>,
          "Number": <string>
        }, // ... 3 more (1 per Type)
      ]
    },
    "Fields": [
      {
        "Field": <string>,
        "Uid": <string>,
        "Format": <int>,
        "Value": ""
      }, // ... More custom fields
    ],
    "Reps": [
      {
        "Rep": <string>,
        "RepID": <int>,
        "Type": <string>,
        "Username": <string>,
        "Enabled": <bool>, // Added in RPM27, replaced Logon
      }, // ... More Reps
    ],
    "NotesForStaff": [
      {
        "Added": <string>,
        "By": <string>,
        "Note": <string>
      }, //... More notes
    ],
    "SupplierExclusions": [
      {
        "Supplier": <string>,
        "SupplierID": <int>
      }, //... More Supplier exclusions
    ],
    "StaffAssignment": [
      {
        "Category": <string>,
        "Name": <string>,
        "StaffID": <int>,
        "Username": <string>
      }, //... More Staff Assignments
    ]
  }
}

Errors

  • “Agency not found”
  • “An agency with that name already exists”
Do Not Sell or Share My Personal Information