Api/Rep

From RPM Wiki

Table of contents

Summary

API: Get information for one rep

Request

By rep ID

{
  "Key":"{api key}",
  "RepID":"{rep id}"
}

By agency name + rep name

{
  "Key":"{api key}",
  "Agency":"{agency name}",
  "Rep":"{rep name}"
}

By agency ID + rep name

{
  "Key":"{api key}",
  "AgencyID":"{agency id}",
  "Rep":"{rep name}"
}


By supplier name + rep assignment code

{
  "Key":"{api key}",
  "Supplier":"{supplier name}",
  "AssignmentCode":"{rep assignment code}"
}

By supplier ID + rep assignment code

{
  "Key":"{api key}",
  "SupplierID":"{supplier id}",
  "AssignmentCode":"{rep assignment code}"
}

Examples

http://demo.rpmsoftware.com/rpm/Api.svc/Rep

{
  "Key":"abc123def456",
  "RepID:"1069"
}
{
  "Key":"abc123def456",
  "Agency":"Ahead Networks",
  "Rep":"Brian Bradley"
}
{
  "Key":"abc123def456",
  "Supplier":"AT&D",
  "AssignmentCode":"ABC012345"
}

Response

{"RepResult":
  {
    "Rep":"{rep name}",
    "RepID":"{rep id}",
    "Agency":"{agency name}",
    "AgencyID":"{agency id}",
    "Type": "{Manager/Rep/Both}"
    "Relationship":"{Employee/Sub-agent}",
    "Added":"{added date}",
    "Modified":"{modified date}",
    "PrimaryContact": {
      "Salutation": "{salutation}",
      "FirstName": "{first name}",
      "LastName": "{last name}",
      "Title": "{title}",
      "Email": "{email}",
      "Business": "{business}",
      "Home": "{home}",
      "Fax": "{fax}",
      "Other": "{other}"      
    },
    "Fields": [
      {
        "Field": "{field name}",
        "Value": "{field value"
      },
      {repeat as needed}
    ],
    "AssignmentCodes": [
      {
        "Supplier": "{supplier name}",
        "SupplierID": "{supplier ID}",
        "AssignmentCode": "{assignment code}"
      },
      {repeat as needed}
    ],
    "NotesForStaff": [
      {
        "Note": "{note text}",
        "Added": "{added date}",
        "By": "{user name}"
      },
      {repeat as needed}
    ]
  }
}   
  • Notes are in order of oldest to newest

Example

{"RepResult":
  {
    "Rep":"Brian Bradley",
    "RepID":"1069",
    "Agency": "Ahead Networks",
    "AgencyID": "446",
    "Type": "Both",
    "Relationship": "Employee",
    "Added": "1/20/2007",
    "Modified": "2/2/2009",
    "PrimaryContact": {
      "Salutation": "Mr",
      "FirstName": "Brian",
      "LastName": "Bradley",
      "Title": "",
      "Email": "bb@ahead.net",      
       "Business": "1-800-555-1234",
       "Fax": "1-800-555-1235",      
       "Home": "1-800-555-1235",      
       "Other": "1-800-555-1235"
    },
    "Fields": [
      {
        "Field": "My custom list",
        "Value": "Some option"
      },
      {
        "Field": "Extra date",
        "Value": "4/16/2008"
       }
    ],
    "AssignmentCodes": [
      {
        "AssignmentCode": "ABC012345",
        "Supplier": "AT&D",
        "SupplierID":"13"
      },
      {
        "AssignmentCode": "ABC033333",
        "Supplier": "AT&D",
        "SupplierID":"13"
      }
    ],
    "NotesForStaff": [
      {
        "Note": "This is a test note",
        "Added": "1/1/2009",
        "By": "John Smith"
      },
      {
        "Note": "This is another test note",
        "Added": "2/2/2009",
        "By": "John Smith"
      }
    ]
  }
}

Errors

  • "Agency not found"
  • "Supplier not found"
  • "Rep not found"

History

  • This page was last modified 18:35, 3 Feb 2010.
  • This page has been accessed 854 times.