Document toolboxDocument toolbox

Work Order REST API

3.0.0 3.19.0 3.19.1

The Work Order REST API is used to manage work orders (jobs) within the system.

  • A work order will only be dispatched to a mobile technician when the User and PlannedStartDate properties are both populated. If either property are empty the work order will not be dispatched.
  • When deleting a work order that has been dispatched to a technician, the technician will be notified that the work order has been canceled and the work order will be removed from their device.
  • If the dispatched technician ID is changed, the system will automatically generate a request to remove the work order from the original technician and then dispatch it to the newly assigned technician.

Accounts Notes

Accounts are considered master data and managed via the Account REST APIs or NexusFS web application.

If the Account section contains only the AccountNum property then the API will automatically fill in the rest of the information from the account master data. This requires that the account exists in our system. In this scenario if the account does not exists an error will be returned.

If the Account section contains any additional properties besides AccountNum, the API will assume that this is an override and assumes all required properties are present and this API will not join any additional properties from the account master.

Account Locations Notes

Account locations are considered master data which are managed via the Account Location REST APIs or NexusFS web application.

If the AccountLoc section of the work order object contains only the LocNum property then this API will automatically fill in the rest of the information from the account location's master data. This requires that the account location details exists in our system. In this scenario if the account location does not exists an error will be returned.

If the AccountLoc section contains any additional properties besides the LocNum property the API will assume that this is an override and assumes all required fields are present. The API will not join any additional data from the account's location master data.

Resource URL Summary

Retrieve the details of a specific Work Order

GET /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

Insert or Update the details of a specific Work Order

PUT /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

Update the details of a specific Work Order 3.19.0

POST /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

Update only supplied details of a specific Work Order 3.19.0

PATCH /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

Delete a specific Work Order

DELETE /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

API Specific Parameters

ParameterDescription

${WorkOrderNum}

Identifies the Work Order Object.

HTTP Headers

This API uses the default ServiceMobility HTTP Headers.



API Specifics

Retrieve the details of a specific Work Order

This REST API will return a Work Order with the specified ID. The Work Order with the specified ID must already exist in the system.

URL

GET /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

HTTP Request Body

This request does not require a request body. 

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will contain a Work Order Object.

