From RPM Wiki
| Table of contents |
[edit]
Summary
API: Get information for one agency
[edit]
Request
By agency name
{
"Key":"{api key}",
"Agency":"{agency name}"
}
By agency ID
{
"Key":"{api key}",
"AgencyID":"{agency id}"
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/Agency
{
"Key":"abc123def456",
"Agency":"Ahead Networks"
}
{
"Key":"abc123def456",
"AgencyID":"446"
}
[edit]
Response
{"AgencyResult":
{
"Agency": "{agency name}",
"AgencyID": "{agency id}",
"Website": "{website}",
"Address": "{website}",
"City": "{website}",
"StateProvince": "{website}",
"Country": "{website}",
"ZipPostalCode": "{website}",
"Added": "{added date}",
"Modified": "{modified date}",
"PrimaryContact": {
"Salutation": "{salutation}",
"FirstName": "{first name}",
"LastName": "{last name}",
"Title": "{title}",
"Email": "{email}",
"Phone": {
"{phone type}": "{phone number}",
{repeat as needed}
}
},
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
],
"Reps": [
{
"Rep": "{rep name}",
"RepID": "{rep id}",
"Type": "{Manager/Rep/Both}"
},
{repeat as needed}
],
"NotesForStaff": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
],
"SupplierExclusions": [
{
"Supplier": "{supplier name}",
"SupplierID": "{supplier id}"
},
{repeat as needed}
]
}
}
- Notes are in order of oldest to newest
[edit]
Example
{"AgencyResult":
{
"Agency": "Ahead Networks",
"AgencyID": "446",
"Website": "http://ahead.net",
"Address": "",
"City": "",
"StateProvince": "Ohio",
"Country": "United States",
"ZipPostalCode": "",
"Added": "1/20/2007",
"Modified": "2/2/2009",
"PrimaryContact": {
"Salutation": "Mr",
"FirstName": "Brian",
"LastName": "Bradley",
"Title": "",
"Email": "bb@ahead.net",
"Phone": {
"Business": "1-800-555-1234",
"Fax": "1-800-555-1235"
}
},
"Fields": [
{
"Field": "My custom list",
"Value": "Some option"
},
{
"Field": "Extra date",
"Value": "4/16/2008"
}
],
"Reps": [
{
"Rep": "Brian Bradley",
"RepID": "1069",
"Type": "Both"
},
{
"Rep": "Sally Sitwell",
"RepID": "1071",
"Type": "Rep"
}
],
"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"
}
],
"SupplierExclusions": [
{
"Supplier": "Sprint",
"SupplierID": "1"
},
{repeat as needed}
]
}
}
[edit]
Errors
- "Agency not found"
[edit]
History
- Supercharger: Feature added
- This page was last modified 18:56, 21 Sep 2009.
- This page has been accessed 916 times.
