Required permission: | StockAdjustment-Transaction.ADD |
POST | /StockAdjustments/simple | Create a record for Stock Adjustment | AcStockAdjustmentMID is a primary key |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
StockAdjustment | body | StockAdjustmentSimple | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
DocumentHeader | form | AcStockAdjustmentMSimple | No | |
DocumentDetails | form | List<AcStockAdjustmentDSimple> | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcStockAdjustmentMID | form | NVARCHAR(20) | Yes | Stock Adjustment Document Number |
AcLocationID | form | NVARCHAR(20) | Yes | Location ID |
DocumentDate | form | DATE | Yes | Document Date |
RefDocumentNo | form | NVARCHAR(20) | 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 |
CreateBy | form | NVARCHAR(20) | Yes | Create By |
CreateDate | form | DATETIME | Yes | Create Date |
EditBy | form | NVARCHAR(20) | Yes | Edit By |
EditDate | form | DATETIME | Yes | Create Date |
Stamp | form | INT | Yes | Record Stamp. Always 0 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
AcStockAdjustmentDID | form | NVARCHAR(40) | Yes | Record ID. Recommend use GUID |
AcStockAdjustmentMID | form | NVARCHAR(20) | Yes | Stock Adjustment Document Number |
ItemNo | form | INT | Yes | Item Number |
AcStockID | form | NVARCHAR(40) | Yes | Stock ID |
AcStockUOMID | form | NVARCHAR(20) | Yes | Stock UOM ID |
AcStockAdjustmentTypeID | form | NVARCHAR(20) | Yes | Stock Adjustment Type ID |
ItemQuantity | form | NUMERIC(18,4) | Yes | Item Quantity. Always positive input expected. |
ItemRemark1 | form | NVARCHAR(MAX) | Yes | Item Remark 1 |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
StockAdjustment | form | StockAdjustmentSimple | No | |
ResponseStatus | form | ResponseStatus | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /StockAdjustments/simple HTTP/1.1
Host: snr2u.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"StockAdjustment":{"DocumentHeader":{"AcStockAdjustmentMID":"String","AcLocationID":"String","DocumentDate":"\/Date(-62135596800000-0000)\/","RefDocumentNo":"String","DocumentRemark":"String","ExtraRemark1":"String","ExtraRemark2":"String","ExtraRemark3":"String","ExtraRemark4":"String","CreateBy":"String","CreateDate":"\/Date(-62135596800000-0000)\/","EditBy":"String","EditDate":"\/Date(-62135596800000-0000)\/","Stamp":0},"DocumentDetails":[{"AcStockAdjustmentDID":"String","AcStockAdjustmentMID":"String","ItemNo":0,"AcStockID":"String","AcStockUOMID":"String","AcStockAdjustmentTypeID":"String","ItemQuantity":0,"ItemRemark1":"String"}]}}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"StockAdjustment":{"DocumentHeader":{"AcStockAdjustmentMID":"String","AcLocationID":"String","DocumentDate":"\/Date(-62135596800000-0000)\/","RefDocumentNo":"String","DocumentRemark":"String","ExtraRemark1":"String","ExtraRemark2":"String","ExtraRemark3":"String","ExtraRemark4":"String","CreateBy":"String","CreateDate":"\/Date(-62135596800000-0000)\/","EditBy":"String","EditDate":"\/Date(-62135596800000-0000)\/","Stamp":0},"DocumentDetails":[{"AcStockAdjustmentDID":"String","AcStockAdjustmentMID":"String","ItemNo":0,"AcStockID":"String","AcStockUOMID":"String","AcStockAdjustmentTypeID":"String","ItemQuantity":0,"ItemRemark1":"String"}]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}