Adjustment Object
Adjustment is a transaction used to increase or decrease inventory. Like all transactions it is comprised of a Doc portion (Adjustment) and one or more Line Items (AdjustmentLineItem). AdjustmentLineItem may optionally include one or more Details.
- End Point
- Properties - Adjustment
- Properties - Adjustment Line Item
- Properties - Adjustment Line Item Details
- Json Sample
End Point
/adjustment
GET, POST, DELETE
GET and DELETE requests expect parameter docNo of type Int32.
Properties - Adjustment
Property | Caption | Data Type | Required |
AccountRef | Account | EntityRef | True |
DocNo | No. | Int32 | False |
Date | Date | DateTime | True |
StatusRef | Status | EntityRef | False |
ClassRef | Class | EntityRef | False |
Memo | Memo | String (4000) | False |
LocationRef | Location | EntityRef | True |
CustomerRef | Customer | EntityRef | False |
LineItems | Items | Array of AdjustmentLineItem | True |
CustomFields | Custom Fields | Array of CustomFieldData | False |
Properties - Adjustment Line Item
Property | Caption | Data Type | Required | Read Only |
$type | This property MUST be included to tell the API what type of item is being added. The value should be "AOLib7.AdjustmentLineItem, AOLib7" | |||
Id | Id | Int32 | False | True |
LineNo | Line No | Int16 | False | True |
ItemRef | Item | EntityRef | True | False |
Quantity | Quantity | Decimal | True if no details are provided | False |
Cost | Cost | Decimal | False - if the cost is zero, it will be ignored. | False |
CustomFields | Custom Fields | Array of CustomFieldData | False | False |
Details | Line Item Details | Array of FillBinBase | False | False |
Quantity can either positive or negative. Use a negative quantity to reduce inventory.
Properties - Adjustment Line Item - Details
The Details node is comprised of Line Item Details. If you have used the Form Designer, you know that you can add details to show the Bins and Lot or Serial No data for inventoried items. Only inventoried items comprising of Part and Assembly items need Details. You only need to include Details if you want to specifically identify the bins and / or lot and serial numbers being included. If you include Details for one Adjustment Line item then you must do so for all inventoried Adjustment Line Items and visa versa. You cannot have some inventoried Adjustment Line Items with Details and some without.
Line Item Details are comprised of an Array of FillBinBase. FillBinBase can morph into either FillBin or DocFillLotOrSerial. DocFillLotOrSerial is used when the item has TrackLotOrSerial set to true and FillBin is used otherwise.
Property | Caption | Data Type | Required | Read Only | Applied to |
$type | This property MUST be included to tell the API what type of Detail is being added. The value should be "AOLib7.FillBin, AOLib7" or "AOLib7.DocFillLotOrSerial, AOLib7" | ||||
Id | Id | Int32 | False | True | Both |
BinRef | Bin | EntityRef | True | False | Both |
LotOrSerialNo | Lot Or Serial No | String (50) | True | False | DocFillLotOrSerial |
ExpirationDate | Expiration Date | DateTime | True | False | DocFillLotOrSerial |
Quantity | Quantity | Decimal | True | False | Both |
Description | Description | String (4000) | False | False | DocFillLotOrSerial |
CustomFields | Custom Fields | Array of CustomFieldData | False | False | DocFillLotOrSerial |
Json Sample
{ "AccountRef": { "Id": 32 }, "Date": "2018-11-05T00:00:00", "LineItems": [ { "$type": "AOLib7.AdjustmentLineItem, AOLib7", "ItemRef": { "Id": 30 }, "LineNo": 1, "Quantity": 2, "Details": [ { "$type": "AOLib7.FillBin, AOLib7", "Id": 1091, "BinRef": { "Id": 8, "Name": "Floor" }, "Quantity": 2 } ] }, { "$type": "AOLib7.ReceiverLineItem, AOLib7", "Id": 33, "ItemRef": { "Id": 37 }, "Quantity": 1 "Details": [ { "$type": "AOLib7.DocFillLotOrSerial, AOLib7", "BinRef": { "Id": 8, "Name": "Floor" }, "Quantity": 1, "LotOrSerialNo": "1253215235" } ] } ], "StatusRef": { "Id": 5, "Name": "Closed" }, "LocationRef": { "Id": 10, "Name": "HQ" } }