Requires the permission: | Customer-Setup.ADD |
POST | /Customers/simple/create | Create a customer record | AcCustomerID is primary key |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Customer | body | CustomerSimple | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CustomerRecord | form | AcCustomerSimple | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcCustomerID | form | string | Yes | Customer ID |
AcCustomerName | form | string | Yes | Customer Name |
AcTermID | form | string | Yes | Term ID |
AcAreaID | form | string | Yes | Area ID |
AcCusGroupID | form | string | Yes | Customer Group ID |
AcCusUDGroupID | form | string | Yes | Customer User Define Group ID |
BillingAddress1 | form | string | No | Billing Address 1 |
BillingAddress2 | form | string | No | Billing Address 2 |
BillingAddress3 | form | string | No | Billing Address 3 |
BillingAddress4 | form | string | No | Billing Address 4 |
BillingTel1 | form | string | No | Billing Phone 1 |
BillingTel2 | form | string | No | Billing Phone 2 |
BillingFax1 | form | string | No | Billing Fax 1 |
BillingFax2 | form | string | No | Billing Fax 2 |
BillingPostalCode | form | string | No | Billing Postal Code |
BillingContact1 | form | string | No | Billing Contact 1 |
BillingContact2 | form | string | No | Billing Contact 2 |
BillingEmail | form | string | No | Billing Email Address |
BillingHomePage | form | string | No | Billing Home Page |
IsActive | form | string | Yes | Is Active? (Y/N) |
Notes | form | string | No | Notes |
AcCustomerNickName | form | string | Yes | Customer Nickname |
DateOfBirth | form | DateTime | Yes | Date of Birth |
IsMember | form | string | Yes | Is Member? (Y/N) |
Gender | form | string | Yes | Gender (M/F) |
MemberNo | form | string | Yes | Member Number |
MobileNo | form | string | No | Mobile Number |
IdentityNo | form | string | Yes | Identity Number |
MemberJoinDate | form | DateTime | Yes | Member Join Date |
MemberExpireDate | form | DateTime | Yes | Member Expiry Date |
AcMemberEthnicID | form | string | Yes | Member Ethnic (Race) ID |
AcMemberIncomeID | form | string | Yes | Member Income ID |
AcMemberOccupationID | form | string | Yes | Member Occupation ID |
PriceCode | form | string | Yes | Price Code. (Value valid from 1 - 5) |
AcSalesmanID | form | string | Yes | Salesman ID |
MemberNotes | form | string | No | Notes |
EditDate | form | DateTime | No | EditDate |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Customer | form | CustomerSimple | No | |
ResponseStatus | form | ResponseStatus | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Customers/simple/create HTTP/1.1
Host: snr2u.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Customer:
{
CustomerRecord:
{
AcCustomerID: String,
AcCustomerName: String,
AcTermID: String,
AcAreaID: String,
AcCusGroupID: String,
AcCusUDGroupID: String,
BillingAddress1: String,
BillingAddress2: String,
BillingAddress3: String,
BillingAddress4: String,
BillingTel1: String,
BillingTel2: String,
BillingFax1: String,
BillingFax2: String,
BillingPostalCode: String,
BillingContact1: String,
BillingContact2: String,
BillingEmail: String,
BillingHomePage: String,
IsActive: String,
Notes: String,
AcCustomerNickName: String,
DateOfBirth: 0001-01-01,
IsMember: String,
Gender: String,
MemberNo: String,
MobileNo: String,
IdentityNo: String,
MemberJoinDate: 0001-01-01,
MemberExpireDate: 0001-01-01,
AcMemberEthnicID: String,
AcMemberIncomeID: String,
AcMemberOccupationID: String,
PriceCode: String,
AcSalesmanID: String,
MemberNotes: String,
EditDate: 0001-01-01
}
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Customer: { CustomerRecord: { AcCustomerID: String, AcCustomerName: String, AcTermID: String, AcAreaID: String, AcCusGroupID: String, AcCusUDGroupID: String, BillingAddress1: String, BillingAddress2: String, BillingAddress3: String, BillingAddress4: String, BillingTel1: String, BillingTel2: String, BillingFax1: String, BillingFax2: String, BillingPostalCode: String, BillingContact1: String, BillingContact2: String, BillingEmail: String, BillingHomePage: String, IsActive: String, Notes: String, AcCustomerNickName: String, DateOfBirth: 0001-01-01, IsMember: String, Gender: String, MemberNo: String, MobileNo: String, IdentityNo: String, MemberJoinDate: 0001-01-01, MemberExpireDate: 0001-01-01, AcMemberEthnicID: String, AcMemberIncomeID: String, AcMemberOccupationID: String, PriceCode: String, AcSalesmanID: String, MemberNotes: String, EditDate: 0001-01-01 } }, ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } } }