{
  "info": {
    "_postman_id": "5c4079fc-513d-45ad-8dc0-8bb94527b1ea",
    "name": "GG Connect SDK APIs",
    "description": "This is a Postman Collection to develop, test and maintain APIs for GateGuard-Connect global backend.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "23848363"
  },
  "item": [
    {
      "name": "Integrations",
      "item": [
        {
          "name": "Login",
          "item": [
            {
              "name": "SDK Login",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [
                      "pm.environment.set(\"Bearer\",\"Bearer \" + pm.response.json().access_token);"
                    ],
                    "type": "text/javascript",
                    "packages": {},
                    "requests": {}
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "  {\n    \"client_id\": \"\",\n    \"client_secret\":\"\"\n  }",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/login",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "login"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Cameras/Devices",
          "item": [
            {
              "name": "List Cameras/Devices",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/devices",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "devices"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Vehicle-Owners",
          "item": [
            {
              "name": "List Vehicle-Owner-Types",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/owner-type",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "owner-type"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Create Owner",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"SDK User\",\n    \"phone_number\": \"9999999999\",\n    \"owner_type\": 4,\n    \"flat_number\": \"A-102\",\n    \"is_custom_flat_number\": false,\n    \"device\": [],\n    \"validity_start_date\": \"2024-08-06\",\n    \"validity_end_date\": \"2024-08-31\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicleowner",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicleowner"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List Owners",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/vehicleowner",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicleowner"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List Owner Details by ID",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/vehicleowner/10240",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicleowner",
                    "10240"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Update Owner Details by ID",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"SDK changes\",\n    \"phone_number\": \"8888888888\",\n    \"owner_type\": 1,\n    \"flat_number\": \"A-102\",\n    \"is_custom_flat_number\": false,\n    \"device\": [],\n    \"validity_start_date\": \"2024-08-06\",\n    \"validity_end_date\": \"2024-08-31\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicleowner/10240",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicleowner",
                    "10240"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Delete Owner by ID",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicleowner/10240",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicleowner",
                    "10240"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Vehicles",
          "item": [
            {
              "name": "List  Vehicle Types",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle-types",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle-types"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Create Vehicle",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "POST",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"number_plate\": \"MH15X3633\",\n  \"vehicle_type\": 1,\n  \"auth_type\": \"whitelist\",     // \"blacklist\" also availalbe\n  \"comment\": null,\n  \"owner\": 33380\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List Vehicles",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle"
                  ],
                  "query": [
                    {
                      "key": "number_plate",
                      "value": "MH18Z9527",
                      "description": "Filter by number plate",
                      "disabled": true
                    },
                    {
                      "key": "vehicle_type",
                      "value": "1",
                      "description": "Filter by vehicle types",
                      "disabled": true
                    },
                    {
                      "key": "owner",
                      "value": "1024",
                      "description": "Fiter by owner ids",
                      "disabled": true
                    },
                    {
                      "key": "auth_type",
                      "value": "whitelist",
                      "description": "filter by auth types",
                      "disabled": true
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Update Vehicle by ID",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "PATCH",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"owner\": 10452,\n    \"number_plate\": \"MH12TY3826\",\n    \"vehicle_type\": 1,\n    \"auth_type\": \"whitelist\", // \"blacklist\" also availalbe\n    \"comment\": \"smmsdvmmodm\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle/10517",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle",
                    "10517"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Delete Vehicle by ID",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "DELETE",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle/59964",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle",
                    "59964"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Vehicles & Vehicle-Owners Combine",
          "item": [
            {
              "name": "List Owners and their vehicles",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle-owner-vehicles",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle-owner-vehicles"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "14",
                      "disabled": true
                    },
                    {
                      "key": "search",
                      "value": "Abdul",
                      "disabled": true
                    },
                    {
                      "key": "number_plate",
                      "value": "MH16X3634",
                      "disabled": true
                    },
                    {
                      "key": "vehicle_type",
                      "value": "1",
                      "disabled": true
                    },
                    {
                      "key": "auth_type",
                      "value": "whitelist",
                      "disabled": true
                    },
                    {
                      "key": "owner",
                      "value": "35190",
                      "disabled": true
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Create Owner with their Vehicles",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "POST",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"Testing\",\n    \"owner_type\": 1,\n    \"vehicles\": [\n        {\n            \"number_plate\": \"MH12SJ8695\",\n            \"vehicle_type\": 0,\n            \"auth_type\": \"whitelist\"\n        }\n    ],\n    \"flat_number\": \"A-101\",\n    \"is_custom_flat_number\": true,\n    \"device\": []\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/vehicle-owner-vehicles",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle-owner-vehicles"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Bulk Create/Update Vehicle Owner Vehicle",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "POST",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"is_custom_flat_number\": true,\n  \"data\": [\n    {\n      \"name\": \"Testing-1\",\n      \"phone_number\": \"6000000000\",\n      \"owner_type\": 1,\n      \"vehicle\": [\n        {\n          \"number_plate\": \"MH19Z9525\",\n          \"vehicle_type\": 0,\n          \"auth_type\": \"whitelist\"\n        },\n        {\n          \"number_plate\": \"MH18Z9526\",\n          \"vehicle_type\": 0,\n          \"auth_type\": \"whitelist\"\n        }\n      ],\n      \"flat_number\": \"A-101\",\n      \"is_custom_flat_number\": true,\n      \"device\": [],\n      \"validity_start_date\": \"\",\n      \"validity_end_date\": \"\"\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "https://{{host}}/api/v1/integration/bulk/vehicle-owner-vehicle",
                  "protocol": "https",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "bulk",
                    "vehicle-owner-vehicle"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Update Owner and their Vehicle Details by ID",
              "request": {
                "auth": {
                  "type": "noauth"
                },
                "method": "PATCH",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Adesh Kothari\",\n  \"phone_number\": \"9939292929\",\n  \"owner_type\": 3,\n  \"society\": 5,\n  \"vehicles\": [\n    {\n      \"id\": 59854,\n      \"number_plate\": \"MH04LG6717\",\n      \"vehicle_type\": 0,\n      \"auth_type\": \"whitelist\"\n    },\n    {\n      \"number_plate\": \"MH21BR6640\",\n      \"vehicle_type\": 0,\n      \"auth_type\": \"whitelist\"\n    }\n  ],\n  \"flat_number\": \"B-402\",\n  \"is_custom_flat_number\": false,\n  \"device\": [\n    5,\n    11,\n    13,\n    16,\n    72\n  ],\n  \"validity_start_date\": \"2024-01-01\",\n  \"validity_end_date\": \"2025-01-01\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/vehicle-owner-vehicles/35027",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "vehicle-owner-vehicles",
                    "35027"
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Events/Data",
          "item": [
            {
              "name": "List All Events/logs/data",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/events",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "events"
                  ],
                  "query": [
                    {
                      "key": "number_plate",
                      "value": "MH12VW9414",
                      "description": "Filter by number plate",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "vehicle_type",
                      "value": "0",
                      "description": "Filter by vehicle type",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "owner",
                      "value": "8370",
                      "description": "Filter by owner id",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "camera",
                      "value": "CAM1",
                      "description": "Filter by camera name",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "is_unauthorized",
                      "value": "true",
                      "description": "Fiter by vehicle us authorized or unathorized",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "device",
                      "value": "39",
                      "description": "Filter by device/camera id",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__gt",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, gt - greater than",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__gte",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, gte - greater that or equal to ",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__lt",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, lt -  less than",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__lte",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, lte - less than or equal to",
                      "type": "text",
                      "disabled": true
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List Event/log/data by ID",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/events/12345",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "events",
                    "12345"
                  ],
                  "query": [
                    {
                      "key": "number_plate",
                      "value": "MH12SJ8695",
                      "description": "Filter by number plate",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "vehicle_type",
                      "value": "0",
                      "description": "Filter by vehicle type",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "owner",
                      "value": "8370",
                      "description": "Filter by owner id",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "camera",
                      "value": "CAM1",
                      "description": "Filter by camera name",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "is_unauthorized",
                      "value": "true",
                      "description": "Fiter by vehicle us authorized or unathorized",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "device",
                      "value": "39",
                      "description": "Filter by device/camera id",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__gt",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, gt - greater than",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__gte",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, gte - greater that or equal to ",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__lt",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, lt -  less than",
                      "type": "text",
                      "disabled": true
                    },
                    {
                      "key": "timestamp__lte",
                      "value": "2024-01-01 00:00:00",
                      "description": "Filter by time, lte - less than or equal to",
                      "type": "text",
                      "disabled": true
                    }
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List Visitor Events/logs/data",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/visitor",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "visitor"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List Visitor Event/logs/data by ID",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "{{Bearer}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "http://{{host}}/api/v1/integration/visitor/58",
                  "protocol": "http",
                  "host": [
                    "{{host}}"
                  ],
                  "path": [
                    "api",
                    "v1",
                    "integration",
                    "visitor",
                    "58"
                  ]
                }
              },
              "response": []
            }
          ]
        }
      ]
    }
  ]
}