JSON Format
{
	"_fields": [
		"",
		""
	],
	"_paths": [
		"",
		""
	],
	"Account": {
		"AccountNum": "",
		"AccountType": "",
		"Name": "",
		"Notes": "",
		"TaxExempt": "",
		"TierPricingID": "",
		"Website": ""
	},
	"AccountingPackage": {
		"Extensions": {
			"DocNum": "",
			"SyncToken": ""
		},
		"InvoiceNum": "",
		"IsSent": true,
		"SendDate": "2014-12-15T10:00:00Z"
	},
	"ActualEndDate": "",
	"ActualStartDate": "",
	"ActualTravelEndDate": "",
	"ActualTravelStartDate": "",
	"AlertResponses": [{
		"AlertID": "",
		"Notes": "",
		"Response": "",
		"TemplateID": ""
	}],
	"Alerts": [{
		"AlertID": "",
		"AssetAge": {
			"Start": 12,
			"End": 35
		},
		"AssetType": "",
		"Cost": 35.0,
		"Extensions": {
			"FactoryProgCode": ""
		},
		"FixedCharges": [{
			"ProdNum": "",
			"RefCode": ""
		}],
		"InWarranty": true,
		"IsActive": false,
		"Message": "",
		"ModelNumPattern": "",
		"ProdNumPattern": "",
		"RetailerID": "",
		"RetailerName": "",
		"SerialNumPattern": "",
		"ServiceCodes": [
			[
				"",
				""
			],
			[
				"",
				""
			]
		],
		"SetInWarranty": false,
		"TemplateID": "",
		"URL": ""
	}],
	"ApptSearchRequest": {
		"Account": {
			"AccountNum": "",
			"AccountType": "",
			"Name": ""
		},
		"Assets": [{
			"AssetNum": "",
			"Desc": "",
			"FlexForms": [
				"${FlexFormID}"
			],
			"FlexView": [{
				"ID": "",
				"Title": "GroupName1",
				"Items": [{
					"ID": "",
					"Label": "labeltext",
					"Value": "value text",
					"Delete": true
				}],
				"Delete": false
			}],
			"InServiceDate": "",
			"IsComponent": false,
			"LastServiceDate": "",
			"Location": "",
			"Mfg": "",
			"Model": "",
			"ProdNum": "",
			"SerialNum": "",
			"ServiceCodes": [],
			"ServiceCodesDesc": [],
			"Status": "",
			"Type": "",
			"Delete": false
		}],
		"FlexAttrs": {
			"${FlexFormID}": {
				"${FlexAttrID}": [
					"",
					""
				]
			}
		},
		"FlexForms": [
			"${FlexFormID}",
			"${FlexFormID}"
		],
		"Location": {
			"Address": {
				"AddrLine1": "",
				"AddrLine2": "",
				"AddrLine3": "",
				"AddrLine4": "",
				"AddrType": "",
				"City": "",
				"Country": "",
				"Intersection": "",
				"Lat": "",
				"Lon": "",
				"Region": "",
				"Zip": ""
			},
			"Contacts": [{
				"Email": "",
				"FirstName": "",
				"IsPrimary": true,
				"LastName": "",
				"Phones": [{
					"PhoneNum": "",
					"PhoneType": ""
				}]
			}],
			"Email": "",
			"LanguageID": "",
			"LocationNum": "",
			"Name": "",
			"Notes": "",
			"POReq": false,
			"ServiceAreaID": "",
			"SigReq": true,
			"StorageLocationID": ""
		},
		"OrderType": "",
		"OriginalOrderNum": "",
		"RequiredParts": [{
			"EstimatedDelivery": "2014-12-18T10:00:00.000Z",
			"ProdNum": "",
			"PartStatus": "{free text}",
			"Price": 0,
			"ShipToLocation": "",
			"SupersededParts": [{
				"ProdNum": "",
				"PartStatus": "{free text}",
				"ProdAttrs": {
					"Desc": "",
					"IsBatch": false,
					"IsInvCtrl": false,
					"IsSerialized": false,
					"ProdType": "1001"
				},
				"Qty": 10
			}],
			"Urgency": ""
		}],
		"TimeConstraints": [{
			"Desc": "",
			"Type": "",
			"Period": {
				"Start": "",
				"End": ""
			}
		}],
		"UserName": ""
	},
	"ApptWnd": {
		"Desc": "",
		"Earliest": "2014-12-15T10:00:00Z",
		"Latest": "2014-12-15T10:00:00Z"
	},
	"Assets": [{
		"AssetNum": "",
		"Desc": "",
		"FlexAttrs": {
			"${FlexFormID}": {
				"${FlexAttrID}": [
					"",
					""
				]
			}
		},
		"FlexForms": [
			"${FlexFormID}"
		],
		"FlexFormsDisplayValues": [{
			"FlexFormID": "${FlexFormID}",
			"Title": "",
			"FlexGroups": [{
				"Title": "",
				"FlexAttrs": [{
					"FlexAttrID": "${FlexAttrID}",
					"Label": "label text",
					"Value": "value text"
				}]
			}]
		}],
		"FlexView": [{
			"ID": "",
			"Title": "GroupName1",
			"Items": [{
				"ID": "",
				"Label": "labeltext",
				"Value": "value text",
				"Delete": true
			}],
			"Delete": false
		}],
		"InServiceDate": "",
		"IsComponent": false,
		"LastServiceDate": "",
		"Location": "",
		"Mfg": "",
		"Model": "",
		"ProdNum": "",
		"SerialNum": "",
		"ServiceCodes": [],
		"ServiceCodesDesc": [],
		"Status": "",
		"Type": "",
		"VerificationAPI": {
			"IsVerified": false,
			"VerificationDate": "2018-12-15T10:00:00.001Z"
		},
		"VerificationQR": {
			"IsVerified": false,
			"VerificationDate": "2018-12-15T10:00:00.001Z"
		},
		"Delete": false
	}],
	"Billable": false,
	"CanReject": false,
	"CanResched": false,
	"Claims": [{
		"ClaimNum": "",
		"BatchNum": "",
		"SeqNum": "",
		"Status": "",
		"StatusDesc": "",
		"Amount": ""
	}],
	"CollectPayment": false,
	"Concessions": [{
		"ConcessionID": "",
		"Desc": "",
		"Extensions": {},
		"Fixed": 0,
		"LookupCode": "",
		"Percentage": 0,
		"ProdTypes": [
			"${ProdType[.SubType]}"
		]
	}],
	"Credits": [{
		"ID": "",
		"Desc": "",
		"Amount": 50,
		"Delete": false
	}],
	"Deleted": 0,
	"Description": "",
	"Discounts": [{
		"ID": "",
		"Desc": "",
		"Fixed": 0,
		"IsApplied": true,
		"Percentage": 0,
		"ProdTypes": [
			"${ProdType[.SubType]}"
		],
		"Delete": false
	}],
	"DispatchStatus": 0,
	"DispatchUTC": "",
	"EmailEstimate": true,
	"EmailInvoice": true,
	"EstimateEmailAddress": "",
	"ExcessiveService": false,
	"Extensions": {
		"ADP #": ""
	},
	"FlexAttrs": {
		"${FlexFormID}": {
			"${FlexAttrID}": [
				"",
				""
			]
		}
	},
	"FlexFormRules": {
		"${FlexFormID}": {
			"AttachToInvoice": {
				"CanOverride": true,
				"Value": true
			}
		}
	},
	"FlexForms": [
		"${FlexFormID}",
		"${FlexFormID}"
	],
	"FlexFormsDisplayValues": [{
		"FlexFormID": "${FlexFormID}",
		"Title": "",
		"FlexGroups": [{
			"Title": "",
			"FlexAttrs": [{
				"FlexAttrID": "${FlexAttrID}",
				"Label": "label text",
				"Value": "value text"
			}]
		}]
	}],
	"FlexView": [{
		"ID": "",
		"Title": "GroupName",
		"Items": [{
			"ID": "",
			"Label": "labeltext",
			"Value": "value text",
			"Delete": false
		}],
		"Delete": false
	}],
	"FollowupSchedule": {
		"ID": "",
		"Desc": "",
		"Type": "",
		"Period": {
			"Start": "",
			"End": ""
		},
		"Delete": false
	},
	"HardStop": "",
	"HelperTechs": [],
	"IVRMessageOverrides": [{
		"code": "",
		"desc": "",
		"Delete": false
	}],
	"IVRMessages": {
		"${ContactNumber}": {
			"RequestID": "",
			"Type": "",
			"RefCode": "",
			"Status": "",
			"ContactName": "",
			"ContactNumber": "",
			"Message": {
				"code": "",
				"desc": ""
			}
		}
	},
	"InJeopardy": false,
	"Invoice": {
		"Created": true,
		"CreateDate": "2014-12-15T10:00:00Z"
	},
	"InvoiceEmailAddress": "",
    "IsDealerService": false,  
    "IsDelivered": false,
	"IsRead": false,
	"IsRedacted": false,
	"Items": [{
		"ID": "",
		"AllowConcessions": false,
		"AllowDiscounts": false,
		"AssetNum": "",
		"BatchNum": "",
		"DispositionReasons": [{
			"ReasonCode": "",
			"Desc": "",
			"Qty": 0
		}],
		"FlexView": [{
			"Title": "GroupName",
			"Items": [{
				"Label": "labeltext",
				"Value": "valuetext"
			}]
		}],
		"GeneralIncomeAccount": "1001",
		"IsAdvShip": false,
		"IsChargeable": false,
		"IsRet": false,
		"IsUnused": false,
		"NonDiscountable": false,
		"NonTaxable": false,
		"Price": 0,
		"PriceOverrideFlag": true,
		"ProdAttrs": {
			"Desc": "",
			"IsBatch": false,
			"IsInvCtrl": false,
			"IsSerialized": false,
			"ProdType": "1001"
		},
		"ProdNum": "1001",
		"Qty": 0,
		"RefCode": "",
		"ReturnReasonCode": "",
		"SerialNum": "1001001",
		"StorageLocationID": "",
		"SupersededPartsDesc": "",
		"Delete": false
	}],
	"Location": {
		"Address": {
			"AddrLine1": "",
			"AddrLine2": "",
			"AddrLine3": "",
			"AddrLine4": "",
			"AddrType": "",
			"City": "",
			"Country": "",
			"Region": "",
			"Zip": ""
		},
		"Contacts": [{
			"Email": "",
			"FirstName": "",
			"IsPrimary": true,
			"LastName": "",
			"Phones": [{
				"PhoneNum": "",
				"PhoneType": ""
			}]
		}],
		"Email": "",
		"LanguageID": "",
		"LocationNum": "",
		"Name": "",
		"Notes": "",
		"POReq": false,
		"ServiceAreaID": "",
		"SigReq": true,
		"StorageLocationID": "",
		"WorkCenter": ""
	},
	"MaxDiscounts": {
		"${ProdType}": {
			"Percentage": 0,
			"Fixed": 0
		}
	},
	"NonTaxable": false,
	"Notes": [{
		"ID": "",
		"Author": "",
		"Date": "",
		"ReadOnly": true,
		"Text": "",
		"Delete": true
	}],
	"OrderAmount": 0,
	"OrderDate": "",
	"OrderNum": "",
	"OrderNumFollowUp": "",
	"OrderStatus": "",
	"OrderSubStatus": "",
    "OrderSubStatusOverrides": [{
		"code": "",
		"desc": "",
		"Delete": false
	}],
	"OrderSubType": "",
	"OrderType": "",
	"OrderedItems": [{
		"EstimatedDelivery": "2014-12-15T10:00:00.000Z",
		"PartOrderNum": "",
		"PartStatus": "",
		"Price": 0,
		"ProdAttrs": {
			"Desc": ""
		},
		"ProdNum": "1001",
		"Qty": 0,
		"ShipToLocation": "",
		"SupersededParts": [{
			"ProdNum": "",
			"PartStatus": "{free text}",
			"ProdAttrs": {
				"Desc": "",
				"IsBatch": false,
				"IsInvCtrl": false,
				"IsSerialized": false,
				"ProdType": "1001"
			},
			"Qty": 10,
			"Delete": false
		}],
		"SupersededPartsDesc": "",
		"Urgency": "",
		"Delete": false
	}],
	"Paused": false,
	"PaymentRequest": {
		"Amount": 123,
		"Recipient": {
			"EmailAddresses": [
				""
			],
			"FirstName": "",
			"LastName": "",
			"PhoneNum": ""
		},
		"InvoiceID": "",
		"InvoiceNum": "",
		"InvoiceURL": "",
		"SendDateUTC": ""
	},
	"Payments": [{
		"Amount": 10,
		"ID": "9586647f-e348-4e5d-8b85-0d99f1b154d1",
		"MaskedPAN": "",
		"PaymentUTC": "2018-12-15T10:00:00.001Z",
		"RawTransaction": "",
		"RefNum": "",
		"Source": "",
		"TransactionStatus": "",
		"TransactionType": "",
		"Type": "Card"
	}],
	"Photos": [{
		"Date": "",
		"ID": "",
		"Note": "",
		"URL": ""
	}],
	"PlannedEndDate": "",
	"PlannedStartDate": "",
	"PreviousBalance": 89.99,
	"PrimaryUserName": "",
	"Priority": "",
	"PurchaseOrder": {
		"Amount": 24,
		"PONum": "",
	},
	"ReasonCode": "",
	"ReferralSource": "",
	"RejectReasonCode": "",
	"RejectReasons": [{
		"code": "",
		"desc": ""
	}],
	"Remarks": "",
	"RepairLocation": {
		"Address": {
			"AddrLine1": "",
			"AddrLine2": "",
			"AddrLine3": "",
			"AddrLine4": "",
			"AddrType": "",
			"City": "",
			"Country": "",
			"Intersection": "",
			"Lat": "",
			"Lon": "",
			"Region": "",
			"Zip": ""
		},
		"Type": ""
	},
	"RepeatCall": false,
	"ReqDeposit": {
		"IsApplied": false,
		"Fixed": 50,
		"Percentage": 25
	},
	"ReschedReasons": [{
		"code": "",
		"desc": "",
		"Delete": false
	}],
	"Rules": {
		"CanCreateNewOrder": false,
		"CanDuplicate": false,
		"CanEditAccount": false,
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanEditOrderType": false,
		"CanEditRepeatCall": false,
		"CanTakePhotos": false,
		"CanRequestMoreTime": false,
		"CanScanQRCode": false,
		"CanScheduleFollowup": false,
		"CanSendIVR": false,
		"CanSetChargeable": false,
        "CanSetDealerService": false,   
        "CanSetLineItemTaxable": false,
		"CanSetPrice": false,
		"CanSetWorkOrderTaxable": false,
		"CanUseAlerts": false,
		"CanUseConcessions": false,
		"CanUseServiceContract": false,
		"CanVerifyAsset": false,
		"CombineDiscounts": false,
		"InWarranty": false,
		"IsAssetInstallDateReq": false,
		"IsAssetModelNumReq": false,
		"IsAssetSerialNumReq": false,
		"IsEstimateSigReq": false,
		"IsFollowUpRequestObjectReq": false,
		"IsHelperOrder": false,
		"IsOps": false,
		"IsShipLocationReq": false,
		"IsServiceCodeReq": false,
		"IsSigReq": false,
		"IsTravelRequired": false
		"ModelNumPattern": "",
		"SerialNumPattern": "",
        "Validations": { 
           "AssetModelNumExists": false 
        },   
        "ValidateMailOrderParts": false
	},
    "SelectedCloseStatus": "",
 	"SelectedCloseReason": "",
	"ServiceContracts": [{
		"AssetNum": "",
		"AuthorizationNum": "",
		"AuthorizationLimit": 100.0,
		"BillToAccountNum": "",
		"ContractID": "",
		"ContractProvider": "",
		"CoverageEndDate": "",
		"CoverageStartDate": "",
		"RefNum": ""
	}],
	"ServiceProvider": {
		"NetworkAccountNum": ""
	},
	"ShowPrice": true,
	"Signatures": [{
		"Image": "",
		"ImageFmt": "",
		"Name": ""
	}],
	"Surveys": [],
	"Tasks": [{
		"TaskID": "",
		"TaskType": "",
		"ActualStart": "",
		"ActualEnd": "",
		"Desc": "",
		"Dur": "",
		"Extensions": {
			"key": "value1"
		},
		"FlexAttrs": {
			"${FlexFormID}": {
				"${FlexAttrID}": [
					"",
					""
				]
			}
		},
		"FlexForms": [
			"${FlexFormID}"
		],
		"FlexFormsDisplayValues": [{
			"FlexFormID": "${FlexFormID}",
			"Title": "",
			"FlexGroups": [{
				"Title": "",
				"FlexAttrs": [{
					"FlexAttrID": "${FlexAttrID}",
					"Label": "label text",
					"Value": "value text"
				}]
			}]
		}],
		"FlexView": [{
			"ID": "",
			"Title": "GroupName",
			"Items": [{
				"ID": "",
				"Label": "labeltext",
				"Value": "value text",
				"Delete": false
			}],
			"Delete": false
		}],
		"Paused": false,
		"Priority": 1,
		"Notes": [{
			"ID": "",
			"Author": "",
			"Date": "",
			"ReadOnly": true,
			"Text": "",
			"Delete": true
		}],
		"SchedDur": "",
		"SchedEnd": "",
		"SchedStart": "",
		"Status": "",
		"Title": "",
		"Delete": false
	}],
	"Taxes": {
		"OrderTypes": [{
			"OrderType": "1001",
			"ProdTypes": {
				"${ProdType}": 6
			}
		}]
	},
	"TechCreated": false,
	"TechNotes": [{
		"ID": "",
		"Author": "",
		"Date": "",
		"Text": "",
		"Delete": false
	}],
	"TimeConstraints": [{
		"ID": "",
		"Desc": "",
		"Type": "",
		"Period": {
			"Start": "",
			"End": ""
		},
		"Delete": false
	}],
	"Title": "",
	"Totals": {
		"ConcessionsTotal": 0,
		"CreditTotal": 0,
		"DepositTotal": 0,
		"DiscountTotal": 0,
		"LineItemTotal": 0,
		"ReturnTotal": 0,
		"GrandTotal": 0,
		"TaxTotal": 0,
		"TaxByType": {
			"${ProdType[.SubType]}": 0
		}
	},
	"UnableToCollect": [{
		"Amount": 339.81,
		"AuthorizationNum": ""
	}],
	"UserAdjustedEndUTC": "",
    "UserAdjustedStartUTC": "",
    "UserAdjustedTravelEndUTC": "",
    "UserAdjustedTravelStartUTC": "",
	"UserName": "",
	"Videos": [{
		"Date": "",
		"ID": "",
		"Note": "",
		"URL": ""
	}],
	"Warranty": [{
		"ID": "",
		"Desc": "",
		"IsApplied": true,
		"ProdTypes": [
			"${ProdType[.SubType]}",
			"${ProdType[.SubType]}",
			"${ProdType[.SubType]}"
		],
		"Percentage": 0,
		"Delete": false
	}],
	"WarrantyReasonCode": ""

}

