{
 "openapi": "3.1.0",
 "info": {
  "title": "Eway bills (India statutory)",
  "version": "20261030b",
  "description": "Read and maintain eway bills records (india.eway_bills)."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "eway-bills": {
    "type": "object",
    "required": [
     "document_no",
     "document_date"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "ewb_no": {
      "type": "string",
      "description": "Ewb no"
     },
     "einvoice_id": {
      "type": "string",
      "format": "uuid",
      "description": "Einvoice id",
      "readOnly": true
     },
     "source_record_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source record id",
      "readOnly": true
     },
     "document_no": {
      "type": "string",
      "description": "Document no"
     },
     "document_date": {
      "type": "string",
      "format": "date",
      "description": "Document date"
     },
     "supply_type": {
      "type": "string",
      "description": "Supply type"
     },
     "sub_type": {
      "type": "string",
      "description": "Sub type",
      "readOnly": true
     },
     "from_gstin": {
      "type": "string",
      "description": "From gstin",
      "readOnly": true
     },
     "from_state_code": {
      "type": "string",
      "description": "From state code"
     },
     "from_pincode": {
      "type": "string",
      "description": "From pincode"
     },
     "to_gstin": {
      "type": "string",
      "description": "To gstin",
      "readOnly": true
     },
     "to_state_code": {
      "type": "string",
      "description": "To state code"
     },
     "to_pincode": {
      "type": "string",
      "description": "To pincode"
     },
     "distance_km": {
      "type": "integer",
      "description": "Distance km"
     },
     "transport_mode": {
      "type": "string",
      "description": "Transport mode"
     },
     "vehicle_no": {
      "type": "string",
      "description": "Vehicle no"
     },
     "transporter_id": {
      "type": "string",
      "description": "Transporter id",
      "readOnly": true
     },
     "transporter_doc_no": {
      "type": "string",
      "description": "Transporter doc no",
      "readOnly": true
     },
     "invoice_value": {
      "type": "string",
      "format": "decimal",
      "description": "Invoice value"
     },
     "valid_from": {
      "type": "string",
      "format": "date-time",
      "description": "Valid from"
     },
     "valid_until": {
      "type": "string",
      "format": "date-time",
      "description": "Valid until"
     },
     "status": {
      "type": "string",
      "description": "Status"
     },
     "cancel_reason": {
      "type": "string",
      "description": "Cancel reason",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/india/eway-bills": {
   "get": {
    "summary": "list eway-bills",
    "operationId": "list_eway_bills_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create eway-bills",
    "operationId": "create_eway_bills_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/india/eway-bills/{id}": {
   "get": {
    "summary": "get eway-bills",
    "operationId": "get_eway_bills_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change eway-bills",
    "operationId": "change_eway_bills_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete eway-bills",
    "operationId": "delete_eway_bills_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/india/eway-bills/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_eway_bills_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}