From RPM Wiki
| Table of contents |
[edit]
Summary
API: Get customer information
[edit]
Request
By customer name
{
"Key":"{api key}",
"Customer":"{customer name}"
}
By customer ID
{
"Key":"{api key}",
"CustomerID":"{customer id}"
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/Customer
{
"Key":"abc123def456",
"Customer":"Acme, Inc."
}
{
"Key":"abc123def456",
"CustomerID":"10023"
}
[edit]
Response
{"CustomerResult":
{
"Customer": "{customer name}",
"CustomerID": "{customer id}",
"Website": "{website}",
"Locations": [
{
"LocationID": "{location id}",
"Name": "location name",
"Primary": "{is the primary location}",
"Address": "{street address}",
"City": "{city}",
"StateProvince": "{state name}",
"Country": "{country name}",
"ZipPostalCode": "{zip or postal code}"
}
],
"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}
],
"Accounts": [
{
"Account": "{account number}",
"AccountID": "{account id}",
"Supplier": "{supplier name}",
"SupplierID": "{supplier id}"
},
{repeat as needed}
],
"Notes": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
],
"NotesForStaff": [
{
"Note": "{note text}",
"Added": "{added date}",
"By": "{user name}"
},
{repeat as needed}
]
}
}
- Notes are in order of oldest to newest
- The PrimaryContact property is suppressed when the customer does not have any contacts.
[edit]
Example
{"CustomerResult":
{
"Customer": "Acme, Inc.",
"CustomerID": "10023",
"Website": "",
"Locations": [
{
"LocationID": 4201,
"Name": "Main branch",
"Primary": true,
"Address": "742 Green Terrace",
"City": "Edmonton",
"StateProvince": "Kansas",
"Country": "United States",
"ZipPostalCode": "237932"
}
],
"Added": "1/20/2007",
"Modified": "2/2/2009",
"PrimaryContact": {
"Salutation": "",
"FirstName": "Nancy",
"LastName": "Nicer",
"Title": "President",
"Email": "",
"Phone": {
"Other": "707-555-1234"
}
},
"Fields": [
{
"Field": "My custom list",
"Value": "Some option"
},
{
"Field": "Extra date",
"Value": "4/16/2008"
}
],
"Accounts": [
{
"Account": "013555",
"AccountID": "5961",
"Supplier": "Sprint",
"SupplierID": "39",
},
{
"Account": "000123456",
"AccountID": "2015",
"Supplier": "Qwest",
"SupplierID": "45",
},
{
"Account": "000223422",
"AccountID": "1099",
"Supplier": "Qwest",
"SupplierID": "45",
}
],
"Notes": [],
"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"
}
]
}
}
[edit]
Errors
- "Customer not found"
[edit]
History
- Supercharger: Feature added
- This page was last modified 23:48, 4 Aug 2010.
- This page has been accessed 2048 times.
