{
  "openapi": "3.0.0",
  "info": {
    "title": "Workiz",
    "description": "The API is built to allow you to create a functional application or integration quickly and easily.<br> All of the Workiz APIs are organized around REST - if you've interacted with a RESTful API already, many of the concepts will be familiar to you.<br> All API calls to Workiz should be made to the https://api.workiz.com/api/v1/ base domain.<br> A JSON will be returned in all responses from the API, including errors. The APIs are designed to have predictable, straightforward URLs and to use HTTP response codes to indicate API errors.",
    "contact": {
      "email": "apisupport@workiz.com"
    },
    "website": "workiz.com",
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.workiz.com/api/v1/{api_token}",
      "description": "Workiz base API",
      "variables": {
        "api_token": {
          "description": "Your accounts API Token",
          "default": "{api_token}"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Jobs",
      "description": "The Job resource is the primary object of Workiz.<br> You can create, update, assign users, change a status and update custom fields describing them.<br> Jobs can be viewed individually or as a list, and can be filtered."
    },
    {
      "name": "Leads",
      "description": "The Lead resource is the primary object of Workiz.<br> You can create, update, assign users, change a status and update custom fields describing them.<br> Leads can be viewed individually or as a list, and can be filtered."
    },
    {
      "name": "Team",
      "description": "The Team resource is the users object of workiz <br> Team members can be viewed individually or as a list."
    },
    {
      "name": "Time Off",
      "description": ""
    }

  ],
  
  "paths": {
    "/TimeOff/get/": {
    "get": {
      "tags": [
        "Time Off"
      ],
      "summary": "Get time off details",
      "description": "You can fetch a list of future time offs",
      "operationId": "getTimeOff",
      "parameters": [
        {
          "name": "all",
          "in": "query",
          "description": "get all users and company time off ",
          "required": false,
          "style": "form",
          "explode": true,
          "schema": {
            "format": "boolean",
            "default": false
          }
        }
      ],
      "responses": {
        "200": {
          "description": "The requested time off resource",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/timeOffAllResponse"
                }
              }
            }
          }
        },
        "400": {
          "description": "bad input parameter"
        }
      }
    }
  },
  "/TimeOff/get/{USER_NAME}": {
    "get": {
      "tags": [
        "Time Off"
      ],
      "summary": "Get time off details for a specific user",
      "description": "You can fetch a list of user's future time offs",
      "operationId": "getUserTimeOff",
      "parameters": [
        {
          "name": "USER_NAME",
          "in": "path",
          "description": "The user's name",
          "required": true,
          "style": "simple",
          "explode": false,
          "schema": {
            "type": "string"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "The requested time off resource",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/userTimeOffResponse"
                }
              }
            }
          }
        },
        "400": {
          "description": "bad input parameter"
        }
      }
    }
  }, 
  "/team/all/": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get team details",
        "description": "You can fetch a list of active team members.",
        "operationId": "getTeam",
        "responses": {
          "200": {
            "description": "The requested team resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/teamAllResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/team/get/{USER_ID}": {
      "get": {
        "tags": [
          "Team"
        ],
        "summary": "Get specific user details",
        "description": "Each user object has its own URL.\nWhere {USER_ID} is the value of the user's unique id field. \n",
        "operationId": "getUser",
        "parameters": [
          {
            "name": "USER_ID",
            "in": "path",
            "description": "The user's ID",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested user resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/getUserResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/get/{UUID}/": {
      "get": {
        "tags": [  
          "Leads"
        ],
        "summary": "Get lead details",
        "description": "Each lead object has its own URL.\nWhere {UUID} is the value of the leads's unique id field. \n",
        "operationId": "getJob",
        "parameters": [
          {
            "name": "UUID",
            "in": "path",
            "description": "The lead's UUID",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Lead"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/all/": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Get lead details",
        "description": "You can fetch a list of leads. <br>The lead list is sorted by the LeadDateTime field and by default is ordered descending, most recently scheduled lead.",
        "operationId": "getLeads",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "description": "the date range of the query starting from 'start_date' until today date. (yyyy-MM-dd)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "format": "date",
              "default": "YYYY-mm-dd"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "record offset",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "records",
            "in": "query",
            "description": "number of records to retrieve (maximum of 100)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "only_open",
            "in": "query",
            "description": "Only list open jobs, excluding the Done and Canceled statuses",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "And array of job statuses to list",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "[\"Submited\",\"In progress\"]"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Lead"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/create/": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Create a new Lead",
        "requestBody": {
          "description": "Leads can be created via a POST method to /job/create,<br> which accepts a JSON object detailing the lead.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/leadBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/update/": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Update a lead's information",
        "requestBody": {
          "description": "leads can be updated via a POST method to /lead/update/,<br> which accepts a JSON object detailing the fields to be updated.<br> Note that the {UUID} is the value of the lead's unique id field. And is required to update a lead.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/leadUpdateResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
      },
      "/lead/markLost/{UUID}/": {
        "post": {
          "tags": [
            "Leads"
          ],
          "summary": "Mark lead as lost",
           "parameters": [
              {
                "name": "UUID",
                "in": "path",
                "description": "The lead's UUID",
                "required": true,
                "style": "simple",
                "explode": false,
                "schema": {
                  "type": "string"
                }
              }
            ],
          "requestBody": {
            "description": "leads can be updated via a POST method to /lead/markLost/.<br> Note that the {UUID} is the value of the lead's unique id field. And is required to update a lead as lost.",
           
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/leadLostBody"
                }
              }
            },
            "required": true
          },
          "responses": {
            "200": {
              "description": "The requested lead resource",
              "content": {
                "application/json": {
                  "schema": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/leadLostResponse"
                    }
                  }
                }
            }
            },
            "400": {
              "description": "bad input parameter"
            }
          }
        }
    },
    "/lead/activate/{UUID}/": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Change lost lead to active again",
         "parameters": [
            {
              "name": "UUID",
              "in": "path",
              "description": "The lead's UUID",
              "required": true,
              "style": "simple",
              "explode": false,
              "schema": {
                "type": "string"
              }
            }
          ],
        "requestBody": {
          "description": "leads can be updated via a POST method to /lead/activate/.<br> Note that the {UUID} is the value of the lead's unique id field. And is required to update a lead as active.",
         
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/leadActivateBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/activateLeadResponse"
                  }
                }
              }
          }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
  },
    "/job/get/{UUID}/": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get job details",
        "description": "Each job object has its own URL.\nWhere {UUID} is the value of the job's unique id field. \n",
        "operationId": "getJob",
        "parameters": [
          {
            "name": "UUID",
            "in": "path",
            "description": "The job's UUID",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/job/all/": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get jobs details",
        "description": "You can fetch a list of jobs. <br>The job list is sorted by the JobDateTime field and by default is ordered descending, most recently scheduled jobs.<br>NOTICE: in case 'start_date' param will not be provided, the default time range will be the last 14 days'",
        "operationId": "getJobs",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "description": "the date range of the query starting from 'start_date' until today date. (yyyy-MM-dd)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "format": "date",
              "default": "YYYY-mm-dd"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "record offset",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "records",
            "in": "query",
            "description": "number of records to retrieve (maximum of 100)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "default": 100
            }
          },
          {
            "name": "only_open",
            "in": "query",
            "description": "Only list open jobs, excluding the Done and Canceled statuses",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "And array of job statuses to list",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "[\"Submited\",\"In progress\"]"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/response"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/job/create/": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Create a new Job",
        "requestBody": {
          "description": "Jobs can be created via a POST method to /job/create,<br> which accepts a JSON object detailing the job.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/body"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/job/update/": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Update a job's information",
        "requestBody": {
          "description": "Jobs can be updated via a POST method to /job/update/,<br> which accepts a JSON object detailing the fields to be updated.<br> Note that the {UUID} is the value of the job's unique id field. And is required to update a job.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/assign/": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Assign a user to a lead",
        "requestBody": {
          "description": "Assign a user to a lead",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/assignResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/assignLeadResponse_data"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/unassign/": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Unassign a user from a lead",
        "requestBody": {
          "description": "Unassign a user from a lead",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/assignResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/assignLeadResponse_data"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/lead/convert/": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Convert Lead to Job",
        "requestBody": {
          "description": "Convert Lead to Job",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/convertLeadBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested lead resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse_data"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/job/assign/": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Assign a user to a job",
        "requestBody": {
          "description": "Assign a user to a job",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/assignResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/job/addPayment/{UUID}/": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "add a payment to a Job",
        "parameters": [
          {
            "name": "UUID",
            "in": "path",
            "description": "The job's UUID",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of payment",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": ["cash", "credit", "check"]
            }
          }
        ],
        "requestBody": {
          "description": "Add a payment to a job. The payment can be of different types (cash, credit card, etc)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addPaymentBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/addPaymentResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    },
    "/job/unassign/": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Unassign a user from a job",
        "requestBody": {
          "description": "Unassign a user from a job",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/assignResponse"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The requested job resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/createResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad input parameter"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "response": {
        "type": "object",
        "properties": {
          "flag": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "$ref": "#/components/schemas/Job"
          }
        }
      },
      "createResponse": {
        "type": "object",
        "properties": {
          "flag": {
            "type": "boolean",
            "example": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/createResponse_data"
            }
          }
        }
      },
      "Lead": {
        "type": "object",
        "properties": {
          "UUID": {
            "type": "string",
            "format": "uuid"
          },
          "SerialId": {
            "type": "integer",
            "example": 795
          },
          "LeadDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "LeadEndDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "ClientId": {
            "type": "integer",
            "format": "integer",
            "example": 1002
          },
          "Status": {
            "type": "string",
            "format": "string",
            "example": "Submitted"
          },
          "SubStatus": {
            "type": "string",
            "format": "string"
          },
          "PaymentDueDate": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "Phone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "SecondPhone": {
            "type": "string",
            "format": "string",
            "example": "6194444444"
          },
          "PhoneExt": {
            "type": "string",
            "format": "string",
            "example": "333"
          },
          "SecondPhoneExt": {
            "type": "string",
            "format": "string",
            "example": "222"
          },
          "Email": {
            "type": "string",
            "format": "string",
            "example": "client@workiz.com"
          },
          "Comments": {
            "type": "string",
            "format": "string",
            "example": "Interested in getting service"
          },
          "FirstName": {
            "type": "string",
            "format": "string",
            "example": "Joe"
          },
          "LastName": {
            "type": "string",
            "format": "string",
            "example": "Acme"
          },
          "Company": {
            "type": "string",
            "format": "string",
            "example": "Acme Inc"
          },
          "Address": {
            "type": "string",
            "format": "string",
            "example": "123 W Main Street"
          },
          "City": {
            "type": "string",
            "format": "string",
            "example": "San Diego"
          },
          "State": {
            "type": "string",
            "format": "string",
            "example": "CA"
          },
          "PostalCode": {
            "type": "string",
            "format": "string",
            "example": "92109"
          },
          "Country": {
            "type": "string",
            "format": "string",
            "example": "US"
          },
          "Unit": {
            "type": "string",
            "format": "string",
            "example": "#12"
          },
          "Latitude": {
            "type": "string",
            "format": "string",
            "example": "37.04654"
          },
          "Longitude": {
            "type": "string",
            "format": "string",
            "example": "-95.61551380000003"
          },
          "JobType": {
            "type": "string",
            "format": "string",
            "example": "Repair"
          },
          "ReferralCompany": {
            "type": "string",
            "format": "string",
            "example": "Thumbtack"
          },
          "Timezone": {
            "type": "string",
            "format": "string",
            "example": "US/Pacific"
          },
          "JobSource": {
            "type": "string",
            "format": "string",
            "example": "Google"
          },
          "LeadNotes": {
            "type": "string",
            "format": "string",
            "example": "Please call client before heading there..."
          },
            "Team": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "35355"
                  },
                  "name": {
                    "type": "string",
                    "example": "Oliver workiz"
                }
              }
            }
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "UUID": {
            "type": "string",
            "format": "uuid"
          },
          "SerialId": {
            "type": "integer",
            "example": 795
          },
          "JobDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "JobEndDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "CreatedDate": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "JobTotalPrice": {
            "type": "string",
            "format": "string",
            "example": "175"
          },
          "JobAmountDue": {
            "type": "string",
            "format": "string",
            "example": "175"
          },
          "SubTotal": {
            "type": "string",
            "format": "string",
            "example": "175"
          },
          "item_cost": {
            "type": "string",
            "format": "string",
            "example": "25"
          },
          "tech_cost": {
            "type": "string",
            "format": "string",
            "example": "10"
          },
          "ClientId": {
            "type": "integer",
            "format": "integer",
            "example": 1002
          },
          "Status": {
            "type": "string",
            "format": "string",
            "example": "Submitted"
          },
          "SubStatus": {
            "type": "string",
            "format": "string"
          },
          "PaymentDueDate": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "Phone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "SecondPhone": {
            "type": "string",
            "format": "string",
            "example": "6194444444"
          },
          "PhoneExt": {
            "type": "string",
            "format": "string",
            "example": "333"
          },
          "SecondPhoneExt": {
            "type": "string",
            "format": "string",
            "example": "222"
          },
          "Email": {
            "type": "string",
            "format": "string",
            "example": "client@workiz.com"
          },
          "Comments": {
            "type": "string",
            "format": "string",
            "example": "Interested in getting service"
          },
          "FirstName": {
            "type": "string",
            "format": "string",
            "example": "Joe"
          },
          "LastName": {
            "type": "string",
            "format": "string",
            "example": "Acme"
          },
          "Company": {
            "type": "string",
            "format": "string",
            "example": "Acme Inc"
          },
          "Address": {
            "type": "string",
            "format": "string",
            "example": "123 W Main Street"
          },
          "City": {
            "type": "string",
            "format": "string",
            "example": "San Diego"
          },
          "State": {
            "type": "string",
            "format": "string",
            "example": "CA"
          },
          "PostalCode": {
            "type": "string",
            "format": "string",
            "example": "92109"
          },
          "Country": {
            "type": "string",
            "format": "string",
            "example": "US"
          },
          "Unit": {
            "type": "string",
            "format": "string",
            "example": "#12"
          },
          "Latitude": {
            "type": "string",
            "format": "string",
            "example": "37.04654"
          },
          "Longitude": {
            "type": "string",
            "format": "string",
            "example": "-95.61551380000003"
          },
          "JobType": {
            "type": "string",
            "format": "string",
            "example": "Repair"
          },
          "ReferralCompany": {
            "type": "string",
            "format": "string",
            "example": "Thumbtack"
          },
          "Timezone": {
            "type": "string",
            "format": "string",
            "example": "US/Pacific"
          },
          "JobNotes": {
            "type": "string",
            "format": "string",
            "example": "Please call client before heading there..."
          },
          "JobSource": {
            "type": "string",
            "format": "string",
            "example": "Google"
          },
          "CreatedBy": {
            "type": "string",
            "format": "string",
            "example": "Tom Workiz"
          },
          "ServiceArea":{
            "type": "string",
            "format": "string",
            "example": "metro1"
          },
          "LastStatusUpdate": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "Tags": {
            "type": "array",
            "tag":"string"
          },
          "Team": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "35355"
                },
                "name": {
                  "type": "string",
                  "example": "Oliver workiz"
                }
              }
            }
          }
        }
      },
      "NoteBody": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "date-time",
            "example": "sec_xyz"
          },
          "comment": {
            "type": "string",
            "format": "string",
            "example":  "first notes example"
          },
          "uuid": {
            "type": "string",
            "format": "string",
            "example": "65PWRY"
          }
        }
      },
      "leadBody": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "date-time",
            "example": "sec_xyz"
          },
          "LeadDateTime": {
            "type": "string",
            "format": "string",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "LeadEndDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "ClientId": {
            "type": "integer",
            "format": "integer",
            "example": 1002
          },
          "LeadLost": {
            "type": "integer",
            "format": "integer",
            "example": 0
          },
          "Phone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "PhoneExt": {
            "type": "string",
            "format": "string",
            "example": "333"
          },
          "SecondPhone": {
            "type": "string",
            "format": "string",
            "example": "6194444444"
          },
          "SecondPhoneExt": {
            "type": "string",
            "format": "string",
            "example": "222"
          },
          "Email": {
            "type": "string",
            "format": "string",
            "example": "client@workiz.com"
          },
          "FirstName": {
            "type": "string",
            "format": "string",
            "example": "Joe"
          },
          "LastName": {
            "type": "string",
            "format": "string",
            "example": "Acme"
          },
          "Company": {
            "type": "string",
            "format": "string",
            "example": "Acme Inc"
          },
          "Address": {
            "type": "string",
            "format": "string",
            "example": "123 W Main Street"
          },
          "City": {
            "type": "string",
            "format": "string",
            "example": "San Diego"
          },
          "State": {
            "type": "string",
            "format": "string",
            "example": "CA"
          },
          "PostalCode": {
            "type": "string",
            "format": "string",
            "example": "92109"
          },
          "Country": {
            "type": "string",
            "format": "string",
            "example": "US"
          },
          "Unit": {
            "type": "string",
            "format": "string",
            "example": "#12"
          },
          "JobType": {
            "type": "string",
            "format": "string",
            "example": "Repair"
          },
          "ReferralCompany": {
            "type": "string",
            "format": "string",
            "example": "Thumbtack"
          },
          "Timezone": {
            "type": "string",
            "format": "string",
            "example": "US/Pacific"
          },
          "JobSource": {
            "type": "string",
            "format": "string",
            "example": "Google"
          },
          "LeadNotes": {
            "type": "string",
            "format": "string",
            "example": "Please call client before heading there..."
          },
          "Created": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "CreatedBy" :{
            "type" : "string",
            "format" :"string",
            "example" : "Joe Acem"
          },
          "ServiceArea":{
            "type": "string",
            "format": "string",
            "example": "metro1"
          }
        }
      },
      "body": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "JobDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "JobEndDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "ClientId": {
            "type": "integer",
            "format": "integer",
            "example": 1002
          },
          "Company": {
            "type": "string",
            "format": "string",
            "example": "Sample Company name"
          },
          "Phone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "PhoneExt": {
            "type": "string",
            "format": "string",
            "example": "619"
          },
          "SecondPhone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "SecondPhoneExt": {
            "type": "string",
            "format": "string",
            "example": "619"
          },
          "Email": {
            "type": "string",
            "format": "string",
            "example": "client@workiz.com"
          },
          "FirstName": {
            "type": "string",
            "format": "string",
            "example": "Joe"
          },
          "LastName": {
            "type": "string",
            "format": "string",
            "example": "Acme"
          },
          "Address": {
            "type": "string",
            "format": "string",
            "example": "123 W Main Street"
          },
          "City": {
            "type": "string",
            "format": "string",
            "example": "San Diego"
          },
          "State": {
            "type": "string",
            "format": "string",
            "example": "CA"
          },
          "Country": {
            "type": "string",
            "format": "string",
            "example": "US"
          },
          "PostalCode": {
            "type": "string",
            "format": "string",
            "example": "92109"
          },
          "Unit": {
            "type": "string",
            "format": "string",
            "example": "10"
          },
          "JobType": {
            "type": "string",
            "format": "string",
            "example": "Lock Repair"
          },
          "ReferralCompany": {
            "type": "string",
            "format": "string",
            "example": "Thumbtack"
          },
          "Timezone": {
            "type": "string",
            "format": "string",
            "example": "US/Pacific"
          },
          "JobSource": {
            "type": "string",
            "format": "string",
            "example": "Google"
          },
          "JobNotes": {
            "type": "string",
            "format": "string",
            "example": "Please call client before heading there..."
          },
          "CreatedBy" :{
            "type" : "string",
            "format" :"string",
            "example" : "Joe Acem"
          },
          "Created": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "ServiceArea":{
            "type": "string",
            "format": "string",
            "example": "metro1"
          }
        }
      },
      "updateResponse": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "UUID": {
            "type": "string",
            "format": "string",
            "example": "XYZ56X"
          },
          "Status": {
            "type": "string",
            "format": "string",
            "example": "In progress"
          },
          "SubStatus": {
            "type": "string",
            "format": "string",
            "example": "Sample SubStatus"
          },
          "JobDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "JobEndDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "ClientId": {
            "type": "integer",
            "format": "integer",
            "example": 1002
          },
          "Company": {
            "type": "string",
            "format": "string",
            "example": "Sample Company name"
          },
          "Phone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "PhoneExt": {
            "type": "string",
            "format": "string",
            "example": "619"
          },
          "SecondPhone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "SecondPhoneExt": {
            "type": "string",
            "format": "string",
            "example": "619"
          },
          "Email": {
            "type": "string",
            "format": "string",
            "example": "client@workiz.com"
          },
          "FirstName": {
            "type": "string",
            "format": "string",
            "example": "Joe"
          },
          "LastName": {
            "type": "string",
            "format": "string",
            "example": "Acme"
          },
          "Address": {
            "type": "string",
            "format": "string",
            "example": "123 W Main Street"
          },
          "City": {
            "type": "string",
            "format": "string",
            "example": "San Diego"
          },
          "State": {
            "type": "string",
            "format": "string",
            "example": "CA"
          },
          "Country": {
            "type": "string",
            "format": "string",
            "example": "US"
          },
          "PostalCode": {
            "type": "string",
            "format": "string",
            "example": "92109"
          },
          "Unit": {
            "type": "string",
            "format": "string",
            "example": "10"
          },
          "JobType": {
            "type": "string",
            "format": "string",
            "example": "Lock Repair"
          },
          "Timezone": {
            "type": "string",
            "format": "string",
            "example": "US/Pacific"
          },
          "JobSource": {
            "type": "string",
            "format": "string",
            "example": "Google"
          },
          "JobNotes": {
            "type": "string",
            "format": "string",
            "example": "Please call client before heading there..."
          },
          "CreatedBy" :{
            "type" : "string",
            "format" :"string",
            "example" : "Joe Acem"
          },
          "ServiceArea":{
            "type": "string",
            "format": "string",
            "example": "metro1"
          },
          "Tags": {
            "type": "array",
            "format":"array",
            "example": ["estimate", "callback"]
          }
        }
      },
      "leadUpdateResponse": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "UUID": {
            "type": "string",
            "format": "string",
            "example": "XYZ56X"
          },
          "Status": {
            "type": "string",
            "format": "string",
            "example": "In progress"
          },
          "LeadDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "LeadEndDateTime": {
            "type": "string",
            "format": "date-time",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "ClientId": {
            "type": "integer",
            "format": "integer",
            "example": 1002
          },
          "Company": {
            "type": "string",
            "format": "string",
            "example": "Sample Company name"
          },
          "Phone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "PhoneExt": {
            "type": "string",
            "format": "string",
            "example": "619"
          },
          "SecondPhone": {
            "type": "string",
            "format": "string",
            "example": "6195555555"
          },
          "SecondPhoneExt": {
            "type": "string",
            "format": "string",
            "example": "619"
          },
          "Email": {
            "type": "string",
            "format": "string",
            "example": "client@workiz.com"
          },
          "FirstName": {
            "type": "string",
            "format": "string",
            "example": "Joe"
          },
          "LastName": {
            "type": "string",
            "format": "string",
            "example": "Acme"
          },
          "Address": {
            "type": "string",
            "format": "string",
            "example": "123 W Main Street"
          },
          "City": {
            "type": "string",
            "format": "string",
            "example": "San Diego"
          },
          "State": {
            "type": "string",
            "format": "string",
            "example": "CA"
          },
          "Country": {
            "type": "string",
            "format": "string",
            "example": "US"
          },
          "PostalCode": {
            "type": "string",
            "format": "string",
            "example": "92109"
          },
          "Unit": {
            "type": "string",
            "format": "string",
            "example": "10"
          },
          "JobType": {
            "type": "string",
            "format": "string",
            "example": "Lock Repair"
          },
          "Timezone": {
            "type": "string",
            "format": "string",
            "example": "US/Pacific"
          },
          "JobSource": {
            "type": "string",
            "format": "string",
            "example": "Google"
          },
          "LeadNotes": {
            "type": "string",
            "format": "string",
            "example": "Please call client before heading there..."
          },
          "CreatedBy" :{
            "type" : "string",
            "format" :"string",
            "example" : "Joe Acem"
          },
          "ServiceArea":{
            "type": "string",
            "format": "string",
            "example": "metro1"
          },
          "Tags": {
            "type": "array",
            "format":"array",
            "example": ["estimate", "callback"]
          }
        }
      },
      "assignResponse": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "UUID": {
            "type": "string",
            "format": "string",
            "example": "XYZ56X"
          },
          "User": {
            "type": "string",
            "format": "string",
            "example": "Alex Wilson"
          }
        }
      },
      "convertLeadBody": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "UUID": {
            "type": "string",
            "format": "string",
            "example": "XYZ56X"
          }
        }
      },
      "createJobTypeBody_data": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "JobType": {
            "type": "string",
            "example": "JobTypeName"
          }
        }
      },
      "createJobSourceBody_data": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "Source": {
            "type": "string",
            "example": "SourceName"
          },
          "Description": {
            "type": "string",
            "example": "TheJobGroupDescription"
          }
        }
      },
      "createResponse_data": {
        "type": "object",
        "properties": {
          "UUID": {
            "type": "string",
            "example": "XYZ55Y"
          },
          "ClientId": {
            "type": "string",
            "example": "1001"
          },
          "link": {
            "type": "string",
            "example": "https://app.workiz.com/job/1HN2E0/"
          }
        }
      },
      "createPropertyResponse_data": {
        "type": "object",
        "properties": {
          "PropertyId": {
            "type": "string",
            "example": "1234"
          }
        }
      },
      "assignLeadResponse_data": {
        "type": "object",
        "properties": {
          "UUID": {
            "type": "string",
            "example": "XYZ55Y"
          },
          "LeadId": {
            "type": "string",
            "example": "2"
          },
          "link": {
            "type": "string",
            "example": "https://app.workiz.com/lead/1HN2E0/"
          }
        }
      },
      "leadLostResponse": {
        "type": "object",
        "properties": {
          "flag": {
            "type": "bool",
            "example": true
          },
          "msg": {
            "type": "string",
            "example": "Lead marked as lost"
          },
          "code": {
            "type": "string",
            "example": "200"
          }
        }
      },
      "activateLeadResponse": {
        "type": "object",
        "properties": {
          "flag": {
            "type": "bool",
            "example": true
          },
          "msg": {
            "type": "string",
            "example": "Lead activated"
          },
          "code": {
            "type": "string",
            "example": "200"
          }
        }
      },
      "leadLostBody": {
        "type": "object",
        "properties": {
          "auth_secret": {
            "type": "string",
            "example": "sec_8261349333556056446305097980"
            }
          }
        },
        "leadActivateBody": {
          "type": "object",
          "properties": {
            "auth_secret": {
              "type": "string",
              "example": "sec_8261349333556056446305097980"
              }
            }
          },
      "teamAllResponse": {
        "type": "array",
        "items": {
          "properties": {
            "id": {
              "type": "string",
              "example": "34637"
            },
            "name": {
              "type": "string",
              "example": "James Workiz"
            },
            "created": {
              "type": "string",
              "format": "date-time",
              "example": "2020-08-29T09:12:33.001Z"
            },
            "role": {
              "type": "string",
              "example": "tech"
            },
            "fieldTech": {
              "type": "boolean",
              "example": true
            },
            "email": {
              "type": "string",
              "example": "user@workiz.com"
            },
            "serviceAreas": {
              "type": "object",
              "example": [
                "metro1",
                "metro2"
              ]
            },
            "skills": {
              "type": "object",
              "example": [
                "Service",
                "Repair"
              ]
            },
            "active": {
              "type": "boolean",
              "example": true
            }
          }
        }
      },
      "timeOffAllResponse": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-26 09:00:00"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-26 17:00:00"
          },
            "userName": {
              "type": "string",
              "format": "string",
              "example": "Entire Business"
          }
        }
      },
      "userTimeOffResponse": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-27 09:00:00"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "example": "2021-08-27 17:00:00"
          },
            "userName": {
              "type": "string",
              "format": "string",
              "example": "Joe Acme"
          }
        }
      },
      "getUserResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "35512"
          },
          "name": {
            "type": "string",
            "example": "James Workiz"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "example": "2020-08-29T09:12:33.001Z"
          },
          "role": {
            "type": "string",
            "example": "tech"
          },
          "fieldTech": {
            "type": "boolean",
            "example": true
          },
          "email": {
            "type": "string",
            "example": "user@workiz.com"
          },
          "serviceAreas": {
            "type": "object",
            "example": [
              "metro1",
              "metro2"
            ]
          },
          "skills": {
            "type": "object",
            "example": [
              "Service",
              "Repair"
            ]
          },
          "active": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "addPaymentBody": {
        "type": "object",
        "required": [
          "auth_secret",
          "amount",
          "type",
          "date"
        ],
        "properties": {
          "auth_secret": {
            "type": "string",
            "format": "string",
            "example": "sec_xyz"
          },
          "amount": {
            "type": "number",
            "format": "float",
            "description": "Payment amount",
            "example": 100
          },
          "type": {
            "type": "string",
            "description": "Payment type - can be 'cash', 'credit', or 'check'",
            "enum": ["cash", "credit", "check"],
            "example": "cash"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when payment was made",
            "example": "2016-08-29T09:12:33.001Z"
          },
          "reference": {
            "type": "string",
            "description": "Optional confirmation number or reference",
            "example": "102235620"
          }
        }
      },
      "addPaymentResponse": {
        "type": "object",
        "properties": {
          "flag": {
            "type": "boolean",
            "example": true
          },
          "msg": {
            "type": "string",
            "example": "Payment Added"
          },
          "data": {
            "type": "object",
            "properties": {
              "paymentId": {
                "type": "integer",
                "example": 24197827
              }
            }
          }
        }
      }
    }
  }
}