Function


The Customer Edit API is used to modify existing customer information.


 

URL


{Root URL}/API/Customer/Edit/{API Key}


 

Parameters



ParameterDescriptionRequiredComment
1CustnoThe customer's numberYMust be unique and ten digits. 
2CustnameThe customer's nameN 
3PhoneThe customer’s phone numberN 
4FaxThe customer’s faxN 
5TerritoryThe customer’s territoryNCan be: "SOUTHERN CA," "NORTHERN CA," "EAST," "WEST," "MIDWEST," "NEW ENGLAND," "SOUTH," "GREAT LAKES," "MEXICO, "CANADA," or "UNITED KINGDOM."
6TermsThe customer’s sales termsNCan be: "NET 10," "NET 15," "NET 30," "NET 30/2% 10," "NET 45," "COD," or "NONE."
7CredlimitCredit limitNThis is the customer’s credit limit. Must be greater than or equal to "0."
8CreditokCredit statusNCan be: "OK," "HOLD," or "REJECT."
9Resl_noReseller numberN
10Ar_highBalAccounts receivable balanceNMust be greater than or equal to "0."
11Acct_dateDate the account was createdNUse the follwing date format: MM/DD/YYYY.
12StatusAccount statusNCan be: "ACTIVE," "INACTIVE," or "QUOTE."
13SaledsctidSales discount IdN 
14AcctaxableAccount taxableN 
15InactdtAccount inactive dateNUse the following date format: MM/DD/YYYY.
16InactinitInactive initialN 
17modifieddateAccount modified dateNUse 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"

}