Otherwise, on error, the API returns the standard response object.

Insert or Update the details of a specific Work Order

This REST API will insert a new Work Order with the specified ID into the system, if a Work Order with the specified ID does not already exist in the system.

If, however, the Work Order with the specified ID does already exist in the system, then this REST API will update (i.e. replace) the already existing Work Order with the specified ID with the details of the Work Order supplied in the HTTP Request Body.

URL

PUT /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

HTTP Request Body

The HTTP request body must contain a valid Work Order Object.

HTTP Response

The API returns the standard response object on both success and error.

Update the details of a specific Work Order

(warning) The implementation of this API changed in 3.19.0. Prior to this version of the API, this API method would update only the supplied details; the API now updates (i.e. replaces) the entire Work Order. This is a non-backwards compatible API change; users of the API who want to update only the supplied details without replacing the entire object must update their API integration to use the PATCH API method instead (see below).

This REST API will update (i.e. replace) the already existing Work Order with the specified ID with the details of the Work Order supplied in the HTTP Request Body.

The Work Order with the specified ID must already exist in the system.

URL

POST /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

HTTP Request Body

The HTTP request body must contain a valid Work Order Object.

HTTP Response

The API returns the standard response object on both success and error.

Update only supplied details of a specific Work Order

(warning) This API was introduced in 3.19.0. This API is effectively the how the POST API method worked in prior versions of the API.

