ArticlesArticles Most Helpful ArticlesMost Helpful Articles Language SettingsLanguage Settings LoginLogin
RSS Feeds
DrillDown Icon Table of Contents Back
 . . . . . . . . . . . . .
DrillDown Icon Hardware and Software Requirements for Installing SQL Server
DrillDown Icon List of Modules Converted to MANEX Client Server
DrillDown Icon Installing SQL Server
DrillDown Icon System Administrator
DrillDown Icon SQL Backup Options
DrillDown Icon Setup the OLE DB(ADO) for SQL Crystal Reports
DrillDown Icon APIs
DrillDown Icon Item Master
DrillDown Icon Work Order API
DrillDown Icon KIT API
DrillDown Icon Shop Floor Tracking API
DrillDown Icon Inventory Handling API
DrillDown Icon Purchase Order API
DrillDown Icon Sales Order API
DrillDown Icon Customer API
DrillDown Icon Customer Main
DrillDown Icon Add
DrillDown Icon Edit
DrillDown Icon Get
DrillDown Icon Customer Address
DrillDown Icon Customer Tax
DrillDown Icon Q & A API's
DrillDown Icon Code that could be used to find Last Table Modified within SQL
DrillDown Icon Configure SQL Server 2008 R2 to allow Network Connections
DrillDown Icon How to detach and attached databases using the SQL Server Management Studio
DrillDown Icon Restore SQL DB from Backup
DrillDown Icon Setup a SQL Test/Sandbox Database
DrillDown Icon SQLManex Client Server Setup Instructions
DrillDown Icon Setup Folder Permissions to Write "ini" File
DrillDown Icon Setup the ODBC for SQL Crystal Reports
DrillDown Icon Setup a SQL Database Maintenance Plan
DrillDown Icon Setup Task Scheduler to Auto Run MRP
DrillDown Icon Selecting the Authentication Mode
DrillDown Icon Window 10 - Network Disconnect
DrillDown Icon Setup Work Stations
DrillDown Icon Security System
DrillDown Icon Accounting Setup
DrillDown Icon System Setup
DrillDown Icon Operations Manuals
DrillDown Icon System Utilities
DrillDown Icon SQL Server Memory Settings and Performance
DrillDown Icon Definitions
DrillDown Icon How to schedule and automate backups of SQL Server databases in SQL Server Express
DrillDown Icon SQL_FAQ's
  Email This ArticlePrint PreviewPrint Current Article and All Sub-Articles
 
Add

Functions

Add API is used to add a new customer to the system

​{Root URL}/API/Customer/Add/{API Key}

Parameters

Parameter Description Required Comment
Custno Customer Number N Must be unique
Custname Customer Name Y  
Status Account Status Y Can be: Active, Inactive, Quote   (please note must be camel-cased)
Phone Customer’s phone number N  
Fax Customer’s fax N  
Territory The customer’s territory N Can be: SOUTHERN CA, NORTHERN CA, EAST, WEST, MIDWEST, NEW ENGLAND, SOUTH, GREAT LAKES, MEXICO, CANADA, UNITED KINGDOM
Terms The customer’s sales terms N Can be: NET 10, NET 15, NET 30, NET 30/2% 10, NET 45, COD, NONE
Credlimit Credit Limit N This is the customer’s credit limit. Must be Greater than or equal to 0
Creditok Credit Status N Can be: OK, HOLD, REJECT
Ar_highBal Accounts Receivable balance N Must be greater than or equal to 0
Acct_date Date the account was created N In MM/DD/YYYY format
Saledsctid Sales Discount Id N  
Acctaxable Account Taxable N  

​Example Strings

Add new customer

URL:?CustName=CustomerName&Status=Active'

JSON

{

 "Custname": "CustomerName",

 "Status": "Active"

}

 

A successful add should result in

{

"$id": "1",

"Code": 200,

"Message": "Customer added successfully.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": {

"$id": "2",

"CUSTNO": "0000000010",

"CUSTNAME": "CustomerName",

"PHONE": "",

"FAX": "",

"BLINKADD": "",

"SLINKADD": "",

"TERRITORY": "",

"TERMS": "",

"CREDLIMIT": 0,

"PROFILE": "",

"CUSTNOTE": "",

"ACCTSTATUS": "",

"DIVISION": "",

"SREPS": "",

"CREDITOK": "",

"RESL_NO": "",

"AR_CALDATE": null,

"AR_CALTIME": "",

"AR_CALBY": "",

"AR_CALNOTE": "",

"AR_HIGHBAL": 0,

"CREDITNOTE": "",

"ACCT_DATE": "2014-11-19T10:09:57.041868-05:00",

"SAVEINIT": "",

"OUT_MARGIN": 0,

"TL_MARGIN": 0,

"MAT_MARGIN": 0,

"LAB_MARGIN": 0,

"MIN_ORDAMT": 0,

"SCRAP_FACT": 0,

"COMMITEM": 0,

"CUSTSPEC": 0,

"LABOR": false,

"MATERIAL": false,

"SPLIT1": 0,

"SPLIT2": 0,

"SPLITAMT": 0,

"SPLITPERC": 0,

"TOOLING": false,

"SIC_CODE": "",

"SIC_DESC": "",

"DELIVTIME": "",

"STATUS": "Active",

"SERIFLAG": false,

"OVERHEAD": 0,

"IS_EDITED": "",

"SALEDSCTID": "",

"CUSTPFX": "",

"ACTTAXABLE": false,

"INACTDT": null,

"INACTINIT": "",

"modifiedDate": null,

"UserId": null,

"LinkAddList": null

}

}

Common Errors

URL Error

If there is an error with the entered URL the system will return a HTTP error.

{

"$id": "1",

"Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/CustomerAdd/123456789'.",

"MessageDetail": "No type was found that matches the controller named 'CustomerAdd'."

}

Parameter Error

If a required parameter is missing, or the entered value is incorrect the system will return an object reference error message.

{

"$id": "1",

"Code": 403,

"Message": "Customer add failed.Object reference not set to an instance of an object.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}

API Key Error

If there is a problem with the used API key the system will return an error describing it.

{

"$id": "1",

"Code": 403,

"Message": "Invalid API Key.",

"SessionId": null,

"IsValidUser": false,

"ResponseObject": null

}

Article ID: 5823