{
  "openapi": "3.0.0",
  "info": {
    "title": "NewWaySERVICE API",
    "description": "The NewWaySERVICE API allows you to exchange data between NewWaySERVICE and other software. All requests are submitted via HTTPS POST to a single endpoint, with XML payloads wrapped in a `<request>` envelope. Responses are XML wrapped in a `<response>` envelope with a `status` attribute (1=success, 0=error).\n**Authentication:** Include your API password in every request as the `password` attribute of the `<request>` tag.\n**Endpoint:** `https://app.newwayservice.com/api.php`\n**Parameter:** POST parameter named `xml_request` containing the full XML request.\n**Date format:** `YYYY-MM-DD`\n**DateTime format:** `YYYY-MM-DD HH:MM:SS`\n**Decimal format:** Dot as decimal separator, no thousands separator. Ex: `23941.60`\n**Strings in responses** are enclosed in CDATA sections. In requests, CDATA is optional unless the string contains special characters.\n**User defined fields** are returned as `udfXXXX` tags with a `description` attribute.\n",
    "version": "5.423.0",
    "contact": {
      "name": "OroLogic Inc.",
      "url": "https://www.newwayservice.com"
    },
    "license": {
      "name": "© 1996-2026 OroLogic Inc. All rights reserved."
    }
  },
  "servers": [
    {
      "url": "https://app.newwayservice.com",
      "description": "NewWaySERVICE production server"
    }
  ],
  "paths": {
    "/api.php": {
      "post": {
        "summary": "Send an API request",
        "description": "All API operations are performed via this single endpoint. The request type is determined by the XML element inside the `<request>` wrapper. Only one request type per call is allowed.\n",
        "operationId": "apiRequest",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": [
                  "xml_request"
                ],
                "properties": {
                  "xml_request": {
                    "type": "string",
                    "description": "Full XML request. Must be wrapped in: `<request app=\"newwayservice\" version=\"5\" password=\"YOUR_PASSWORD\">...</request>`\n",
                    "example": "<request app=\"newwayservice\" version=\"5\" password=\"abcdef-123456\">\n  <customer_list></customer_list>\n</request>\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "XML response. Always check the `status` attribute of the `<response>` tag: `1` = success, `0` = error.\n",
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiResponse": {
        "type": "object",
        "description": "All responses share this structure. On success, status=1 and the relevant data elements are included. On error, status=0 and an `<error>` element is included.\n",
        "properties": {
          "status": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "1=success, 0=error"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Present only when status=0",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code (see Appendix A)",
            "example": 1102
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message (CDATA)",
            "example": "Record duplicate error. A record with the supplied value already exists."
          }
        }
      },
      "CustomerListRequest": {
        "type": "object",
        "description": "`<customer_list>` — Get entire list of customers and their contacts in summary format. No parameters required.\n"
      },
      "CustomerListItem": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Customer name"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactSummary"
            }
          }
        }
      },
      "ContactSummary": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Contact name"
          },
          "main_contact": {
            "type": "string",
            "enum": ["yes", "no"]            
          }
        }
      },
      "CustomerGetRequest": {
        "type": "object",
        "required": [
          "customer_id"
        ],
        "description": "`<customer_get>` — Get a full customer record.",
        "properties": {
          "customer_id": {
            "type": "integer",
            "description": "Required. Id of the customer to retrieve."
          }
        }
      },
      "Customer": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "description": "Customer name"
          },
          "address": {
            "type": "string"
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "category_id": {
            "type": "integer"
          },
          "category_description": {
            "type": "string",
            "maxLength": 35
          },
          "zone_id": {
            "type": "integer"
          },
          "zone_description": {
            "type": "string",
            "maxLength": 35
          },
          "if_is_a_branch_parent_customer_id": {
            "type": "integer",
            "nullable": true
          },
          "if_is_a_branch_bill_parent_customer": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "preferred_technician_id": {
            "type": "integer",
            "nullable": true
          },
          "preferred_technician_name": {
            "type": "string"
          },
          "portal_password": {
            "type": "string",
            "maxLength": 30
          },
          "term_of_payment": {
            "type": "string",
            "maxLength": 30
          },
          "tax_rate_id_parts": {
            "type": "integer"
          },
          "tax_rate_description_parts": {
            "type": "string"
          },
          "tax_rate_id_labor": {
            "type": "integer"
          },
          "tax_rate_description_labor": {
            "type": "string"
          },
          "distance": {
            "type": "number"
          },
          "contact": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            }
          },
          "bank_of_hour": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BankOfHour"
            }
          },
          "labor_rate": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LaborRate"
            }
          },
          "document": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentSummary"
            }
          }
        }
      },
      "CustomerAddRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "description": "`<customer_add>` — Add a new customer.",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 30,
            "description": "Must be unique if specified."
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "description": "Required. Unique customer name."
          },
          "address": {
            "type": "string"
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "default": "active"
          },
          "category_id": {
            "type": "integer"
          },
          "category_description": {
            "type": "string",
            "maxLength": 35,
            "description": "Ignored if category_id is specified."
          },
          "zone_id": {
            "type": "integer"
          },
          "zone_description": {
            "type": "string",
            "maxLength": 35,
            "description": "Ignored if zone_id is specified."
          },
          "if_is_a_branch_parent_customer_id": {
            "type": "integer",
            "nullable": true
          },
          "if_is_a_branch_bill_parent_customer": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "preferred_technician_id": {
            "type": "integer",
            "nullable": true
          },
          "portal_password": {
            "type": "string",
            "maxLength": 30
          },
          "term_of_payment": {
            "type": "string",
            "maxLength": 30
          },
          "tax_rate_id_parts": {
            "type": "integer"
          },
          "tax_rate_description_parts": {
            "type": "string",
            "maxLength": 35
          },
          "tax_rate_id_labor": {
            "type": "integer"
          },
          "tax_rate_description_labor": {
            "type": "string",
            "maxLength": 35
          },
          "contact": {
            "$ref": "#/components/schemas/ContactAddInline"
          }
        }
      },
      "CustomerEditRequest": {
        "type": "object",
        "required": [
          "customer_id"
        ],
        "description": "`<customer_edit>` — Edit an existing customer. Only specified fields are updated.",
        "properties": {
          "customer_id": {
            "type": "integer",
            "description": "Required."
          }
        }
      },
      "Contact": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "integer"
          },
          "customer_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Contact name"
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "mobile": {
            "type": "string",
            "maxLength": 25
          },
          "fax": {
            "type": "string",
            "maxLength": 25
          },
          "email": {
            "type": "string",
            "maxLength": 60
          },
          "position": {
            "type": "string",
            "maxLength": 50
          },
          "notification": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "main_contact": {
            "type": "string",
            "enum": ["yes", "no"]            
          }
        }
      },
      "ContactAddInline": {
        "type": "object",
        "description": "Optional contact section embedded in customer_add.",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 50,
            "description": "Required."
          },
          "position": {
            "type": "string",
            "maxLength": 50
          },
          "notification": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "mobile": {
            "type": "string",
            "maxLength": 25
          },
          "fax": {
            "type": "string",
            "maxLength": 25
          },
          "email": {
            "type": "string",
            "maxLength": 60
          }
        }
      },
      "ContactGetRequest": {
        "type": "object",
        "required": [
          "contact_id"
        ],
        "description": "`<contact_get>` — Get a customer contact record.",
        "properties": {
          "contact_id": {
            "type": "integer"
          }
        }
      },
      "ContactAddRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "name"
        ],
        "description": "`<contact_add>` — Add a new contact to an existing customer.",
        "properties": {
          "customer_id": {
            "type": "integer",
            "description": "Required. Id of an existing customer."
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "description": "Required. Unique per customer."
          },
          "position": {
            "type": "string",
            "maxLength": 50
          },
          "notification": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "mobile": {
            "type": "string",
            "maxLength": 25
          },
          "fax": {
            "type": "string",
            "maxLength": 25
          },
          "email": {
            "type": "string",
            "maxLength": 60
          }
        }
      },
      "ContactEditRequest": {
        "type": "object",
        "required": [
          "contact_id"
        ],
        "description": "`<contact_edit>` — Edit an existing customer contact.",
        "properties": {
          "contact_id": {
            "type": "integer"
          }
        }
      },
      "DocumentSummary": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "integer"
          },
          "filename": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "size": {
            "type": "integer"
          }
        }
      },
      "Document": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DocumentSummary"
          },
          {
            "type": "object",
            "properties": {
              "parent_type": {
                "type": "string"
              },
              "parent_id": {
                "type": "integer"
              },
              "added_via": {
                "type": "integer"
              },
              "added_by": {
                "type": "integer"
              },
              "data": {
                "type": "string",
                "description": "File content encoded in base64. Check attribute file_processing_status."
              }
            }
          }
        ]
      },
      "DocumentGetRequest": {
        "type": "object",
        "required": [
          "document_id"
        ],
        "description": "`<document_get>` — Get a document including its base64-encoded content.",
        "properties": {
          "document_id": {
            "type": "integer"
          }
        }
      },
      "DocumentAddRequest": {
        "type": "object",
        "required": [
          "filename",
          "description",
          "data"
        ],
        "description": "`<document_add>` — Add a new document. Exactly one parent id tag must be provided (customer_id, equipment_id, workorder_id, etc.).\n",
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 254,
            "description": "Required. Original filename."
          },
          "description": {
            "type": "string",
            "maxLength": 65,
            "description": "Required. Short description."
          },
          "data": {
            "type": "string",
            "description": "Required. File content encoded in base64. Max ~10MB."
          },
          "customer_id": {
            "type": "integer"
          },
          "equipment_type_id": {
            "type": "integer"
          },
          "equipment_id": {
            "type": "integer"
          },
          "part_id": {
            "type": "integer"
          },
          "purchase_order_id": {
            "type": "integer"
          },
          "supplier_id": {
            "type": "integer"
          },
          "technician_id": {
            "type": "integer"
          },
          "workorder_id": {
            "type": "integer"
          },
          "article_id": {
            "type": "integer"
          }
        }
      },
      "DocumentDeleteRequest": {
        "type": "object",
        "required": [
          "document_id"
        ],
        "description": "`<document_delete>` — Delete a document.",
        "properties": {
          "document_id": {
            "type": "integer"
          }
        }
      },
      "EquipmentTypeListRequest": {
        "type": "object",
        "description": "`<equipment_type_list>` — Get list of all equipment types. No parameters required."
      },
      "EquipmentType": {
        "type": "object",
        "properties": {
          "equipment_type_id": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "description": {
            "type": "string",
            "maxLength": 65
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "category_id": {
            "type": "integer"
          },
          "category_description": {
            "type": "string"
          }
        }
      },
      "EquipmentTypeGetRequest": {
        "type": "object",
        "required": [
          "equipment_type_id"
        ],
        "description": "`<equipment_type_get>` — Get an equipment type.",
        "properties": {
          "equipment_type_id": {
            "type": "integer"
          }
        }
      },
      "EquipmentTypeAddRequest": {
        "type": "object",
        "required": [
          "description"
        ],
        "description": "`<equipment_type_add>` — Add a new equipment type.",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "description": {
            "type": "string",
            "maxLength": 65,
            "description": "Required. Unique."
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "default": "active"
          },
          "category_id": {
            "type": "integer"
          },
          "category_description": {
            "type": "string",
            "maxLength": 35
          }
        }
      },
      "EquipmentTypeEditRequest": {
        "type": "object",
        "required": [
          "equipment_type_id"
        ],
        "description": "`<equipment_type_edit>` — Edit an existing equipment type.",
        "properties": {
          "equipment_type_id": {
            "type": "integer"
          }
        }
      },
      "EquipmentListRequest": {
        "type": "object",
        "description": "`<equipment_list>` — Get summary list of all equipments. No parameters required."
      },
      "Equipment": {
        "type": "object",
        "properties": {
          "equipment_id": {
            "type": "integer"
          },
          "serial_number": {
            "type": "string"
          },
          "notes_special": {
            "type": "string"
          },
          "notes_internal": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer"
          },
          "equipment_type_id": {
            "type": "integer"
          },
          "has_warranty": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "warranty_duration": {
            "type": "integer",
            "description": "Number of months"
          },
          "sale_date": {
            "type": "string",
            "format": "date"
          },
          "has_service_contract": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "service_contract_date": {
            "type": "string",
            "format": "date"
          },
          "service_contract_duration": {
            "type": "integer",
            "description": "Number of months"
          },
          "service_contract_reference": {
            "type": "string",
            "maxLength": 25
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "has_counter": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "counter_value": {
            "type": "integer"
          },
          "parent_equipment_id": {
            "type": "integer"
          }
        }
      },
      "EquipmentGetRequest": {
        "type": "object",
        "required": [
          "equipment_id"
        ],
        "description": "`<equipment_get>` — Get a single equipment.",
        "properties": {
          "equipment_id": {
            "type": "integer"
          }
        }
      },
      "EquipmentAddRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "equipment_type_id"
        ],
        "description": "`<equipment_add>` — Add a new equipment.",
        "properties": {
          "serial_number": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer",
            "description": "Required."
          },
          "equipment_type_id": {
            "type": "integer",
            "description": "Required."
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "default": "active"
          },
          "has_warranty": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "warranty_duration": {
            "type": "integer"
          },
          "sale_date": {
            "type": "string",
            "format": "date"
          },
          "has_service_contract": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "service_contract_date": {
            "type": "string",
            "format": "date"
          },
          "service_contract_duration": {
            "type": "integer"
          },
          "service_contract_reference": {
            "type": "string",
            "maxLength": 25
          },
          "has_counter": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "counter_value": {
            "type": "integer",
            "default": 0
          },
          "parent_equipment_id": {
            "type": "integer"
          }
        }
      },
      "EquipmentEditRequest": {
        "type": "object",
        "required": [
          "equipment_id"
        ],
        "description": "`<equipment_edit>` — Edit an existing equipment.",
        "properties": {
          "equipment_id": {
            "type": "integer"
          }
        }
      },
      "LaborRate": {
        "type": "object",
        "properties": {
          "labor_rate_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "rate": {
            "type": "number",
            "format": "decimal"
          },
          "status": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "group": {
            "type": "string",
            "enum": [
              "labor",
              "travel"
            ]
          }
        }
      },
      "LaborRateListRequest": {
        "type": "object",
        "description": "`<labor_rate_list>` — List all labor rates. No parameters required."
      },
      "PartListRequest": {
        "type": "object",
        "description": "`<part_list>` — List all parts. No parameters required."
      },
      "Part": {
        "type": "object",
        "properties": {
          "part_id": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "description": {
            "type": "string",
            "maxLength": 65
          },
          "price": {
            "type": "number",
            "format": "decimal"
          },
          "quantity": {
            "type": "number"
          },
          "quantity_to_receive": {
            "type": "number"
          },
          "quantity_to_be_planned": {
            "type": "number"
          },
          "quantity_to_order": {
            "type": "number"
          },
          "minimum_stock_quantity": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "internal_notes": {
            "type": "string"
          },
          "category_id": {
            "type": "integer"
          },
          "part_category_description": {
            "type": "string"
          },
          "supplier_id": {
            "type": "integer"
          },
          "supplier_name": {
            "type": "string"
          },
          "part_quantity": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartQuantity"
            }
          }
        }
      },
      "PartQuantity": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "integer"
          },
          "quantity": {
            "type": "number"
          }
        }
      },
      "PartGetRequest": {
        "type": "object",
        "required": [
          "part_id"
        ],
        "description": "`<part_get>` — Get a single part.",
        "properties": {
          "part_id": {
            "type": "integer"
          }
        }
      },
      "PartAddRequest": {
        "type": "object",
        "required": [
          "description"
        ],
        "description": "`<part_add>` — Add a new part.",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "description": {
            "type": "string",
            "maxLength": 65,
            "description": "Required. Unique."
          },
          "price": {
            "type": "number",
            "default": 0
          },
          "minimum_stock_quantity": {
            "type": "number",
            "default": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "default": "active"
          },
          "internal_notes": {
            "type": "string"
          },
          "part_category_id": {
            "type": "integer",
            "description": "Default category used if not specified."
          },
          "supplier_id": {
            "type": "integer",
            "description": "Default supplier used if not specified."
          }
        }
      },
      "PartEditRequest": {
        "type": "object",
        "required": [
          "part_id"
        ],
        "description": "`<part_edit>` — Edit an existing part.",
        "properties": {
          "part_id": {
            "type": "integer"
          }
        }
      },
      "PartInventoryTxListRequest": {
        "type": "object",
        "description": "`<part_inventory_tx_list>` — List inventory part transactions. All filters are optional.\n",
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date",
            "description": "Must be used with date_to."
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "part_id": {
            "type": "integer"
          },
          "supplier_id": {
            "type": "integer"
          },
          "workorder_id": {
            "type": "integer"
          },
          "technician_id": {
            "type": "integer"
          },
          "warehouse_id": {
            "type": "integer"
          },
          "purchase_order_id": {
            "type": "integer"
          },
          "purchase_order_line_id": {
            "type": "integer"
          }
        }
      },
      "PartInventoryTx": {
        "type": "object",
        "properties": {
          "part_inventory_tx_id": {
            "type": "integer"
          },
          "part_id": {
            "type": "integer"
          },
          "transaction_type": {
            "type": "integer",
            "description": "See Appendix B for values"
          },
          "supplier_id": {
            "type": "integer",
            "nullable": true
          },
          "quantity_in": {
            "type": "number"
          },
          "quantity_out": {
            "type": "number"
          },
          "reference": {
            "type": "string"
          },
          "workorder_id": {
            "type": "integer",
            "nullable": true
          },
          "datetime": {
            "type": "string",
            "format": "date-time"
          },
          "balance_warehouse": {
            "type": "number"
          },
          "technician_id": {
            "type": "integer"
          },
          "warehouse_id": {
            "type": "integer"
          },
          "global_balance": {
            "type": "number"
          },
          "purchase_order_id": {
            "type": "integer",
            "nullable": true
          },
          "purchase_order_line_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PartInventoryTxAddRequest": {
        "type": "object",
        "required": [
          "part_id",
          "type",
          "quantity"
        ],
        "description": "`<part_inventory_tx_add>` — Add a part inventory transaction.",
        "properties": {
          "part_id": {
            "type": "integer",
            "description": "Required."
          },
          "type": {
            "type": "integer",
            "description": "Required. 0=Manual/Other, 2=Manual Purchase/Receiving/RMA",
            "enum": [
              0,
              2
            ]
          },
          "supplier_id": {
            "type": "integer",
            "nullable": true
          },
          "quantity": {
            "type": "number",
            "description": "Required. Positive=add to inventory, negative=remove."
          },
          "reference": {
            "type": "string",
            "maxLength": 50
          },
          "technician_id": {
            "type": "integer",
            "description": "Default technician used if not specified."
          },
          "warehouse_id": {
            "type": "integer",
            "description": "Default warehouse used if not specified."
          }
        }
      },
      "PurchaseOrderListRequest": {
        "type": "object",
        "description": "`<purchase_order_list>` — List purchase orders in summary format. All filters optional.",
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "supplier_id": {
            "type": "integer"
          },
          "warehouse_id": {
            "type": "integer"
          },
          "technician_id": {
            "type": "integer"
          },
          "status": {
            "type": "integer",
            "description": "0=Pending, 1=In progress, 2=Closed, 3=Canceled",
            "enum": [
              0,
              1,
              2,
              3
            ]
          },
          "status_receiving": {
            "type": "integer",
            "description": "0=Not received, 1=Received partially, 2=Received entirely",
            "enum": [
              0,
              1,
              2
            ]
          }
        }
      },
      "PurchaseOrderSummary": {
        "type": "object",
        "properties": {
          "purchase_order_id": {
            "type": "integer"
          },
          "numero": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "integer"
          },
          "status_receiving": {
            "type": "integer"
          },
          "supplier_id": {
            "type": "integer"
          },
          "supplier_name": {
            "type": "string"
          },
          "customer_id": {
            "type": "integer",
            "nullable": true
          },
          "ship_to_name": {
            "type": "string"
          },
          "warehouse_id": {
            "type": "integer"
          },
          "technician_id": {
            "type": "integer"
          },
          "subtotal": {
            "type": "number"
          },
          "number_of_lines": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PurchaseOrderSummary"
          },
          {
            "type": "object",
            "properties": {
              "supplier_code": {
                "type": "string"
              },
              "name": {
                "type": "string",
                "description": "Supplier name"
              },
              "contact": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "mobile": {
                "type": "string"
              },
              "fax": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "ship_to_contact": {
                "type": "string"
              },
              "ship_to_address": {
                "type": "string"
              },
              "ship_to_phone": {
                "type": "string"
              },
              "ship_to_mobile": {
                "type": "string"
              },
              "ship_to_fax": {
                "type": "string"
              },
              "ship_to_email": {
                "type": "string"
              },
              "our_customer_number": {
                "type": "string"
              },
              "term_of_payment": {
                "type": "string"
              },
              "supplier_reference": {
                "type": "string"
              },
              "our_reference": {
                "type": "string"
              },
              "receiving_state": {
                "type": "integer"
              },
              "entered_by": {
                "type": "string"
              },
              "special_instructions": {
                "type": "string"
              },
              "internal_notes": {
                "type": "string"
              },
              "purchase_order_line": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PurchaseOrderLine"
                }
              }
            }
          }
        ]
      },
      "PurchaseOrderLine": {
        "type": "object",
        "properties": {
          "purchase_order_line_id": {
            "type": "integer"
          },
          "sequence": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "cost": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "quantity_received": {
            "type": "number"
          },
          "quantity_to_receive": {
            "type": "number"
          },
          "part_id": {
            "type": "integer",
            "nullable": true
          },
          "part_description": {
            "type": "string"
          },
          "number_of_receiving": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrderGetRequest": {
        "type": "object",
        "required": [
          "purchase_order_id"
        ],
        "description": "`<purchase_order_get>` — Get a purchase order including all lines.",
        "properties": {
          "purchase_order_id": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrderAddRequest": {
        "type": "object",
        "required": [
          "supplier_id",
          "name",
          "date",
          "warehouse_id"
        ],
        "description": "`<purchase_order_add>` — Add a new purchase order.",
        "properties": {
          "supplier_id": {
            "type": "integer",
            "description": "Required."
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "description": "Required. Supplier name."
          },
          "contact": {
            "type": "string",
            "maxLength": 50
          },
          "address": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "mobile": {
            "type": "string",
            "maxLength": 25
          },
          "fax": {
            "type": "string",
            "maxLength": 25
          },
          "email": {
            "type": "string",
            "maxLength": 60
          },
          "ship_to_name": {
            "type": "string",
            "maxLength": 50
          },
          "ship_to_contact": {
            "type": "string",
            "maxLength": 50
          },
          "ship_to_address": {
            "type": "string"
          },
          "ship_to_phone": {
            "type": "string",
            "maxLength": 25
          },
          "ship_to_mobile": {
            "type": "string",
            "maxLength": 25
          },
          "ship_to_fax": {
            "type": "string",
            "maxLength": 25
          },
          "ship_to_email": {
            "type": "string",
            "maxLength": 60
          },
          "customer_id": {
            "type": "integer",
            "nullable": true
          },
          "warehouse_id": {
            "type": "integer",
            "description": "Required."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "Required."
          },
          "term_of_payment": {
            "type": "string",
            "maxLength": 30
          },
          "our_customer_number": {
            "type": "string",
            "maxLength": 30
          },
          "supplier_reference": {
            "type": "string"
          },
          "our_reference": {
            "type": "string"
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          }
        }
      },
      "PurchaseOrderEditRequest": {
        "type": "object",
        "required": [
          "purchase_order_id"
        ],
        "description": "`<purchase_order_edit>` — Edit an existing purchase order.",
        "properties": {
          "purchase_order_id": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrderDeleteRequest": {
        "type": "object",
        "required": [
          "purchase_order_id"
        ],
        "description": "`<purchase_order_delete>` — Delete a purchase order.",
        "properties": {
          "purchase_order_id": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrderLineAddRequest": {
        "type": "object",
        "required": [
          "purchase_order_id",
          "description",
          "quantity",
          "cost"
        ],
        "description": "`<purchase_order_line_add>` — Add a line to a purchase order.",
        "properties": {
          "purchase_order_id": {
            "type": "integer",
            "description": "Required."
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "description": "Required."
          },
          "quantity": {
            "type": "number",
            "description": "Required."
          },
          "cost": {
            "type": "number",
            "description": "Required."
          },
          "part_id": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "PurchaseOrderLineEditRequest": {
        "type": "object",
        "required": [
          "purchase_order_line_id"
        ],
        "description": "`<purchase_order_line_edit>` — Edit a purchase order line. To clear part_id, pass -1.\n",
        "properties": {
          "purchase_order_line_id": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrderLineDeleteRequest": {
        "type": "object",
        "required": [
          "purchase_order_line_id"
        ],
        "description": "`<purchase_order_line_delete>` — Delete a purchase order line.",
        "properties": {
          "purchase_order_line_id": {
            "type": "integer"
          }
        }
      },
      "PurchaseOrderLineReceivingRequest": {
        "type": "object",
        "required": [
          "purchase_order_line_id",
          "quantity"
        ],
        "description": "`<purchase_order_line_receiving>` — Receive stock for a purchase order line.",
        "properties": {
          "purchase_order_line_id": {
            "type": "integer",
            "description": "Required."
          },
          "quantity": {
            "type": "number",
            "description": "Required. Must be different from 0."
          },
          "warehouse_id": {
            "type": "integer",
            "description": "Defaults to warehouse on the purchase order if not specified."
          },
          "reference": {
            "type": "string",
            "maxLength": 50
          }
        }
      },
      "SupplierListRequest": {
        "type": "object",
        "description": "`<supplier_list>` — Get entire list of suppliers in summary format. No parameters required."
      },
      "SupplierSummary": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Supplier name"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "nbr_purchase_orders": {
            "type": "integer"
          }
        }
      },
      "Supplier": {
        "type": "object",
        "properties": {
          "supplier_id": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "name": {
            "type": "string",
            "description": "Supplier name"
          },
          "address": {
            "type": "string"
          },
          "contact": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "category_id": {
            "type": "integer"
          },
          "category_description": {
            "type": "string"
          },
          "term_of_payment": {
            "type": "string"
          },
          "our_customer_number": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "special_instructions": {
            "type": "string"
          },
          "nbr_purchase_orders": {
            "type": "integer"
          }
        }
      },
      "SupplierGetRequest": {
        "type": "object",
        "required": [
          "supplier_id"
        ],
        "description": "`<supplier_get>` — Get a supplier record.",
        "properties": {
          "supplier_id": {
            "type": "integer"
          }
        }
      },
      "SupplierAddRequest": {
        "type": "object",
        "required": [
          "name",
          "contact"
        ],
        "description": "`<supplier_add>` — Add a new supplier.",
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 30
          },
          "name": {
            "type": "string",
            "maxLength": 50,
            "description": "Required. Unique."
          },
          "contact": {
            "type": "string",
            "maxLength": 50,
            "description": "Required."
          },
          "address": {
            "type": "string"
          },
          "phone": {
            "type": "string",
            "maxLength": 25
          },
          "mobile": {
            "type": "string",
            "maxLength": 25
          },
          "fax": {
            "type": "string",
            "maxLength": 25
          },
          "email": {
            "type": "string",
            "maxLength": 60
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ],
            "default": "active"
          },
          "category_id": {
            "type": "integer"
          },
          "category_description": {
            "type": "string",
            "maxLength": 35
          },
          "term_of_payment": {
            "type": "string",
            "maxLength": 30
          },
          "our_customer_number": {
            "type": "string",
            "maxLength": 30
          }
        }
      },
      "SupplierEditRequest": {
        "type": "object",
        "required": [
          "supplier_id"
        ],
        "description": "`<supplier_edit>` — Edit an existing supplier.",
        "properties": {
          "supplier_id": {
            "type": "integer"
          }
        }
      },
      "SupplierDeleteRequest": {
        "type": "object",
        "required": [
          "supplier_id"
        ],
        "description": "`<supplier_delete>` — Delete a supplier.",
        "properties": {
          "supplier_id": {
            "type": "integer"
          }
        }
      },
      "TaxRateListRequest": {
        "type": "object",
        "description": "`<tax_rate_list>` — Get entire list of tax rates. No parameters required."
      },
      "TaxRate": {
        "type": "object",
        "properties": {
          "tax_rate_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "tax1_percent": {
            "type": "number"
          },
          "tax2_percent": {
            "type": "number"
          }
        }
      },
      "TechnicianListRequest": {
        "type": "object",
        "description": "`<technician_list>` — List all technicians in summary format. No parameters required."
      },
      "TechnicianSummary": {
        "type": "object",
        "properties": {
          "technician_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Technician name"
          },
          "email": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "is_dispatcher": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "is_administrative_staff": {
            "type": "string",
            "enum": ["yes", "no"]            
          },
          "is_technician": {
            "type": "string",
            "enum": ["yes", "no"]            
          }
        }
      },
      "Technician": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TechnicianSummary"
          },
          {
            "type": "object",
            "properties": {
              "email_sms": {
                "type": "string"
              },
              "address": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "mobile": {
                "type": "string"
              },
              "fax": {
                "type": "string"
              },
              "seniority": {
                "type": "integer"
              },
              "internal_notes": {
                "type": "string"
              },
              "category_id": {
                "type": "integer"
              },
              "category_description": {
                "type": "string"
              },
              "warehouse_id": {
                "type": "integer"
              },
              "warehouse_description": {
                "type": "string"
              },
              "zone": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ZoneSummary"
                }
              },
              "document": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DocumentSummary"
                }
              }
            }
          }
        ]
      },
      "TechnicianGetRequest": {
        "type": "object",
        "required": [
          "technician_id"
        ],
        "description": "`<technician_get>` — Get a technician record.",
        "properties": {
          "technician_id": {
            "type": "integer"
          }
        }
      },
      "WarehouseListRequest": {
        "type": "object",
        "description": "`<warehouse_list>` — List all warehouses. No parameters required."
      },
      "Warehouse": {
        "type": "object",
        "properties": {
          "warehouse_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "WorkorderLabelListRequest": {
        "type": "object",
        "description": "`<workorder_label_list>` — List all work order labels. No parameters required."
      },
      "WorkorderLabel": {
        "type": "object",
        "properties": {
          "workorder_label_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "WorkorderListRequest": {
        "type": "object",
        "description": "`<workorder_list>` — List all work orders in summary format. All filters optional.",
        "properties": {
          "date_from": {
            "type": "string",
            "format": "date"
          },
          "date_to": {
            "type": "string",
            "format": "date"
          },
          "customer_id": {
            "type": "integer"
          },
          "status": {
            "type": "integer",
            "description": "1 to 20"
          },
          "last_updated_on_from": {
            "type": "string",
            "format": "date",
            "description": "Must be used with last_updated_on_to."
          },
          "last_updated_on_to": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "WorkorderSummary": {
        "type": "object",
        "properties": {
          "workorder_id": {
            "type": "integer"
          },
          "number": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "integer"
          },
          "priority": {
            "type": "integer"
          },
          "customer_name": {
            "type": "string"
          },
          "customer_bill": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkorderGetRequest": {
        "type": "object",
        "required": [
          "workorder_id"
        ],
        "description": "`<workorder_get>` — Get an existing work order.",
        "properties": {
          "workorder_id": {
            "type": "integer"
          }
        }
      },
      "WorkorderAddRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "customer_name",
          "technician_id"
        ],
        "description": "`<workorder_add>` — Add a new work order.",
        "properties": {
          "customer_id": {
            "type": "integer",
            "description": "Required."
          },
          "customer_name": {
            "type": "string",
            "maxLength": 50,
            "description": "Required."
          },
          "contact_name": {
            "type": "string",
            "maxLength": 50
          },
          "customer_address": {
            "type": "string"
          },
          "customer_phone": {
            "type": "string",
            "maxLength": 25
          },
          "customer_mobile": {
            "type": "string",
            "maxLength": 25
          },
          "customer_fax": {
            "type": "string",
            "maxLength": 25
          },
          "customer_email": {
            "type": "string",
            "maxLength": 60
          },
          "customer_id_bill": {
            "type": "integer",
            "nullable": true
          },
          "customer_name_bill": {
            "type": "string",
            "maxLength": 50,
            "description": "Required if customer_id_bill is specified."
          },
          "contact_name_bill": {
            "type": "string",
            "maxLength": 50
          },
          "customer_address_bill": {
            "type": "string"
          },
          "customer_phone_bill": {
            "type": "string",
            "maxLength": 25
          },
          "customer_mobile_bill": {
            "type": "string",
            "maxLength": 25
          },
          "customer_fax_bill": {
            "type": "string",
            "maxLength": 25
          },
          "customer_email_bill": {
            "type": "string",
            "maxLength": 60
          },
          "bill_to_different_customer": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "technician_id": {
            "type": "integer",
            "description": "Required. Must be valid technician."
          },
          "technician_id_firstapp": {
            "type": "integer",
            "description": "Optional. Must be used with date_firstapp."
          },
          "date_firstapp": {
            "type": "string",
            "format": "date-time",
            "description": "Optional. Must be used with technician_id_firstapp."
          },
          "expected_duration_firstapp": {
            "type": "integer",
            "description": "Minutes. Default 60."
          },
          "equipment_type_id": {
            "type": "integer",
            "description": "Ignored if equipment_id is specified."
          },
          "equipment_id": {
            "type": "integer"
          },
          "status": {
            "type": "integer",
            "description": "1 to 20"
          },
          "priority": {
            "type": "integer",
            "description": "1 to 10"
          },
          "description": {
            "type": "string"
          },
          "internal_reference": {
            "type": "string",
            "maxLength": 30
          },
          "customer_reference": {
            "type": "string",
            "maxLength": 30
          },
          "entered_by": {
            "type": "string",
            "maxLength": 35
          },
          "special_instructions": {
            "type": "string"
          },
          "internal_notes": {
            "type": "string"
          },
          "tax1_percent_parts": {
            "type": "number"
          },
          "tax2_percent_parts": {
            "type": "number"
          },
          "tax2_calc_type_parts": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "tax1_percent_labor": {
            "type": "number"
          },
          "tax2_percent_labor": {
            "type": "number"
          },
          "tax2_calc_type_labor": {
            "type": "integer",
            "enum": [
              0,
              1
            ]
          },
          "fees_parts": {
            "type": "number"
          },
          "fees_labor": {
            "type": "number"
          },
          "customer_term_of_payment": {
            "type": "string",
            "maxLength": 30
          },
          "customer_term_of_payment_bill": {
            "type": "string",
            "maxLength": 30
          }
        }
      },
      "WorkorderEditRequest": {
        "type": "object",
        "required": [
          "workorder_id"
        ],
        "description": "`<workorder_edit>` — Edit an existing work order.",
        "properties": {
          "workorder_id": {
            "type": "integer"
          }
        }
      },
      "WorkorderGetNextNumberRequest": {
        "type": "object",
        "description": "`<workorder_get_next_number>` — Get the number for the next added work order."
      },
      "WorkorderSetNextNumberRequest": {
        "type": "object",
        "required": [
          "number"
        ],
        "description": "`<workorder_set_next_number>` — Set the number for the next added work order.",
        "properties": {
          "number": {
            "type": "integer",
            "description": "Required. Maximum 999999999."
          }
        }
      },
      "WorkorderEquipmentAddRequest": {
        "type": "object",
        "required": [
          "workorder_id",
          "equipment_type_id"
        ],
        "description": "`<workorder_equipment_add>` — Add an equipment on an existing work order.",
        "properties": {
          "workorder_id": {
            "type": "integer",
            "description": "Required."
          },
          "equipment_type_id": {
            "type": "integer",
            "description": "Required unless equipment_id is specified."
          },
          "equipment_id": {
            "type": "integer",
            "nullable": true
          },
          "under_warranty": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "under_service_contract": {
            "type": "string",
            "enum": ["yes", "no"],
            "default": "no"
          },
          "contract_reference": {
            "type": "string",
            "maxLength": 25
          }
        }
      },
      "WorkorderEquipmentEditRequest": {
        "type": "object",
        "required": [
          "workorder_equipment_id"
        ],
        "description": "`<workorder_equipment_edit>` — Edit an equipment on an existing work order.",
        "properties": {
          "workorder_equipment_id": {
            "type": "integer"
          }
        }
      },
      "WorkorderEquipmentDeleteRequest": {
        "type": "object",
        "required": [
          "workorder_equipment_id"
        ],
        "description": "`<workorder_equipment_delete>` — Delete an equipment on an existing work order.",
        "properties": {
          "workorder_equipment_id": {
            "type": "integer"
          }
        }
      },
      "WorkorderAppointmentAddRequest": {
        "type": "object",
        "required": [
          "workorder_id",
          "technician_id",
          "datetime"
        ],
        "description": "`<workorder_appointment_add>` — Add an appointment on an existing work order.",
        "properties": {
          "workorder_id": {
            "type": "integer",
            "description": "Required."
          },
          "technician_id": {
            "type": "integer",
            "description": "Required."
          },
          "datetime": {
            "type": "string",
            "format": "date-time",
            "description": "Required."
          },
          "expected_duration": {
            "type": "integer",
            "description": "Number of minutes. Default 60.",
            "default": 60
          }
        }
      },
      "WorkorderAppointmentEditRequest": {
        "type": "object",
        "required": [
          "workorder_appointment_id"
        ],
        "description": "`<workorder_appointment_edit>` — Edit an appointment on an existing work order.",
        "properties": {
          "workorder_appointment_id": {
            "type": "integer"
          }
        }
      },
      "WorkorderAppointmentDeleteRequest": {
        "type": "object",
        "required": [
          "workorder_appointment_id"
        ],
        "description": "`<workorder_appointment_delete>` — Delete an appointment on an existing work order.",
        "properties": {
          "workorder_appointment_id": {
            "type": "integer"
          }
        }
      },
      "WorkorderPerformedWorkAddRequest": {
        "type": "object",
        "required": [
          "workorder_equipment_id",
          "technician_id",
          "datetime"
        ],
        "description": "`<workorder_performed_work_add>` — Add work performed, including parts and labor.",
        "properties": {
          "workorder_equipment_id": {
            "type": "integer",
            "description": "Required."
          },
          "technician_id": {
            "type": "integer",
            "description": "Required."
          },
          "datetime": {
            "type": "string",
            "format": "date-time",
            "description": "Required."
          },
          "duration": {
            "type": "integer",
            "description": "Number of minutes."
          },
          "description": {
            "type": "string"
          },
          "part": {
            "type": "array",
            "description": "Optional. One or more part sections.",
            "items": {
              "$ref": "#/components/schemas/PerformedWorkPart"
            }
          },
          "labor": {
            "type": "array",
            "description": "Optional. One or more labor sections.",
            "items": {
              "$ref": "#/components/schemas/PerformedWorkLabor"
            }
          }
        }
      },
      "PerformedWorkPart": {
        "type": "object",
        "required": [
          "part_id",
          "quantity"
        ],
        "properties": {
          "part_id": {
            "type": "integer",
            "description": "Required. Valid part id."
          },
          "price": {
            "type": "number",
            "default": 0
          },
          "quantity": {
            "type": "number",
            "description": "Required. Must be different from 0."
          }
        }
      },
      "PerformedWorkLabor": {
        "type": "object",
        "required": [
          "rate_id"
        ],
        "properties": {
          "rate_id": {
            "type": "integer",
            "description": "Required. Valid rate id."
          },
          "rate": {
            "type": "number",
            "default": 0
          },
          "duration": {
            "type": "integer",
            "description": "Number of minutes. Default 0."
          },
          "bank_of_hour_id": {
            "type": "integer",
            "nullable": true,
            "description": "If specified, must be valid and belong to the work order's customer."
          }
        }
      },
      "WorkorderPerformedWorkDeleteRequest": {
        "type": "object",
        "required": [
          "workorder_performed_work_id"
        ],
        "description": "`<workorder_performed_work_delete>` — Delete a work performed.",
        "properties": {
          "workorder_performed_work_id": {
            "type": "integer"
          }
        }
      },
      "BankOfHour": {
        "type": "object",
        "properties": {
          "bank_of_hour_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "minutes": {
            "type": "integer"
          },
          "minutes_used": {
            "type": "integer"
          }
        }
      },
      "ZoneSummary": {
        "type": "object",
        "properties": {
          "zone_id": {
            "type": "integer"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiPassword": {
        "type": "apiKey",
        "in": "query",
        "name": "password",
        "description": "API password included as the `password` attribute of the XML `<request>` tag. Each NewWaySERVICE account has a unique API password found in Configuration > Application configuration > API section.\n"
      }
    }
  }
}