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

API 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)
{
  "WebhookEvaluate": <boolean>, 
  "Agency": {
    "Agency": <string>,
    "Website": <string>,
    "Address": <string>,
    "City": <string>,
    "StateProvince": <string>,
    "ZipPostalCode": <string>,
    "Country": <string>,
    "Contact": {
      "Email": <string>,
      "FirstName": <string>,
      "LastName": <string>,
      "Salutation": <string>,
      "Title": <string>,
      "PhoneNumbers": [
        {
          "Number": <string>,
          "Type": <integer>
        }

      ]
    },
    "Fields": [
      {
        "Field": <string>,
        "Value": <string>
      }

    ]   
}

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

  • “A unique agency name is required”
  • "Agency group not found"
Do Not Sell or Share My Personal Information