From RPM Wiki
| Table of contents |
[edit]
Summary
API: Get account information
[edit]
Request
By supplier name + account number
{
"Key":"{api key}",
"Supplier":"{supplier name}",
"Account":"{account number}"
}
By supplier ID + account number
{
"Key":"{api key}",
"SupplierID":"{supplier id}",
"Account":"{account number}"
}
By account ID
{
"Key":"{api key}",
"AccountID":"{account id}"
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/Account
{
"Key":"abc123def456",
"Supplier":"Qwest",
"Account":"000123456"
}
{
"Key":"abc123def456",
"SupplierID":"45",
"Account":"000123456"
}
{
"Key":"abc123def456",
"AccountID":"2015"
}
[edit]
Response
{"AccountResult":
{
"Account": "{account number}",
"AccountID": "{account id}",
"Customer": "{customer name}",
"CustomerID": "{customer id}",
"Supplier": "{supplier name}",
"SupplierID": "{supplier id}",
"AccountGroup": "{account group}",
"AccountGroupID": "{account group id}",
"Added": "{added date}",
"Modified": "{modified date}",
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
],
"Reps": [
{
"Rep": "{rep name}",
"RepID": "{rep id}",
"Agency": "{agency name}",
"AgencyID": "{agency id}",
"AssignmentCodes": ["{code}","{code}","{code}"]
},
{repeat as needed}
]
}
}
- The Reps object lists all reps that have access to the account.
- For each of them it also looks in the 2 most recent runs and lists any assignment codes used for items for this rep + this account.
[edit]
Example
{"AccountResponse":
{
"Account": "000123456",
"AccountID": "2015",
"Customer": "Acme, Inc.",
"CustomerID": "10023",
"Supplier": "Qwest",
"SupplierID": "45",
"AccountGroup": "",
"AccountGroupID": "",
"Added": "1/20/2007",
"Modified": "2/2/2009",
"Fields": [
{
"Field": "My custom list",
"Value": "Some option"
},
{
"Field": "Extra date",
"Value": "4/16/2008"
}
],
"Reps": [
{
"Rep": "Bob Jones",
"RepID": "2004",
"Agency": "AAA Networks, Inc.",
"AgencyID": "381",
"AssignmentCodes": ["Q910238","Q910239"]
}
]
}
}
[edit]
Errors
{
"Key":"abc123def456",
"Supplier":"invalid supplier",
"Account":"000123456"
}
will get result of
- "Supplier not found"
{
"Key":"abc123def456",
"AccountID":"invalid account number"
}
- "Account not found"
- This page was last modified 20:16, 25 Nov 2009.
- This page has been accessed 2136 times.
