Create a Work Order
Purpose
To insert a new work order record.
Request URL
https://fsm.zoho.com/fsm/v1/Work_Orders
Request Method
POST
Scope
scope=ZohoFSM.modules.WorkOrders.CREATE
Mandatory Parameters
Name | Description | Type |
Summary | A summary for the work order | String |
Type | Whether the work order is of type Service or Inspection | String |
Contact* | The ID of the contact for whom the work order is being created | String |
Company* | The ID of the company for which the work order is being created | String |
Territory | The ID of the territory where you want the work order to be assigned This field will be mandatory only if territories other than the default service territory have been added to your FSM organization. | String |
Service_Address | Specify the ID of the service address you want for the work order Example: "id": "1011000000208180" | JSON Object |
Billing_Address | Specify the ID of the business address you want for the work order Example: "id": "1011000000208179" | JSON Object |
Service_Line_Items | Details of the services for which the work order is being created:
| JSON Array String String Integer Integer |
*This field will be mandatory depending on the sync type for the FSM-Invoice/Books integration
Sample Request
Copiedcurl --request POST 'https://fsm.zoho.com/fsm/v1/Work_Orders' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
-d "@newWO.json"
Sample Input
Copied{
"data": [
{
"Summary": "AC Installation",
"Priority": "Medium",
"Type": "Service",
"Due_Date": "2022-03-08",
"Estimate": null,
"Request": null,
"Contact": "1011000000208173",
"Company": "1011000000139165",
"Phone": "111-111-1111",
"Email": "lucy.robins@zylker.com",
"Asset": null,
"Territory": "1011000000139343",
"Service_Address": {
"id": "1011000000208180",
"Service_Street_1": "813 E State St",
"Service_Street_2": null,
"Service_State": "Illinois",
"Service_Zip_Code": "61104",
"Service_Longitude": "-89.084456",
"Service_City": "Rockford",
"Service_Country": "United States",
"Service_Latitude": "42.266611",
"Service_Address_Name": "Service Address"
},
"Billing_Address": {
"id": "1011000000208179",
"Billing_City": "Rockford",
"Billing_Country": "United States",
"Billing_Latitude": "42.310056",
"Billing_Street_1": "3338 N Main St",
"Billing_Street_2": null,
"Billing_State": "Illinois",
"Billing_Zip_Code": "61103",
"Billing_Longitude": "-89.077599",
"Billing_Address_Name": "Billing Address"
},
"Preference": {
"Preferred_Date_1": null,
"Preferred_Date_2": null,
"Preferred_Time": null,
"Preference_Note": null
},
"Currency": "USD",
"Exchange_Rate": "1.000000000",
"Sub_Total": 350,
"Tax_Amount": 21.88,
"Adjustment": 0,
"Grand_Total": 372,
"Service_Line_Items": [
{
"Service": "1011000000165262",
"Description": null,
"Quantity": 1,
"Unit": null,
"List_Price": 150,
"Amount": 150,
"Discount": 0,
"Sequence": 1,
"Tax": {
"Tax_Name": "IllinoisTax",
"Tax_Exemption_Code": null,
"Tax_Id": "2908070000000091001",
"Tax_Percentage": 6.25,
"Tax_Exemption_Id": null
},
"Line_Item_Amount": 159.38,
"Discount_Type": "Currency",
"Status": "New",
"Contact": "1011000000208173",
"Skill_Line_Items": [],
"Part_Line_Items": [
{
"Part": "1011000000141098",
"Description": null,
"Quantity": 1,
"Unit": "Quantity",
"List_Price": 200,
"Amount": 200,
"Discount": 0,
"Sequence": 1,
"Tax": {
"Tax_Name": "IllinoisTax",
"Tax_Exemption_Code": null,
"Tax_Id": "2908070000000091001",
"Tax_Percentage": 6.25,
"Tax_Exemption_Id": null
},
"Line_Item_Amount": 212.5,
"Discount_Type": "Currency"
}
]
}
]
}
]
}
Sample Response
Copied{
"result": "success",
"code": "SUCCESS",
"data": {
"Service_Line_Items": [
{
"UID": "Service_Line_Items_0",
"Modified_Time": "2022-03-07T05:48:56-08:00",
"Modified_By": {
"name": "Daniel Warne",
"id": "1011000000139001"
},
"Created_Time": "2022-03-07T05:48:56-08:00",
"id": "1011000000222128",
"Created_By": {
"name": "Daniel Warne",
"id": "1011000000139001"
},
"TabName": "ServiceLineItems"
}
],
"Part_Line_Items": [
{
"UID": "Service_Line_Items_0_Part_Line_Items_0",
"Modified_Time": "2022-03-07T05:48:56-08:00",
"Modified_By": {
"name": "Daniel Warne",
"id": "1011000000139001"
},
"Created_Time": "2022-03-07T05:48:56-08:00",
"id": "1011000000222133",
"Created_By": {
"name": "Daniel Warne",
"id": "1011000000139001"
},
"TabName": "PartLineItems"
}
],
"Work_Orders": [
{
"UID": "Work_Orders_0",
"Modified_Time": "2022-03-07T05:48:55-08:00",
"Modified_By": {
"name": "Daniel Warne",
"id": "1011000000139001"
},
"Created_Time": "2022-03-07T05:48:55-08:00",
"id": "1011000000222119",
"Created_By": {
"name": "Daniel Warne",
"id": "1011000000139001"
},
"TabName": "WorkOrders"
}
]
},
"status": "success"
}