{
  "openapi": "3.1.0",
  "info": {
    "title": "Inti Vision Indonesia Location API",
    "description": "API Publik untuk katalog lokasi periklanan luar ruang (Billboard, Videotron) milik Inti Vision.",
    "version": "1.0.0",
    "contact": {
      "name": "Inti Vision",
      "url": "https://www.ivi.co.id"
    }
  },
  "servers": [
    {
      "url": "https://www.ivi.co.id",
      "description": "Inti Vision Website"
    }
  ],
  "paths": {
    "/api/provinsi.json": {
      "get": {
        "summary": "Mendapatkan Daftar Provinsi",
        "description": "Mengembalikan daftar provinsi di mana Inti Vision memiliki lokasi periklanan.",
        "responses": {
          "200": {
            "description": "Berhasil mendapatkan daftar provinsi",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nama": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "total_titik": {
                        "type": "integer"
                      },
                      "endpoint": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/kota.json": {
      "get": {
        "summary": "Mendapatkan Daftar Kota",
        "description": "Mengembalikan daftar kota/kabupaten di mana Inti Vision memiliki lokasi periklanan.",
        "responses": {
          "200": {
            "description": "Berhasil mendapatkan daftar kota",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nama": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "provinsi_id": {
                        "type": "string"
                      },
                      "provinsi_nama": {
                        "type": "string"
                      },
                      "total_titik": {
                        "type": "integer"
                      },
                      "endpoint": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/lokasi/provinsi/{provinsi}.json": {
      "get": {
        "summary": "Lokasi Berdasarkan Provinsi",
        "description": "Mendapatkan daftar lokasi periklanan spesifik di suatu provinsi.",
        "parameters": [
          {
            "name": "provinsi",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Slug nama provinsi (contoh: daerah-khusus-ibukota-jakarta)"
          }
        ],
        "responses": {
          "200": {
            "description": "Daftar lokasi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationArray"
                }
              }
            }
          }
        }
      }
    },
    "/api/lokasi/provinsi/{provinsi}/kota.json": {
      "get": {
        "summary": "Kota Berdasarkan Provinsi",
        "description": "Mendapatkan daftar kota/kabupaten spesifik yang memiliki lokasi periklanan di suatu provinsi.",
        "parameters": [
          {
            "name": "provinsi",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Slug nama provinsi (contoh: daerah-khusus-ibukota-jakarta)"
          }
        ],
        "responses": {
          "200": {
            "description": "Berhasil mendapatkan daftar kota",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "nama": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "provinsi_id": {
                        "type": "string"
                      },
                      "provinsi_nama": {
                        "type": "string"
                      },
                      "total_titik": {
                        "type": "integer"
                      },
                      "endpoint": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/lokasi/kota/{kota}.json": {
      "get": {
        "summary": "Lokasi Berdasarkan Kota",
        "description": "Mendapatkan daftar lokasi periklanan spesifik di suatu kota/kabupaten.",
        "parameters": [
          {
            "name": "kota",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Slug nama kota (contoh: kota-jakarta-utara)"
          }
        ],
        "responses": {
          "200": {
            "description": "Daftar lokasi",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationArray"
                }
              }
            }
          }
        }
      }
    },
    "/api/lokasi/detail/{slug}.json": {
      "get": {
        "summary": "Detail Lengkap Lokasi",
        "description": "Mendapatkan seluruh informasi detail mengenai satu titik lokasi spesifik (spesifikasi, analisis, traffic, dll).",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Slug lokasi (seo_identifier atau id)"
          }
        ],
        "responses": {
          "200": {
            "description": "Detail lokasi lengkap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Objek detail lokasi (skema lengkap bergantung pada tipe konten)"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "LocationArray": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "slug": {
              "type": "string"
            },
            "lat": {
              "type": "number",
              "format": "float"
            },
            "lng": {
              "type": "number",
              "format": "float"
            },
            "tipe_media": {
              "type": "string"
            },
            "provinsi_nama": {
              "type": "string"
            },
            "kabupaten_nama": {
              "type": "string"
            },
            "image": {
              "type": "string",
              "format": "uri"
            },
            "maps": {
              "type": "string",
              "format": "uri",
              "nullable": true
            },
            "endpoint": {
              "type": "string",
              "format": "uri"
            }
          }
        }
      }
    }
  }
}