Function
The Customer Edit API is used to modify existing customer information.
URL
{Root URL}/API/Customer/Edit/{API Key} |
Parameters
Parameter | Description | Required | Comment | |
1 | Custno | The customer's number | Y | Must be unique and ten digits. |
2 | Custname | The customer's name | N | |
3 | Phone | The customer’s phone number | N | |
4 | Fax | The customer’s fax | N | |
5 | Territory | The customer’s territory | N | Can be: "SOUTHERN CA," "NORTHERN CA," "EAST," "WEST," "MIDWEST," "NEW ENGLAND," "SOUTH," "GREAT LAKES," "MEXICO, "CANADA," or "UNITED KINGDOM." |
6 | Terms | The customer’s sales terms | N | Can be: "NET 10," "NET 15," "NET 30," "NET 30/2% 10," "NET 45," "COD," or "NONE." |
7 | Credlimit | Credit limit | N | This is the customer’s credit limit. Must be greater than or equal to "0." |
8 | Creditok | Credit status | N | Can be: "OK," "HOLD," or "REJECT." |
9 | Resl_no | Reseller number | N | |
10 | Ar_highBal | Accounts receivable balance | N | Must be greater than or equal to "0." |
11 | Acct_date | Date the account was created | N | Use the follwing date format: MM/DD/YYYY. |
12 | Status | Account status | N | Can be: "ACTIVE," "INACTIVE," or "QUOTE." |
13 | Saledsctid | Sales discount Id | N | |
14 | Acctaxable | Account taxable | N | |
15 | Inactdt | Account inactive date | N | Use the following date format: MM/DD/YYYY. |
16 | Inactinit | Inactive initial | N | |
17 | modifieddate | Account modified date | N | Use the following date format: MM/DD/YYYY. |
Example Strings
Edit Customer Details
URL
?CUSTNO=0000000000&CUSTNAME=CustomerName&ACCT_DATE=YYYY-MM-DD00:00:00&STATUS=Active&territory=NEW ENGLAND' |
JSON
{ “CUSTNO”:”0000000000”, “CUSTNAME”:”CustomerName”, “ACCT_DATE”:”YYYY-MM-DD00:00:00”, “STATUS”:”Active”, “territory”:”NEW ENGLAND” } |
A successful edit should result in:
{ "$id": "1", "Code": "200", "Message": "Customer edited successfully.", "SessionId": "null", "IsValidUser": "true", "ResponseObject": "null" } |
Common Errors
API Key Error
If there is an error with the API key, the system will return an error message describing it:
{ "$id": "1", "Code": "403", "Message": "Invalid API Key.", "SessionId": "null", "IsValidUser": "false", "ResponseObject": "null" } |
URL Error
If there is an error with the used URL, the system will return an HTTP error:
{ "$id": "1", "Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/CustomerEdit/123456789'.", "MessageDetail": "No type was found that matches the controller named 'CustomerEdit'." } |
Parameter Error
If there is an error with one of the used parameters, the system will return an error message describing the error:
{ "$id": "1", "Code": "403", "Message": "Customer edit failed.Customer Number or Customer Name is Required", "SessionId": "null", "IsValidUser": "true", "ResponseObject": "null" } |