{
  "openapi": "3.0.1",
  "info": {
    "title": "PointR API",
    "version": "1.0",
    "description": "PointR API provides operations for calling PointR operations.",
    "termsOfService": "https://lvsc-developer.venetianlasvegas.com/terms/",
    "contact": {
      "email": "api-team@venetian.com"
    },
    "license": {
      "name": "VLV Developer 1.0",
      "url": "https://lvsc-developer.venetianlasvegas.com/licenses/LICENSE-1.0.html"
    }
  },
  "servers": [
    {
      "url": "https://vlv-proxy-api-dev.venetianlasvegasdev.com/api/v1",
      "description": "Dev environment v1"
    },
    {
      "url": "https://vlv-proxy-api-tst.venetianlasvegasdev.com/api/v1",
      "description": "Test environment v1"
    },
    {
      "url": "https://vlv-proxy-api-prd.venetianlasvegas.com/api/v1",
      "description": "Prod environment v1"
    }
  ],
  "tags": [
    {
      "name": "GPSGeofence",
      "description": "Operations for GPS Geofence Features"
    },
    {
      "name": "Ping",
      "description": "Ping operation to test api responsiveness."
    }
  ],
  "paths": {
    "/bigquery/ping": {
      "get": {
        "tags": [
          "Ping"
        ],
        "operationId": "ping",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/pointr/content/published/clients/{cid}/gps-geofences": {
      "get": {
        "tags": [
          "GPSGeofence"
        ],
        "operationId": "getPointrGpsGeofences",
        "summary": "Get Published Client GPS-Geofences",
        "description": "Returns published features classified as GPS-Geofence of the selected client.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "cid",
            "in": "path",
            "required": true,
            "description": "Client identifier.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "ca43ac45-fb53-447c-92b5-f820e59a23cf"
          }
        ],
        "requestBody": {
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pointrGpsGeofencesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/apiResponses" }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/401apiResponse" }
              }
            }
          },
          "403": {
            "description": "Access denied",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/403apiResponse" }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/404apiResponse" }
              }
            }
          },
          "500": {
            "description": "An unexpected error occurred",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/500apiResponse" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "pointrGpsGeofencesResponse": {
        "type": "object",
        "description": "Pointr GPS geofences response.",
        "properties": {
          "features": {
            "type": "array",
            "description": "List of geofence features.",
            "items": {
              "$ref": "#/components/schemas/pointrGpsGeofenceFeature"
            },
            "example": [
              {
                "type": "Feature",
                "properties": {
                  "typeCode": "gps-geofence",
                  "fid": "f53f34eb-1c25-472c-9823-82e3790ebe5f",
                  "sid": "d1e2b0e4-219e-4c65-8c18-8a945c4f1b9d",
                  "eid": "",
                  "cid": "ca43ac45-fb53-447c-92b5-f820e59a23cf",
                  "name": "In-App Features Geofence 3",
                  "in-app-features-geofence": "true",
                  "extra": {
                    "in-app-features-geofence": "true"
                  }
                },
                "geometry": {
                  "type": "Polygon",
                  "coordinates": [
                    [
                      [
                        -115.16625013,
                        36.12273357
                      ],
                      [
                        -115.16642029,
                        36.12271318
                      ]
                    ]
                  ]
                }
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "GeoJSON collection type.",
            "example": "FeatureCollection"
          }
        }
      },
      "pointrGpsGeofenceFeature": {
        "type": "object",
        "description": "Single GeoJSON geofence feature.",
        "properties": {
          "type": {
            "type": "string",
            "description": "GeoJSON feature type.",
            "example": "Feature"
          },
          "properties": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pointrGpsGeofenceProperties"
              }
            ],
            "description": "Feature properties.",
            "example": {
              "typeCode": "gps-geofence",
              "fid": "f53f34eb-1c25-472c-9823-82e3790ebe5f",
              "sid": "d1e2b0e4-219e-4c65-8c18-8a945c4f1b9d",
              "eid": "",
              "cid": "ca43ac45-fb53-447c-92b5-f820e59a23cf",
              "name": "In-App Features Geofence 3",
              "in-app-features-geofence": "true",
              "extra": {
                "in-app-features-geofence": "true"
              }
            }
          },
          "geometry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pointrGpsGeofenceGeometry"
              }
            ],
            "description": "Feature geometry.",
            "example": {
              "type": "Polygon",
              "coordinates": [
                [
                  [
                    -115.16625013,
                    36.12273357
                  ],
                  [
                    -115.16642029,
                    36.12271318
                  ]
                ]
              ]
            }
          }
        }
      },
      "pointrGpsGeofenceProperties": {
        "type": "object",
        "description": "Geofence metadata.",
        "properties": {
          "typeCode": {
            "type": "string",
            "description": "Feature type code.",
            "example": "gps-geofence"
          },
          "fid": {
            "type": "string",
            "description": "Feature identifier.",
            "example": "f53f34eb-1c25-472c-9823-82e3790ebe5f"
          },
          "sid": {
            "type": "string",
            "description": "Site identifier.",
            "example": "d1e2b0e4-219e-4c65-8c18-8a945c4f1b9d"
          },
          "eid": {
            "type": "string",
            "description": "Event identifier.",
            "example": ""
          },
          "cid": {
            "type": "string",
            "description": "Client identifier.",
            "example": "ca43ac45-fb53-447c-92b5-f820e59a23cf"
          },
          "name": {
            "type": "string",
            "description": "Geofence display name.",
            "example": "In-App Features Geofence 3"
          },
          "in-app-features-geofence": {
            "type": "string",
            "description": "In-app features geofence flag.",
            "example": "true"
          },
          "enterNotification": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pointrNotification"
              }
            ],
            "description": "Notification shown when entering geofence.",
            "example": {
              "message": "Welcome!",
              "once": false,
              "coolDownMinutes": 1
            }
          },
          "exitNotification": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pointrNotification"
              }
            ],
            "description": "Notification shown when exiting geofence.",
            "example": {
              "message": "Bye!",
              "once": false,
              "coolDownMinutes": 1
            }
          },
          "extra": {
            "type": "object",
            "description": "Additional properties associated with the geofence.",
            "properties": {
              "in-app-features-geofence": {
                "type": "string",
                "description": "In-app features geofence flag in extra metadata.",
                "example": "true"
              }
            },
            "example": {
              "in-app-features-geofence": "true"
            }
          }
        }
      },
      "pointrNotification": {
        "type": "object",
        "description": "Notification payload for geofence transitions.",
        "properties": {
          "message": {
            "type": "string",
            "description": "Notification message text.",
            "example": "Welcome!"
          },
          "once": {
            "type": "boolean",
            "description": "Whether notification is shown only once.",
            "example": false
          },
          "coolDownMinutes": {
            "type": "integer",
            "description": "Cooldown period in minutes.",
            "example": 1
          }
        }
      },
      "pointrGpsGeofenceGeometry": {
        "type": "object",
        "description": "Geofence geometry definition.",
        "properties": {
          "type": {
            "type": "string",
            "description": "GeoJSON geometry type.",
            "example": "Polygon"
          },
          "coordinates": {
            "type": "array",
            "description": "Polygon coordinates in longitude and latitude pairs.",
            "items": {
              "type": "array",
              "description": "Linear ring coordinates.",
              "items": {
                "type": "array",
                "description": "Coordinate pair in [longitude, latitude] format.",
                "items": {
                  "type": "number",
                  "format": "double",
                  "description": "Longitude or latitude value.",
                  "example": -115.16625013
                },
                "example": [
                  -115.16625013,
                  36.12273357
                ]
              },
              "example": [
                [
                  -115.16625013,
                  36.12273357
                ],
                [
                  -115.16642029,
                  36.12271318
                ]
              ]
            },
            "example": [
              [
                [
                  -115.16625013,
                  36.12273357
                ],
                [
                  -115.16642029,
                  36.12271318
                ]
              ]
            ]
          }
        }
      },
      "apiResponses": {
        "xml": {
          "name": "ArrayOfApiResponse",
          "wrapped": true
        },
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/apiResponse"
        }
      },
      "apiResponse": {
        "xml": {
          "name": "ApiResponse"
        },
        "type": "object",
        "properties": {
          "code": {
            "xml": {
              "name": "Code"
            },
            "type": "integer",
            "format": "int32",
            "example": 123,
            "description": "Response code."
          },
          "responseType": {
            "xml": {
              "name": "ResponseType"
            },
            "type": "string",
            "enum": [
              "Success",
              "Fail",
              "Warning"
            ],
            "example": "Success",
            "description": "Type of response."
          },
          "message": {
            "xml": {
              "name": "Message"
            },
            "type": "string",
            "example": "Operation Response Message"
          }
        }
      },
      "401apiResponse": {
        "xml": {
          "name": "ApiResponse"
        },
        "type": "object",
        "properties": {
          "message": {
            "xml": {
              "name": "Message"
            },
            "type": "string",
            "example": "Authentication required"
          }
        }
      },
      "403apiResponse": {
        "xml": {
          "name": "ApiResponse"
        },
        "type": "object",
        "properties": {
          "message": {
            "xml": {
              "name": "Message"
            },
            "type": "string",
            "example": "Access denied"
          }
        }
      },
      "404apiResponse": {
        "xml": {
          "name": "ApiResponse"
        },
        "type": "object",
        "properties": {
          "message": {
            "xml": {
              "name": "Message"
            },
            "type": "string",
            "example": "Resource not found"
          }
        }
      },
      "500apiResponse": {
        "xml": {
          "name": "ApiResponse"
        },
        "type": "object",
        "properties": {
          "message": {
            "xml": {
              "name": "Message"
            },
            "type": "string",
            "example": "An unexpected error occurred"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}