Repair Order

Repair Order Object

Repair Order is a transaction used track the repair or refurbishment of products and serial numbers.      Like all transactions it is comprised of a Doc portion (Repair Order) and one or more Line Items (RepairOrderItemComponent).  RepairOrderItemComponent may optionally include one or more Details.    

You can only create internal repair orders with the API. 

End Point

/repairorder

GET, POST, PUT,  DELETE

GET and DELETE requests expect parameter docNo of type Int32.

Properties -Repair Order

Property Caption Data Type Required Can Update with PUT
DocNo No. Int32 False False
Date Date DateTime True True
EstCompletionDate
Est. Completion Date
DateTime
True
True
StatusRef Status EntityRef False True
RepairOrderTypeRef
Type
EntityRef
True True
AccountRef
Account EntityRef True
True
ItemRef
Item EntityRef True
False
BinRef Bin EntityRef True True
LotOrSerialNo
Lot / Serial Number
String 100) True
False
Quantity
Quantity
Decimal True True
Description
Description
String (4000) False True
TechNote
Technician Notes
String (4000) False True
EmployeeRef
Employee EntityRef False False
WarrantyTypeRef
Warranty
EntityRef False False
WarrantyExpDate
Warranty Expires Date False True
ComponentItems
Components Array of RepairOrderItemComponent False False
CustomFields Custom Fields Array of CustomFieldData False True

Properties - Repair Order Item Component

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.RepairOrderItemComponent, AOLib7"
Id Id Int32 False True
LineNo Line No Int16 False True
ItemRef Item EntityRef True False
Description Description String (4000) False False
SalesTaxCodeRef Tax Code EntityRef False False
UomRef UOM EntityRef False False
UomConversionRate UOM Conversion Rate Decimal False False
EstQuantity
Estimated Quantity
Decimal True False
Quantity Quantity Decimal True False
StdCost Std. Cost Decimal False True
CustomFields Custom Fields Array of CustomFieldData False False
Details Line Item Details Array of FillBinBase False False

Properties -  Repair Order Item Component - 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.   Details for non-inventoried items will be ignored.     You only need to include Details if you want to specifically identify the bins and / or lot and serial numbers being included,  otherwise you can omit the Details section and Order Time will automatically fill the ship doc line item with available inventory 1.   If you include Details for one Ship Doc Line item then you must do so for all inventoried Ship Doc Line Items and visa versa.  You cannot have some inventoried Repair Order 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
Quantity Quantity Decimal True False Both
CustomFields Custom Fields Array of CustomFieldData False False DocFillLotOrSerial

Json Sample

{
    "ItemRef": {"Id": 29},
    "LotOrSerialNo": "ABC123",
    "BinRef": {"Id":8},
    "Quantity": 1,
    "WarrantyTypeRef": {"Id": 6},
    "EmployeeRef": {"Name": "John Lenon"},
    "WarrantyExpDate": "2029-12-31",
    "Date": "2025-02-05",
    "ComponentItems": [
        {
            "$type": "AOLib7.RepairOrderItemComponent, AOLib7",
            "ItemRef": {
                "Id": 30
            },
            "LineNo": 1,
            "EstQuantity": 2,
            "Quantity": 2
            "Details": [
                {
                    "$type": "AOLib7.FillBin, AOLib7",
                   
		    "ItemRef": {
			"Id": 30
		    },
                    "BinRef": {
                        "Id": 8,
                        "Name": "Floor"
                    },
                    "Quantity": 2
                    
                }
                ],
            "CustomFields": []
        },
        {
            "$type": "AOLib7.RepairOrderItemComponent, AOLib7",
            "Id": 33,
            "ItemRef": {
                "Id": 37
            },
            "EstQunatity": 1,
            "Quantity": 1,
            "Details": [
               
                {
                    "$type": "AOLib7.DocFillLotOrSerial, AOLib7",
		    "ItemRef": {
                	"Id": 37
            	     },
                    "BinRef": {
                        "Id": 8,
                        "Name": "Floor"
                    },
                    "Quantity": 1,
                    "LotOrSerialNo": "1253215235"
                }
                ]
           
        }
    ],
    "StatusRef": {
       
        "Name": "Approved"
    }
}

Top

1 - When Details are not included Order Time will attempt to fill the sales order using its business rules and Company Preferences.