This REST API will update an existing Work Order with the information provided.

Any existing information not specified in the new request will remain unchanged.

The Work Order with the specified ID must already exist in the system.

URL

PATCH /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

(info) API users with clients that do not support the PATCH method may use a POST method with the X-HTTP-Method-Override: PATCH header. See: http://jsonapi.org/recommendations/#patchless-clients

HTTP Request Body

The HTTP request body must contain a valid Work Order Object.

HTTP Response

The API returns the standard response object on both success and error.

Delete a specific Work Order

This REST API will delete a Work Order with the specified ID from the system. The Work Order with the specified ID must already exist in the system.

URL

DELETE /seiapi/v3/trans/WorkOrder/${WorkOrderNum}

HTTP Request Body

This request does not require a request body.

HTTP Response

The API returns the standard response object on both success and error.



PATCH Request Examples

The following examples assume the specified work order already exist in the system. 

Example 1: Add an Asset

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"Assets": [{
		"AssetNum": "3182",
		"Desc": "Dishwasher",
		"IsComponent": false,
		"Type": "1001"
	}],
	"OrderNum": "1214"
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Assets": [{
		"AssetNum": "3182",
		"Desc": "Dishwasher",
		"IsComponent": false,
		"Type": "1001"
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

Example 2: Replace Assets

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Assets": [{
		"AssetNum": "3182",
		"Desc": "Dishwasher",
		"IsComponent": false,
		"Type": "1001"
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"_fields": ["Assets"],
	"Assets": [{
		"AssetNum": "310067",
		"Desc": "Vending Machine",
		"IsComponent": false,
		"Type": "1001"
	}],
	"OrderNum": "1214"
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Assets": [{
		"AssetNum": "310067",
		"Desc": "Vending Machine",
		"IsComponent": false,
		"Type": "1001"
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

