Adjustment

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

/adjustment

GET, POST,  DELETE

GET and DELETE requests expect parameter docNo of type Int32.

Properties - Adjustment

PropertyCaptionData TypeRequired
AccountRefAccountEntityRefTrue
DocNoNo.Int32False
DateDateDateTimeTrue
StatusRefStatusEntityRefFalse
ClassRefClassEntityRefFalse
MemoMemoString (4000)False
LocationRefLocationEntityRefTrue
CustomerRefCustomerEntityRefFalse
LineItemsItemsArray of AdjustmentLineItemTrue
CustomFieldsCustom FieldsArray of CustomFieldDataFalse

Properties - Adjustment Line Item

PropertyCaptionData TypeRequiredRead Only
$typeThis property MUST be included to tell the API what type of item is being added.
The value should be "AOLib7.AdjustmentLineItem, AOLib7"
IdIdInt32FalseTrue
LineNoLine NoInt16FalseTrue
ItemRefItemEntityRefTrueFalse
QuantityQuantityDecimalTrue if no details are providedFalse
CostCostDecimalFalse - if the cost is zero, it will be ignored.False
CustomFieldsCustom FieldsArray of CustomFieldDataFalseFalse
DetailsLine Item DetailsArray of FillBinBaseFalseFalse

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. 

PropertyCaptionData TypeRequiredRead OnlyApplied to
$typeThis 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"
IdIdInt32FalseTrueBoth
BinRefBinEntityRefTrueFalseBoth
LotOrSerialNoLot Or Serial NoString (50)TrueFalseDocFillLotOrSerial
ExpirationDateExpiration DateDateTimeTrueFalseDocFillLotOrSerial
QuantityQuantityDecimalTrueFalseBoth
DescriptionDescriptionString (4000)FalseFalseDocFillLotOrSerial
CustomFieldsCustom FieldsArray of CustomFieldDataFalseFalseDocFillLotOrSerial

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"
    }
}

Top