{
  "openapi": "3.1.0",
  "info": {
    "title": "Torgix API",
    "version": "v1",
    "description": "Read and write your Torgix equipment data, and subscribe to webhooks. The API is a paid add-on; an admin enables it and issues keys under Settings → API & Webhooks in the app. All requests are tenant-scoped to the key’s account.",
    "contact": {
      "name": "Torgix",
      "url": "https://torgix.ai"
    }
  },
  "servers": [
    {
      "url": "https://app.torgix.ai/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "OAuth2": []
    }
  ],
  "tags": [
    {
      "name": "assets"
    },
    {
      "name": "locations"
    },
    {
      "name": "work_orders"
    },
    {
      "name": "maintenance"
    },
    {
      "name": "pm_schedules"
    },
    {
      "name": "inspections"
    },
    {
      "name": "issues"
    },
    {
      "name": "activities"
    },
    {
      "name": "projects"
    },
    {
      "name": "rentals"
    },
    {
      "name": "customers"
    },
    {
      "name": "parts"
    },
    {
      "name": "parts_orders"
    },
    {
      "name": "inventory"
    },
    {
      "name": "warranties"
    },
    {
      "name": "fuel_logs"
    },
    {
      "name": "meter_readings"
    },
    {
      "name": "users"
    },
    {
      "name": "Events"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "Service root",
        "description": "Returns the API version and the list of available resources.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Service metadata.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "Poll events",
        "tags": [
          "Events"
        ],
        "description": "Pull recent events without a webhook. Cursor forward with the `cursor` field of the last item.",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page_size"
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Return events after this cursor."
          },
          {
            "name": "event_type",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter to one event type, e.g. assets.created."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/assets": {
      "get": {
        "tags": [
          "assets"
        ],
        "summary": "List assets",
        "description": "Returns a page of assets, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of assets.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "assets"
        ],
        "summary": "Create assets",
        "description": "Creates one assets record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/assets/batch": {
      "post": {
        "tags": [
          "assets"
        ],
        "summary": "Batch assets",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/assets/export": {
      "get": {
        "tags": [
          "assets"
        ],
        "summary": "Export assets",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/assets/{id}": {
      "get": {
        "tags": [
          "assets"
        ],
        "summary": "Get assets",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One assets.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "assets"
        ],
        "summary": "Update assets",
        "description": "Patches the supplied fields on one assets. `asset_id` cannot be changed.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/locations": {
      "get": {
        "tags": [
          "locations"
        ],
        "summary": "List locations",
        "description": "Returns a page of locations, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of locations.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "locations"
        ],
        "summary": "Create locations",
        "description": "Creates one locations record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/locations/batch": {
      "post": {
        "tags": [
          "locations"
        ],
        "summary": "Batch locations",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/locations/export": {
      "get": {
        "tags": [
          "locations"
        ],
        "summary": "Export locations",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/locations/{id}": {
      "get": {
        "tags": [
          "locations"
        ],
        "summary": "Get locations",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One locations.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "locations"
        ],
        "summary": "Update locations",
        "description": "Patches the supplied fields on one locations. `asset_id` cannot be changed.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/work_orders": {
      "get": {
        "tags": [
          "work_orders"
        ],
        "summary": "List work_orders",
        "description": "Returns a page of work_orders, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of work_orders.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "work_orders"
        ],
        "summary": "Create work_orders",
        "description": "Creates one work_orders record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/work_orders/batch": {
      "post": {
        "tags": [
          "work_orders"
        ],
        "summary": "Batch work_orders",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/work_orders/export": {
      "get": {
        "tags": [
          "work_orders"
        ],
        "summary": "Export work_orders",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/work_orders/{id}": {
      "get": {
        "tags": [
          "work_orders"
        ],
        "summary": "Get work_orders",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One work_orders.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "work_orders"
        ],
        "summary": "Update work_orders",
        "description": "Patches the supplied fields on one work_orders. `asset_id` cannot be changed.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/maintenance": {
      "get": {
        "tags": [
          "maintenance"
        ],
        "summary": "List maintenance",
        "description": "Returns a page of maintenance, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of maintenance.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "maintenance"
        ],
        "summary": "Create maintenance",
        "description": "Creates one maintenance record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/maintenance/batch": {
      "post": {
        "tags": [
          "maintenance"
        ],
        "summary": "Batch maintenance",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/maintenance/export": {
      "get": {
        "tags": [
          "maintenance"
        ],
        "summary": "Export maintenance",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/maintenance/{id}": {
      "get": {
        "tags": [
          "maintenance"
        ],
        "summary": "Get maintenance",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One maintenance.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/pm_schedules": {
      "get": {
        "tags": [
          "pm_schedules"
        ],
        "summary": "List pm_schedules",
        "description": "Returns a page of pm_schedules, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of pm_schedules.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/pm_schedules/export": {
      "get": {
        "tags": [
          "pm_schedules"
        ],
        "summary": "Export pm_schedules",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/pm_schedules/{id}": {
      "get": {
        "tags": [
          "pm_schedules"
        ],
        "summary": "Get pm_schedules",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One pm_schedules.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inspections": {
      "get": {
        "tags": [
          "inspections"
        ],
        "summary": "List inspections",
        "description": "Returns a page of inspections, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of inspections.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "inspections"
        ],
        "summary": "Create inspections",
        "description": "Creates one inspections record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inspections/batch": {
      "post": {
        "tags": [
          "inspections"
        ],
        "summary": "Batch inspections",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inspections/export": {
      "get": {
        "tags": [
          "inspections"
        ],
        "summary": "Export inspections",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inspections/{id}": {
      "get": {
        "tags": [
          "inspections"
        ],
        "summary": "Get inspections",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One inspections.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/issues": {
      "get": {
        "tags": [
          "issues"
        ],
        "summary": "List issues",
        "description": "Returns a page of issues, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of issues.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "issues"
        ],
        "summary": "Create issues",
        "description": "Creates one issues record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/issues/batch": {
      "post": {
        "tags": [
          "issues"
        ],
        "summary": "Batch issues",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/issues/export": {
      "get": {
        "tags": [
          "issues"
        ],
        "summary": "Export issues",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/issues/{id}": {
      "get": {
        "tags": [
          "issues"
        ],
        "summary": "Get issues",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One issues.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "patch": {
        "tags": [
          "issues"
        ],
        "summary": "Update issues",
        "description": "Patches the supplied fields on one issues. `asset_id` cannot be changed.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/activities": {
      "get": {
        "tags": [
          "activities"
        ],
        "summary": "List activities",
        "description": "Returns a page of activities, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of activities.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/activities/export": {
      "get": {
        "tags": [
          "activities"
        ],
        "summary": "Export activities",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/activities/{id}": {
      "get": {
        "tags": [
          "activities"
        ],
        "summary": "Get activities",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One activities.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "List projects",
        "description": "Returns a page of projects, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of projects.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/projects/export": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "Export projects",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/projects/{id}": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "Get projects",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One projects.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/rentals": {
      "get": {
        "tags": [
          "rentals"
        ],
        "summary": "List rentals",
        "description": "Returns a page of rentals, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of rentals.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/rentals/export": {
      "get": {
        "tags": [
          "rentals"
        ],
        "summary": "Export rentals",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/rentals/{id}": {
      "get": {
        "tags": [
          "rentals"
        ],
        "summary": "Get rentals",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One rentals.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/customers": {
      "get": {
        "tags": [
          "customers"
        ],
        "summary": "List customers",
        "description": "Returns a page of customers, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of customers.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/customers/export": {
      "get": {
        "tags": [
          "customers"
        ],
        "summary": "Export customers",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/customers/{id}": {
      "get": {
        "tags": [
          "customers"
        ],
        "summary": "Get customers",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One customers.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/parts": {
      "get": {
        "tags": [
          "parts"
        ],
        "summary": "List parts",
        "description": "Returns a page of parts, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of parts.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/parts/export": {
      "get": {
        "tags": [
          "parts"
        ],
        "summary": "Export parts",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/parts/{id}": {
      "get": {
        "tags": [
          "parts"
        ],
        "summary": "Get parts",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One parts.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/parts_orders": {
      "get": {
        "tags": [
          "parts_orders"
        ],
        "summary": "List parts_orders",
        "description": "Returns a page of parts_orders, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of parts_orders.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/parts_orders/export": {
      "get": {
        "tags": [
          "parts_orders"
        ],
        "summary": "Export parts_orders",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/parts_orders/{id}": {
      "get": {
        "tags": [
          "parts_orders"
        ],
        "summary": "Get parts_orders",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One parts_orders.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inventory": {
      "get": {
        "tags": [
          "inventory"
        ],
        "summary": "List inventory",
        "description": "Returns a page of inventory, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of inventory.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inventory/export": {
      "get": {
        "tags": [
          "inventory"
        ],
        "summary": "Export inventory",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inventory/{id}": {
      "get": {
        "tags": [
          "inventory"
        ],
        "summary": "Get inventory",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One inventory.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/warranties": {
      "get": {
        "tags": [
          "warranties"
        ],
        "summary": "List warranties",
        "description": "Returns a page of warranties, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of warranties.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/warranties/export": {
      "get": {
        "tags": [
          "warranties"
        ],
        "summary": "Export warranties",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/warranties/{id}": {
      "get": {
        "tags": [
          "warranties"
        ],
        "summary": "Get warranties",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One warranties.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/fuel_logs": {
      "get": {
        "tags": [
          "fuel_logs"
        ],
        "summary": "List fuel_logs",
        "description": "Returns a page of fuel_logs, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of fuel_logs.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "fuel_logs"
        ],
        "summary": "Create fuel_logs",
        "description": "Creates one fuel_logs record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/fuel_logs/batch": {
      "post": {
        "tags": [
          "fuel_logs"
        ],
        "summary": "Batch fuel_logs",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/fuel_logs/export": {
      "get": {
        "tags": [
          "fuel_logs"
        ],
        "summary": "Export fuel_logs",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/fuel_logs/{id}": {
      "get": {
        "tags": [
          "fuel_logs"
        ],
        "summary": "Get fuel_logs",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One fuel_logs.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/meter_readings": {
      "get": {
        "tags": [
          "meter_readings"
        ],
        "summary": "List meter_readings",
        "description": "Returns a page of meter_readings, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of meter_readings.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "meter_readings"
        ],
        "summary": "Create meter_readings",
        "description": "Creates one meter_readings record. `company_id` and internal columns are set by Torgix and cannot be supplied. Send `Idempotency-Key` to make retries safe.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Writable fields for the record."
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/Unprocessable"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/meter_readings/batch": {
      "post": {
        "tags": [
          "meter_readings"
        ],
        "summary": "Batch meter_readings",
        "description": "Up to 200 create/update operations in one call; each item reports its own status.",
        "security": [
          {
            "ApiKeyAuth": [
              "write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/meter_readings/export": {
      "get": {
        "tags": [
          "meter_readings"
        ],
        "summary": "Export meter_readings",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/meter_readings/{id}": {
      "get": {
        "tags": [
          "meter_readings"
        ],
        "summary": "Get meter_readings",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One meter_readings.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/users": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "List users",
        "description": "Returns a page of users, newest cursor last. Add any field name as a query param for an exact-match filter (e.g. `?status=active`).",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "$ref": "#/components/parameters/page_size"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of users.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Pass back as ?cursor= for the next page; null when no more."
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/users/export": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Export users",
        "description": "Bulk pull (JSON array, or `?format=ndjson`), capped by fair use with a `truncated` flag.",
        "security": [
          {
            "ApiKeyAuth": [
              "export"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/fields"
          },
          {
            "$ref": "#/components/parameters/changed_since"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "ndjson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exported rows.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "max": {
                      "type": "integer"
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Get users",
        "security": [
          {
            "ApiKeyAuth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One users.",
            "headers": {
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed per second."
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tokens left in the current second."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Echoed on every response for support/correlation."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "request_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "webhooks": {
    "event": {
      "post": {
        "summary": "Event delivered to your endpoint",
        "description": "Torgix POSTs this body to each matching subscription. Verify `X-Torgix-Signature` (format `t=<unix>,v1=<hex>`) as HMAC-SHA256 of `\"{t}.{rawBody}\"` using the endpoint signing secret; reject timestamps older than 300s. Respond 2xx within 8s or delivery is retried (60s, 300s, 1800s, 7200s, 21600s) then dead-lettered.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Acknowledged."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Send an API key as `Authorization: Bearer tgx_live_...`. Scopes (read, write, export) are set per key."
      },
      "OAuth2": {
        "type": "oauth2",
        "description": "Authorization-code flow with PKCE (S256 required). Register a client in the app under Settings → API & Webhooks; the access token is a Bearer credential accepted on every endpoint.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.torgix.ai/oauth/authorize",
            "tokenUrl": "https://app.torgix.ai/oauth/token",
            "refreshUrl": "https://app.torgix.ai/oauth/token",
            "scopes": {
              "read": "Read your equipment data",
              "write": "Create and update records",
              "export": "Export data in bulk"
            }
          }
        }
      }
    },
    "parameters": {
      "fields": {
        "name": "fields",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Comma-separated fields to return (projection)."
      },
      "changed_since": {
        "name": "changed_since",
        "in": "query",
        "schema": {
          "type": "string",
          "format": "date-time"
        },
        "description": "Only records updated/created at or after this ISO-8601 time."
      },
      "cursor": {
        "name": "cursor",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Opaque forward cursor (use next_cursor from the previous page)."
      },
      "page_size": {
        "name": "page_size",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 50,
          "maximum": 200
        },
        "description": "Items per page (max 200)."
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "Optional. Repeat a create safely; the first result is replayed for the same key."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid credentials.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Add-on inactive, missing scope, or IP not allowlisted.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found in this account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Per-second rate limit exceeded.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait."
          },
          "X-RateLimit-Limit": {
            "schema": {
              "type": "integer"
            },
            "description": "Requests allowed per second."
          },
          "X-RateLimit-Remaining": {
            "schema": {
              "type": "integer"
            },
            "description": "Tokens left in the current second."
          },
          "X-Request-Id": {
            "schema": {
              "type": "string"
            },
            "description": "Echoed on every response for support/correlation."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unprocessable": {
        "description": "The write was rejected (e.g. a required field is missing); `field` names the column.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "request_id": {
                "type": "string"
              }
            }
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "evt_4f1c..."
          },
          "type": {
            "type": "string",
            "example": "assets.updated"
          },
          "resource": {
            "type": "string",
            "example": "assets"
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "data": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EventList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cursor": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "resource": {
                  "type": "string"
                },
                "resource_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "data": {
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "required": [
          "operations"
        ],
        "properties": {
          "operations": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string",
                  "enum": [
                    "create",
                    "update"
                  ],
                  "default": "create"
                },
                "id": {
                  "type": "integer",
                  "description": "Required for update."
                },
                "data": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "BatchResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "data": {
                  "type": "object",
                  "additionalProperties": true
                },
                "error": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "request_id": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-conventions": {
    "fairUse": {
      "reads": 100000,
      "exports": 2000,
      "processing": 5000,
      "anomalyExportPerProcess": 25
    },
    "rate": {
      "perSecond": 10
    },
    "skipHeader": "X-Torgix-Skip-Webhook",
    "resources": {
      "assets": {
        "write": "cru"
      },
      "locations": {
        "write": "cru"
      },
      "work_orders": {
        "write": "cru"
      },
      "maintenance": {
        "write": "create"
      },
      "pm_schedules": {
        "write": "read-only"
      },
      "inspections": {
        "write": "create"
      },
      "issues": {
        "write": "cru"
      },
      "activities": {
        "write": "read-only"
      },
      "projects": {
        "write": "read-only"
      },
      "rentals": {
        "write": "read-only"
      },
      "customers": {
        "write": "read-only"
      },
      "parts": {
        "write": "read-only"
      },
      "parts_orders": {
        "write": "read-only"
      },
      "inventory": {
        "write": "read-only"
      },
      "warranties": {
        "write": "read-only"
      },
      "fuel_logs": {
        "write": "create"
      },
      "meter_readings": {
        "write": "create"
      },
      "users": {
        "write": "read-only"
      }
    }
  }
}