From RPM Wiki
This feature is still in development.
| Table of contents |
[edit]
Summary
API: Edit a customer. Similar to Api/CustomerAdd
- Not used for directly editing files. Those will be separate API calls.
[edit]
Request
You need to identify the customer and then include the optional information to update.
- Customer ID or name is required.
- If both are supplied then the customer ID is used and the customer name can be changed.
- Any field not included will be left alone.
- Updating a field with a blank value will clear out the field in the form.
- Any error causes the whole request to fail
By customer ID
{
"Key":"{api key}",
"Customer":{
"CustomerID":"{customer id}",
"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}",
"Phone": {
"{phone type}": "{phone number}",
{repeat as needed}
}
},
"Fields": [
{
"Field": "{field name}",
"Value": "{field value"
},
{repeat as needed}
]
}
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/CustomerEdit
{
"Key":"abc123def456",
"Customer":{
"CustomerID": 10170,
"Website": "",
"Address": "123 MyStreet",
"City": "Anytown",
"StateProvince": "California",
"Country": "United States",
"ZipPostalCode": "12345",
"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"
}
]
}
}
[edit]
Response
{"CustomerEditResult":
{
{Customer result - See Api/Customer}
}
}
[edit]
Errors
- "Customer not found"
[edit]
History
- Serenity Now - Feature added
- This page was last modified 19:33, 28 Oct 2011.
- This page has been accessed 4349 times.
