Customer
Customer provides access to the customer resource. This is where all trade customers are held.
Example of a returned customer object with an included outlet
{
"response": {
"Page": 1,
"PageCount": 3,
"RecordsSent": 100,
"RecordsFound": 267,
"Customer": [
{
"Code": "SEDM",
"Name": "SEDMAN SHOES LTD",
"Address1": "18 Main St",
"Address2": "Hutton",
"Town": "Cranswick",
"County": "YO25 9QR",
"Postcode": "",
"Country_Code": "GB",
"Country": "Great Britain",
"Currency": "GB1",
"Telephone": "",
"Fax": "",
"Email": "",
"Status": 1,
"Discount": 0,
"Tradename": "CRK LONDON LTD",
"Outlets": [
{
"Code": "SEDM",
"Customer_Code": "SEDM",
"Name": "Sedman Shoes ltd",
"Address1": "",
"Address2": "",
"Town": "",
"County": "",
"Postcode": "",
"Country": "UK",
"Address_Text": "18 Main St\rHutton\rCranswick\rYO25 9QR\r",
"Currency": "GBP",
"Type": "Universities"
}
]
}
]
}
}
Customer Properties
| Property | Example | Description |
|---|---|---|
| Code | "SEDM" | Customer code |
| Name | "SEDMAN SHOES LTD" | Customer name |
| Address1 | "18 Main St" | Address line 1 |
| Address2 | "Hutton" | Address line 2 |
| Town | "Cranswick" | Town |
| County | "" | County |
| Postcode | "YO25 9QR" | Postcode |
| CountryCode | "GB" | Country code |
| Telephone | "" | Telephone number |
| Fax | "" | Fax number |
| "" | Customer primary email address | |
| Status | 1 | Account status |
| Discount | 0 | General discount percentage |
| Tradename | "CRK LONDON LTD" | Tradename to use for this company |
| Association | "" | Customer association type |
| TAX_Number | "" | Customer VAT number |
| TAX_Type | 1 | VAT type code |
| Company_Reg_No | "" | Company registration number |
| Outlets | [] | List of outlets for the given customer. See Outlet resource for details. |
Other Properties (for review)
| Property | Example | Description |
|---|---|---|
| FactorCo_Accountstr | "" | Factoring account number |
| Contact1 | "" | Contact name |
| LastupdatefromSage | "" | Last update from accounts package |
| PayTerms | "PRO-FORMA" | Payment terms |
| SettleDiscount | 0 | Settlement discount percentage |
| DeliveryInfo | "" | Delivery information |
| GenInfo | "" | General customer information |
| MoreInfo | "" | Additional customer information |
| CreditLimit | 0 | Credit limit |
| SettleDays | 0 | Settlement discount number of days |
| OnHoldReason | "" | Reason for account being on hold |
| Balance | -9125.86 | Current outstanding customer order balance |
| Turnover | 260027.45 | Customer order turnover value |
| Country | "Great Britain" | Country name |
| Payment_Method | "" | Default payment ,method |
| CustomerID | "" | Customer id |
| ContactsID | 1512 | Primary contact id |
| Currency | "GB1" | Customer currency |
| ExportRefNum | 1 | ??? |
| Rating | "Gold" | Customer rating |
| ExportAccountCode | "3694" | ??? |
| BrandDiscount | "" | ??? |
| DateCreated | "2014-06-09T23:00:00.000Z" | Customer creation date |
| Turnover_ytd | 0 | Turnover year to date |
| Turnover_mtd | 0 | turnover month to date |
| Balance_imported | 0 | Imported balance value |
| WIP | 0 | Work in Progress |
| AllowCompletionofDelvrdCO | false | ??? |
| StatusonSage | 0 | Accounts system status |
| Barcode_CustRef | "" | Reference to print on barcode label |
| BarcodeLabel | 0 | ??? |
| Date_Updated | "2017-01-13T00:00:00.000Z" | Date of last update |
| Accounts_NL_Code | "" | Accounts Nominal Ledger code |
| Exclude_Dashboard_TT | false | Flag to indicate this account should be excluded from the dashboard |
| Accounting_Ref | "98483eeb-6151-4c24-a2dc-efa5fa5484a3" | Refernce to accounts system record. |
| Address | "18 Main St\rHutton\rCranswick\rYO25 9QR\r" | Text version of address |
Customer Methods
GET /api/customer
Returns all customers in the system .
POST /api/customer
Parses the POST body and create or updates a customer record. Only the main customer attributes can be passed to the post call. Outlets if passed will (currently) be ignored. POST added 11/09/2018.