From RPM Wiki
| Table of contents |
[edit]
Summary
API: Add a customer. Similar to Api/CustomerEdit.
- Not used for directly adding files. Those will be separate API calls.
[edit]
Request
- The customer name is required and must be unique.
- All other fields are optional except that for any contact fields to be added, a contact name is required.
- Any error causes the whole request to fail
{
"Key":"{api key}",
"Customer": {
"Name": "{customer name}",
"Website": "{website}",
"Address": "{address}",
"City": "{city}",
"StateProvince": "{stateprovince}",
"Country": "{country}",
"ZipPostalCode": "{zippostalcode}",
"PrimaryContact": {
"Salutation": "{salutation}",
"FirstName": "{first name}",
"LastName": "{last name}",
"Title": "{title}",
"Email": "{email}",
"PhoneBusiness": { "Number":"{number}"},
"PhoneHome": { "Number":"{number}"},
"PhoneFax": { "Number":"{number}"},
"PhoneOther": { "Number":"{number}"}
},
"AliasAdd":{"An alias"},
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
]
}
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/CustomerAdd
{
"Key":"94d43c3c-1813-4ace-8338-8defe62f980d",
"Customer":
{ "Name": "1002 West Van Buren LLC",
"Website": "www.westvan.com",
"Address": "123 MyStreet",
"City": "Anytown",
"StateProvince": "California",
"Country": "United States",
"ZipPostalCode": "12345",
"PrimaryContact": {
"Salutation": "Ms.",
"FirstName": "Nancy",
"LastName": "Nicer",
"Title": "President",
"Email": "nancy@WestVan.com",
"PhoneBusiness": { "Number":"707-555-1234"},
"PhoneHome": { "Number":"707-555-4567"},
"PhoneFax": { "Number":"707-555-8901"},
"PhoneOther": { "Number":"707-555-2345"}
},
"AliasAdd":"1002 WESTVAN",
"Fields": [
{
"Field": "Sales Division",
"Value": "Comtel"
},
{"Field":"Notes",
"Value":"Call back"
},
]
}
}
[edit]
Response
{"CustomerAddResult":
{
{Customer result - See Api/Customer}
}
}
[edit]
Errors
- "A customer name is required"
- "A unique customer name is required"
- "Permission denied"
[edit]
History
- Dayman: Feature added (beta)
- Serenity Now: Candidate
- This page was last modified 17:26, 23 Sep 2010.
- This page has been accessed 4175 times.