Example 3: Remove Rules

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"_fields": ["Rules"],
	"OrderNum": "1214"
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003"
}

Example 4: Empty Rules

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"OrderNum": "1214",
    "Rules": {}
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003"
}

Example 5: Remove FlexView with a specific ID from FlexView collection

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"FlexView": [{
			"ID": "1001",
			"Title": "Customer",
			"Items": [{
				"Label": "Status",
				"Value": "Preferred Customer"
			}]
		},
		{
			"ID": "1002",
			"Title": "Special Instructions",
			"Items": [{
				"Label": "Parking",
				"Value": "Parking in the rear"
			}]
		}
	],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"_paths": ["$.FlexView[?(@.ID=='1001')]"],
	"OrderNum": "1214"
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"FlexView": [{
		"ID": "1002",
		"Title": "Special Instructions",
		"Items": [{
			"Label": "Parking",
			"Value": "Parking in the rear"
		}]
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

Example 6: Remove FlexView with a specific ID from FlexView collection (Alternative Approach)

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"FlexView": [{
			"ID": "1001",
			"Title": "Customer",
			"Items": [{
				"Label": "Status",
				"Value": "Preferred Customer"
			}]
		},
		{
			"ID": "1002",
			"Title": "Special Instructions",
			"Items": [{
				"Label": "Parking",
				"Value": "Parking in the rear"
			}]
		}
	],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"FlexView": [{
		"ID": "1001",
		"Delete": true
	}],
	"OrderNum": "1214"
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"FlexView": [{
		"ID": "1002",
		"Title": "Special Instructions",
		"Items": [{
			"Label": "Parking",
			"Value": "Parking in the rear"
		}]
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

Example 7: Add “Fixed” property to the Discount object and update “Percentage” value

Initial Work Order

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Discounts": [{
		"ID": "1",
		"Desc": "",
        "IsApplied": true,
        "Percentage": 4.0,
        "ProdTypes": [
            "1001"
        ]
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}

PATCH Request

{
	"OrderNum": "1214",
	"Discounts": [{
		"ID": "1",
		"Fixed": 4.0,
		"Percentage": 5.2
	}]
}

Result

{
	"Account": {
		"AccountNum": "1029",
		"AccountType": "1001",
		"Name": "Buckhead Inc."
	},
	"Discounts": [{
		"ID": "1",
		"Desc": "",
		"Fixed": 4.0,
		"IsApplied": true,
		"Percentage": 5.2,
 		"ProdTypes": [
            "1001"
        ]
	}],
	"Location": {
		"Address": {
			"AddrLine1": "1 Buckhead Loop Northeast",
			"City": "Atlanta",
			"Country": "United States",
			"Region": "Georgia",
			"Zip": "30326"
		},
		"LanguageID": "en",
		"LocationNum": "1030",
		"Name": "Buckhead Station",
		"SigReq": false,
		"WorkCenter": "Default"
	},
	"DispatchUTC": "2016-02-19T20:44:15.498Z",
	"DispatchStatus": 3,
	"OrderDate": "2016-02-19T20:44:15.498Z",
	"OrderNum": "1214",
	"OrderStatus": "1",
	"OrderType": "1001",
	"Priority": "1003",
	"Rules": {
		"CanEditAsset": false,
		"CanEditDiscounts": false,
		"CanSetChargeable": false,
		"CanSetPrice": false,
		"InWarranty": false,
		"IsOps": false,
		"StackDiscounts": false
	}
}