Required permission: | CustomerReceipt-Transaction.ADD |
POST | /CustomerReceipts/simple | Create a record for Customer Receipt | AcCusReceiptMID is a primary key |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CustomerReceipt | body | CustomerReceiptSimple | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
DocumentHeader | form | DocumentHeader | Yes | Customer Receipt Header - Primary Key: AcCusReceiptMID |
DocumentDetails | form | DocumentDetails | Yes | Customer Receipt Knock-Off Details - Primary Key: AcCusReceiptMID, ItemNo, MatchType, MatchDocumentNo. Note: You may get the outstanding list from CustomerOutstandingDocumentListing service. |
DocumentPaymentDetails | form | DocumentKnockOffDetails | Yes | Customer Receipt Payment Details - Primary Key: AcCusReceiptMID, ItemNo, AcBillPaymentMethodID. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcCusReceiptMID | form | NVARCHAR(20) | Yes | Receipt Number |
AcCustomerID | form | NVARCHAR(20) | Yes | Customer ID |
AcLocationID | form | NVARCHAR(20) | Yes | Location ID |
DocumentDate | form | DATE | Yes | Receipt Date |
RefDocumentNo | form | NVARCHAR(50) | No | Reference Number |
DocumentRemark | form | NVARCHAR(100) | No | Document Remark |
ExtraRemark1 | form | NVARCHAR(100) | No | Extra Remark 1 |
ExtraRemark2 | form | NVARCHAR(100) | No | Extra Remark 2 |
ExtraRemark3 | form | NVARCHAR(100) | No | Extra Remark 3 |
ExtraRemark4 | form | NVARCHAR(100) | No | Extra Remark 4 |
AcCusReceiptTypeID | form | NVARCHAR(20) | Yes | Receipt Type ID (CUSTOMER RECEIPT) |
Payee | form | NVARCHAR(100) | Yes | Payee Name. Default to Customer Name |
AcSalesmanID | form | NVARCHAR(20) | Yes | Salesman ID |
DocumentItemCurrencyAmount | form | NUMERIC(18,2) | Yes | Total Item Amount. |
DocumentItemCurrencyAppliedAmount | form | NUMERIC(18,2) | Yes | Total Applied Amount. Total knock-off amount that applied to outstanding invoices. |
DocumentItemCurrencyBalanceAmount | form | NUMERIC(18,2) | Yes | Total Balance Amount. (DocumentPaymentCurrencyAmount - DocumentItemCurrencyAppliedAmount). |
DocumentPaymentCurrencyAmount | form | NUMERIC(18,2) | Yes | Total Payment Amount. |
DocumentUnappliedCurrencyAmount | form | NUMERIC(18,2) | Yes | Total Unapplied Amount. It would be Advanced Amount. Balance amount after knock-off amount to outstanding invoice amount. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcCusReceiptDID | form | NVARCHAR(40) | Yes | Record ID. Recommend use GUID |
AcCusReceiptMID | form | NVARCHAR(20) | Yes | Receipt Number |
ItemNo | form | INT | Yes | Item Number |
MatchType | form | NVARCHAR(20) | Yes | Match Document Type. Source of Document: Eg: Customer Invoice |
MatchDocumentNo | form | NVARCHAR(20) | Yes | Match Document Number. Document Number to be knock-off. Eg: Customer Invoice Number |
ItemRemark1 | form | NVARCHAR(MAX) | Yes | Item Remark 1 |
ItemCurrencyAmount | form | NUMERIC(18,2) | Yes | Item Currency Amount. Current outstanding amount. |
ItemCurrencyAppliedAmount | form | NUMERIC(18,2) | Yes | Item Currency Applied Amount. Amount used to knock-off the oustanding amount. Applied amount should not greater than outstanding amount. |
ItemCurrencyBalanceAmount | form | NUMERIC(18,2) | Yes | Item Currency Balance Amount. Balance amount after knock-off the outstanding amount. (ItemCurrencyBalanceAmount = ItemCurrencyAmount - ItemCurrencyAppliedAmount). Should not have negative balance. |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcCusReceiptMID | form | NVARCHAR(20) | Yes | Receipt Number |
ItemNo | form | INT | Yes | Item Number |
AcBillPaymentMethodID | form | NVARCHAR(20) | Yes | Bill Payment Method ID |
ItemReferenceNumber | form | NVARCHAR(100) | No | Reference Number |
ItemRemark1 | form | NVARCHAR(MAX) | Yes | Item Remark 1 |
ItemCurrencyPaymentAmount | form | NUMERIC(18,2) | Yes | Item Currency Payment Amount |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CustomerReceipt | form | CustomerReceiptSimple | No | |
ResponseStatus | form | ResponseStatus | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /CustomerReceipts/simple HTTP/1.1
Host: snr2u.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CustomerReceipt":{"DocumentHeader":{"AcCusReceiptMID":"String","AcCustomerID":"String","AcLocationID":"String","DocumentDate":"\/Date(-62135596800000-0000)\/","RefDocumentNo":"String","DocumentRemark":"String","ExtraRemark1":"String","ExtraRemark2":"String","ExtraRemark3":"String","ExtraRemark4":"String","AcCusReceiptTypeID":"String","Payee":"String","AcSalesmanID":"String","DocumentItemCurrencyAmount":0,"DocumentItemCurrencyAppliedAmount":0,"DocumentItemCurrencyBalanceAmount":0,"DocumentPaymentCurrencyAmount":0,"DocumentUnappliedCurrencyAmount":0},"DocumentDetails":[{"AcCusReceiptDID":"String","AcCusReceiptMID":"String","ItemNo":0,"MatchType":"String","MatchDocumentNo":"String","ItemRemark1":"String","ItemCurrencyAmount":0,"ItemCurrencyAppliedAmount":0,"ItemCurrencyBalanceAmount":0}],"DocumentPaymentDetails":[{"AcCusReceiptMID":"String","ItemNo":0,"AcBillPaymentMethodID":"String","ItemReferenceNumber":"String","ItemRemark1":"String","ItemCurrencyPaymentAmount":0}]}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"CustomerReceipt":{"DocumentHeader":{"AcCusReceiptMID":"String","AcCustomerID":"String","AcLocationID":"String","DocumentDate":"\/Date(-62135596800000-0000)\/","RefDocumentNo":"String","DocumentRemark":"String","ExtraRemark1":"String","ExtraRemark2":"String","ExtraRemark3":"String","ExtraRemark4":"String","AcCusReceiptTypeID":"String","Payee":"String","AcSalesmanID":"String","DocumentItemCurrencyAmount":0,"DocumentItemCurrencyAppliedAmount":0,"DocumentItemCurrencyBalanceAmount":0,"DocumentPaymentCurrencyAmount":0,"DocumentUnappliedCurrencyAmount":0},"DocumentDetails":[{"AcCusReceiptDID":"String","AcCusReceiptMID":"String","ItemNo":0,"MatchType":"String","MatchDocumentNo":"String","ItemRemark1":"String","ItemCurrencyAmount":0,"ItemCurrencyAppliedAmount":0,"ItemCurrencyBalanceAmount":0}],"DocumentPaymentDetails":[{"AcCusReceiptMID":"String","ItemNo":0,"AcBillPaymentMethodID":"String","ItemReferenceNumber":"String","ItemRemark1":"String","ItemCurrencyPaymentAmount":0}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}