{
  "openapi": "3.0.3",
  "info": {
    "title": "UMSB LMS Rate Management API",
    "version": "1.0.0",
    "description": "Swagger/OpenAPI documentation for Zone, Location, Rate Card, Location Rate, Container Size, Charge Type and Rate Card Charge APIs."
  },
  "servers": [
    {
      "url": "../",
      "description": "Project root when opened from /docs/rate-management-swagger.html"
    },
    {
      "url": "/",
      "description": "Domain root"
    }
  ],
  "tags": [
    {
      "name": "Zones"
    },
    {
      "name": "Locations"
    },
    {
      "name": "Container Sizes"
    },
    {
      "name": "Rate Cards"
    },
    {
      "name": "Location Rates"
    },
    {
      "name": "Charge Types"
    },
    {
      "name": "Rate Card Charges"
    },
    {
      "name": "Lookups"
    }
  ],
  "paths": {
    "/controller/rate-management/zones.php": {
      "get": {
        "tags": ["Zones"],
        "summary": "List zones or get one zone by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/IsActiveQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Zones"],
        "summary": "Create zone",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ZoneInput"
              },
              "example": {
                "zone_code": "ZONE_1",
                "zone_name": "Zone 1",
                "description": "Kota Kinabalu nearby area",
                "is_active": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Zones"],
        "summary": "Update zone",
        "requestBody": {
          "$ref": "#/components/requestBodies/ZoneUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Zones"],
        "summary": "Soft delete zone",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/locations.php": {
      "get": {
        "tags": ["Locations"],
        "summary": "List locations or get one location by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/ZoneIdQuery"
          },
          {
            "$ref": "#/components/parameters/IsActiveQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Locations"],
        "summary": "Create location",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationInput"
              },
              "example": {
                "zone_id": 1,
                "location_name": "Sepanggar KKIP",
                "location_alias": "KKIP",
                "remarks": "Main destination",
                "is_active": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Locations"],
        "summary": "Update location",
        "requestBody": {
          "$ref": "#/components/requestBodies/LocationUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Locations"],
        "summary": "Soft delete location",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/container-sizes.php": {
      "get": {
        "tags": ["Container Sizes"],
        "summary": "List container sizes or get one by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/IsActiveQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Container Sizes"],
        "summary": "Create container size",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContainerSizeInput"
              },
              "example": {
                "size_code": "20FT",
                "size_name": "20 Feet Container",
                "description": "Standard 20 feet container",
                "is_active": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Container Sizes"],
        "summary": "Update container size",
        "requestBody": {
          "$ref": "#/components/requestBodies/ContainerSizeUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Container Sizes"],
        "summary": "Soft delete container size",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/rate-cards.php": {
      "get": {
        "tags": ["Rate Cards"],
        "summary": "List rate cards or get one by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/StatusQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Rate Cards"],
        "summary": "Create rate card",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateCardInput"
              },
              "example": {
                "rate_card_name": "Container Trailer Drivers Rate - Apr 2026",
                "effective_from": "2026-04-01",
                "effective_to": null,
                "status": "active",
                "remarks": "Based on uploaded rate sheet"
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Rate Cards"],
        "summary": "Update rate card",
        "requestBody": {
          "$ref": "#/components/requestBodies/RateCardUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Rate Cards"],
        "summary": "Archive rate card",
        "description": "Rate cards do not have is_active in the recommended schema, so DELETE sets status to archived.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/location-rates.php": {
      "get": {
        "tags": ["Location Rates"],
        "summary": "List location rates or get one by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/RateCardIdQuery"
          },
          {
            "$ref": "#/components/parameters/LocationIdQuery"
          },
          {
            "$ref": "#/components/parameters/ContainerSizeIdQuery"
          },
          {
            "$ref": "#/components/parameters/IsActiveQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Location Rates"],
        "summary": "Create location rate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LocationRateInput"
              },
              "example": {
                "rate_card_id": 1,
                "location_id": 1,
                "container_size_id": 1,
                "amount": 220,
                "currency_code": "MYR",
                "remarks": "20FT Sepanggar KKIP",
                "is_active": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Location Rates"],
        "summary": "Update location rate",
        "requestBody": {
          "$ref": "#/components/requestBodies/LocationRateUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Location Rates"],
        "summary": "Soft delete location rate",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/charge-types.php": {
      "get": {
        "tags": ["Charge Types"],
        "summary": "List charge types or get one by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/CalculationTypeQuery"
          },
          {
            "$ref": "#/components/parameters/IsActiveQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Charge Types"],
        "summary": "Create charge type",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeTypeInput"
              },
              "example": {
                "charge_code": "SIDELOADER",
                "charge_name": "Sideloader",
                "charge_description": "Fixed sideloader extra charge",
                "calculation_type": "fixed",
                "is_active": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Charge Types"],
        "summary": "Update charge type",
        "requestBody": {
          "$ref": "#/components/requestBodies/ChargeTypeUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Charge Types"],
        "summary": "Soft delete charge type",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/rate-card-charges.php": {
      "get": {
        "tags": ["Rate Card Charges"],
        "summary": "List rate card charges or get one by id",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQuery"
          },
          {
            "$ref": "#/components/parameters/RateCardIdQuery"
          },
          {
            "$ref": "#/components/parameters/ChargeTypeIdQuery"
          },
          {
            "$ref": "#/components/parameters/IsActiveQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": ["Rate Card Charges"],
        "summary": "Create rate card charge",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateCardChargeInput"
              },
              "example": {
                "rate_card_id": 1,
                "charge_type_id": 1,
                "amount": 200,
                "currency_code": "MYR",
                "remarks": "Apr 2026 sideloader charge",
                "is_active": 1
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": ["Rate Card Charges"],
        "summary": "Update rate card charge",
        "requestBody": {
          "$ref": "#/components/requestBodies/RateCardChargeUpdate"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": ["Rate Card Charges"],
        "summary": "Soft delete rate card charge",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/active-rate.php": {
      "get": {
        "tags": ["Lookups"],
        "summary": "Get active rate by location and container size",
        "parameters": [
          {
            "$ref": "#/components/parameters/LocationIdQueryRequired"
          },
          {
            "$ref": "#/components/parameters/ContainerSizeCodeQueryRequired"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/controller/rate-management/zone-rates.php": {
      "get": {
        "tags": ["Lookups"],
        "summary": "Get rate table by zone",
        "parameters": [
          {
            "$ref": "#/components/parameters/ZoneIdQueryRequired"
          },
          {
            "$ref": "#/components/parameters/RateCardIdQuery"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/Success"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "IdQuery": {
        "name": "id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "IdQueryRequired": {
        "name": "id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "IsActiveQuery": {
        "name": "is_active",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "enum": [0, 1]
        }
      },
      "ZoneIdQuery": {
        "name": "zone_id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "ZoneIdQueryRequired": {
        "name": "zone_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "LocationIdQuery": {
        "name": "location_id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "LocationIdQueryRequired": {
        "name": "location_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "RateCardIdQuery": {
        "name": "rate_card_id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "ContainerSizeIdQuery": {
        "name": "container_size_id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "ContainerSizeCodeQueryRequired": {
        "name": "container_size",
        "in": "query",
        "required": true,
        "schema": {
          "type": "string",
          "example": "20FT"
        }
      },
      "ChargeTypeIdQuery": {
        "name": "charge_type_id",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "StatusQuery": {
        "name": "status",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": ["draft", "active", "inactive", "archived"]
        }
      },
      "CalculationTypeQuery": {
        "name": "calculation_type",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": ["fixed", "percentage", "manual"]
        }
      }
    },
    "requestBodies": {
      "ZoneUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/ZoneInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "zone_code": "ZONE_1",
              "zone_name": "Zone 1",
              "description": "Updated description",
              "is_active": 1
            }
          }
        }
      },
      "LocationUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/LocationInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "zone_id": 1,
              "location_name": "Sepanggar KKIP",
              "location_alias": "KKIP",
              "remarks": "Updated remarks",
              "is_active": 1
            }
          }
        }
      },
      "ContainerSizeUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/ContainerSizeInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "size_code": "20FT",
              "size_name": "20 Feet Container",
              "description": "Updated description",
              "is_active": 1
            }
          }
        }
      },
      "RateCardUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/RateCardInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "rate_card_name": "Container Trailer Drivers Rate - Apr 2026",
              "effective_from": "2026-04-01",
              "effective_to": null,
              "status": "active",
              "remarks": "Updated remarks"
            }
          }
        }
      },
      "LocationRateUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/LocationRateInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "rate_card_id": 1,
              "location_id": 1,
              "container_size_id": 1,
              "amount": 230,
              "currency_code": "MYR",
              "remarks": "Updated amount",
              "is_active": 1
            }
          }
        }
      },
      "ChargeTypeUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/ChargeTypeInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "charge_code": "SIDELOADER",
              "charge_name": "Sideloader",
              "charge_description": "Updated charge description",
              "calculation_type": "fixed",
              "is_active": 1
            }
          }
        }
      },
      "RateCardChargeUpdate": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/IdBody"
                },
                {
                  "$ref": "#/components/schemas/RateCardChargeInput"
                }
              ]
            },
            "example": {
              "id": 1,
              "rate_card_id": 1,
              "charge_type_id": 1,
              "amount": 200,
              "currency_code": "MYR",
              "remarks": "Updated remarks",
              "is_active": 1
            }
          }
        }
      }
    },
    "responses": {
      "Success": {
        "description": "Successful response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            }
          }
        }
      },
      "Error": {
        "description": "Error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "IdBody": {
        "type": "object",
        "required": ["id"],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "ZoneInput": {
        "type": "object",
        "required": ["zone_code", "zone_name"],
        "properties": {
          "zone_code": {
            "type": "string"
          },
          "zone_name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "integer",
            "enum": [0, 1],
            "default": 1
          }
        }
      },
      "LocationInput": {
        "type": "object",
        "required": ["zone_id", "location_name"],
        "properties": {
          "zone_id": {
            "type": "integer"
          },
          "location_name": {
            "type": "string"
          },
          "location_alias": {
            "type": "string",
            "nullable": true
          },
          "remarks": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "integer",
            "enum": [0, 1],
            "default": 1
          }
        }
      },
      "ContainerSizeInput": {
        "type": "object",
        "required": ["size_code", "size_name"],
        "properties": {
          "size_code": {
            "type": "string"
          },
          "size_name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "integer",
            "enum": [0, 1],
            "default": 1
          }
        }
      },
      "RateCardInput": {
        "type": "object",
        "required": ["rate_card_name", "effective_from"],
        "properties": {
          "rate_card_name": {
            "type": "string"
          },
          "effective_from": {
            "type": "string",
            "format": "date"
          },
          "effective_to": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": ["draft", "active", "inactive", "archived"],
            "default": "draft"
          },
          "remarks": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "LocationRateInput": {
        "type": "object",
        "required": ["rate_card_id", "location_id", "container_size_id", "amount"],
        "properties": {
          "rate_card_id": {
            "type": "integer"
          },
          "location_id": {
            "type": "integer"
          },
          "container_size_id": {
            "type": "integer"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency_code": {
            "type": "string",
            "default": "MYR"
          },
          "remarks": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "integer",
            "enum": [0, 1],
            "default": 1
          }
        }
      },
      "ChargeTypeInput": {
        "type": "object",
        "required": ["charge_code", "charge_name"],
        "properties": {
          "charge_code": {
            "type": "string"
          },
          "charge_name": {
            "type": "string"
          },
          "charge_description": {
            "type": "string",
            "nullable": true
          },
          "calculation_type": {
            "type": "string",
            "enum": ["fixed", "percentage", "manual"],
            "default": "fixed"
          },
          "is_active": {
            "type": "integer",
            "enum": [0, 1],
            "default": 1
          }
        }
      },
      "RateCardChargeInput": {
        "type": "object",
        "required": ["rate_card_id", "charge_type_id", "amount"],
        "properties": {
          "rate_card_id": {
            "type": "integer"
          },
          "charge_type_id": {
            "type": "integer"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "currency_code": {
            "type": "string",
            "default": "MYR"
          },
          "remarks": {
            "type": "string",
            "nullable": true
          },
          "is_active": {
            "type": "integer",
            "enum": [0, 1],
            "default": 1
          }
        }
      },
      "ApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "success"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "nullable": true
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "error"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
