Customer
Manage customer master data including credit terms, currency, and contact information.
Path Parameter:
:CODE (string) — customer codeEndpoints
GET
/customerList all customers
GET
/customer/:CODEGet single customer by code
POST
/customerCreate new customer
PUT
/customer/:CODEUpdate customer
DELETE
/customer/:CODEDelete customer
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| code | string | Yes | Unique customer code identifier. |
| companyname | string | Yes | Business name. Field is 'companyname', not 'company'. |
| controlaccount | string | No | Debtor control account code. Auto-defaults to 300-000. Default: "300-000" |
| companycategory | string | No | Customer category. Get from GET /companycategory. Default: "----" |
| area | string | No | Sales area/region. Get from GET /area. Default: "----" |
| agent | string | No | Sales agent assigned. Get from GET /agent. Default: "----" |
| creditterm | string | No | Payment terms. Get from GET /terms. Default: "30 Days" |
| currencycode | string | No | Currency for transactions. Get from GET /currency. Default: "----" |
| pricetag | string | No | Price level. Get from GET /pricetag. Default: null |
| tax | string | No | Default tax code. Get from GET /tax. Default: null |
| creditlimit | string | No | Credit limit amount. Stored as string. Default: "30000" |
| creationdate | string | No | Creation date. Format: YYYY-MM-DD. Default: today |
Examples
POST — Create Customer (Minimal)
POST /customer
{
"code": "CUS-01",
"companyname": "Test Customer Sdn Bhd"
}POST — Create Customer (Full)
POST /customer
{
"code": "CUS-01",
"companyname": "Test Customer Sdn Bhd",
"creditterm": "30 Days",
"currencycode": "----",
"creditlimit": "50000",
"area": "KL",
"agent": "AGT-01"
}PUT — Update Customer
PUT /customer/CUS-01
{
"creditlimit": "75000",
"creditterm": "60 Days"
}Response (200 OK)
{
"code": "CUS-01",
"companyname": "Test Customer Sdn Bhd",
"controlaccount": "300-000",
"creditterm": "60 Days",
"creditlimit": "75000",
"currencycode": "----",
"area": "----",
"agent": "----"
}Field Name: The company name field is 'companyname', not 'company'. Using wrong field name will result in validation errors.
