{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/acqua-net.online"
        }
    ],
    "info": {
        "name": "Acquanet App API",
        "_postman_id": "ea15e424-b459-40b3-9e68-63bddc159ad8",
        "description": "API for the Acquanet app, authenticated with a per-user API key.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Clients",
            "description": "",
            "item": [
                {
                    "name": "List clients",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "app_api\/clients",
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "10",
                                    "description": "Number of clients per page. Defaults to 10.",
                                    "disabled": false
                                },
                                {
                                    "key": "page",
                                    "value": "1",
                                    "description": "Page number. Defaults to 1.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/app_api\/clients?limit=10&page=1"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns the user's own client and all of its child clients that have control boxes,\neach with its control boxes (masters) and their slaves."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"page\": 1,\n  \"limit\": 10,\n  \"total\": 1,\n  \"clients\": [\n    {\n      \"id\": 2,\n      \"name\": \"Meridian Swimming Pool\",\n      \"masters\": [\n        {\n          \"id\": 1,\n          \"name\": \"Women's Locker Room\",\n          \"ip\": \"\",\n          \"firmware\": \"1.14\",\n          \"online\": true,\n          \"last_contact\": \"2026-10-03T06:38:45.000000Z\",\n          \"slave_count\": 2,\n          \"slaves\": [\n            {\"id\": 1, \"name\": \"Shower 1\", \"temperature\": 21.7, \"type\": \"shower\"},\n            {\"id\": 2, \"name\": \"Shower 2\", \"temperature\": 38.5, \"type\": \"shower\"}\n          ],\n          \"last_syncs\": {\n            \"eventlogs\": \"2026-10-01T05:30:00.000000Z\",\n            \"hot_cycle\": \"2026-10-01T05:30:00.000000Z\",\n            \"mixed_cycle\": null,\n            \"settings\": \"2026-10-03T06:42:45.000000Z\"\n          }\n        }\n      ],\n      \"online\": true\n    }\n  ]\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 401,
                            "body": "{\"message\": \"Unauthorized\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\"message\": \"The given data was invalid.\", \"errors\": {\"page\": [\"The page must be a number.\"]}}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Client details",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "app_api\/clients\/:client\/details",
                            "query": [],
                            "raw": "{{baseUrl}}\/app_api\/clients\/:client\/details",
                            "variable": [
                                {
                                    "id": "client",
                                    "key": "client",
                                    "value": "2",
                                    "description": "The ID of the client."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns a single client the user has access to, with its control boxes (masters) and their slaves."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"id\": 2,\n  \"name\": \"Meridian Swimming Pool\",\n  \"masters\": [\n    {\n      \"id\": 1,\n      \"name\": \"Women's Locker Room\",\n      \"ip\": \"\",\n      \"firmware\": \"1.14\",\n      \"online\": true,\n      \"last_contact\": \"2026-10-03T06:38:45.000000Z\",\n      \"slave_count\": 2,\n      \"slaves\": [\n        {\"id\": 1, \"name\": \"Shower 1\", \"temperature\": 21.7, \"type\": \"shower\"},\n        {\"id\": 2, \"name\": \"Shower 2\", \"temperature\": 38.5, \"type\": \"shower\"}\n      ],\n      \"last_syncs\": {\n        \"eventlogs\": \"2026-10-01T05:30:00.000000Z\",\n        \"hot_cycle\": \"2026-10-01T05:30:00.000000Z\",\n        \"mixed_cycle\": null,\n        \"settings\": \"2026-10-03T06:42:45.000000Z\"\n      }\n    }\n  ],\n  \"online\": true\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 401,
                            "body": "{\"message\": \"Unauthorized\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"message\": \"Not Found\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Control boxes",
            "description": "",
            "item": [
                {
                    "name": "Control box cycles",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "app_api\/controlboxes\/:controlbox\/cycles",
                            "query": [
                                {
                                    "key": "sincedate",
                                    "value": "2026-10-03",
                                    "description": "Only cycles logged after this date (Y-m-d) are returned. Must be a valid date in the format Y-m-d.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/app_api\/controlboxes\/:controlbox\/cycles?sincedate=2026-10-03",
                            "variable": [
                                {
                                    "id": "controlbox",
                                    "key": "controlbox",
                                    "value": "1",
                                    "description": "The ID of the control box."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns the temperature cycles a control box logged after the given date, with the result per shower."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "[\n  {\n    \"id\": 1834,\n    \"start_date\": \"2026-10-03T07:30:00.000000Z\",\n    \"end_date\": \"2026-10-03T07:30:59.000000Z\",\n    \"sync_date\": \"2026-10-03T05:30:00.000000Z\",\n    \"successful\": false,\n    \"cycle_conclusions\": [\n      {\"name\": \"Shower 1\", \"success\": true},\n      {\"name\": \"Shower 2\", \"success\": false}\n    ],\n    \"is_mix_cycle\": false,\n    \"cycle_water_usage\": {\n      \" Shower0-1\": {\"name\": \"Shower 1\", \"usage\": 8.36},\n      \" Shower1-2\": {\"name\": \"Shower 2\", \"usage\": 8.36}\n    },\n    \"shower_data\": [\n      {\n        \"name\": \"Shower0\",\n        \"start_date\": \"2026-10-03 07:30:00 UTC\",\n        \"end_date\": \"2026-10-03 07:30:59 UTC\",\n        \"seconds_over_60\": 11,\n        \"seconds_over_65\": 0,\n        \"seconds_over_70\": 0,\n        \"highest_temp\": \"63.8\"\n      },\n      {\n        \"name\": \"Shower1\",\n        \"start_date\": \"2026-10-03 07:30:00 UTC\",\n        \"end_date\": \"2026-10-03 07:30:59 UTC\",\n        \"seconds_over_60\": 0,\n        \"seconds_over_65\": 0,\n        \"seconds_over_70\": 0,\n        \"highest_temp\": \"41.2\"\n      }\n    ]\n  }\n]",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 401,
                            "body": "{\"message\": \"Unauthorized\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\"message\": \"Not Found\"}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\"message\": \"The given data was invalid.\", \"errors\": {\"sincedate\": [\"The sincedate does not match the format Y-m-d.\"]}}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Users",
            "description": "",
            "item": [
                {
                    "name": "Current user",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "app_api\/me",
                            "query": [],
                            "raw": "{{baseUrl}}\/app_api\/me"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/json"
                            }
                        ],
                        "body": null,
                        "description": "Returns the user the API key belongs to."
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"id\": 5,\n  \"name\": \"Emma Clarke\",\n  \"email\": \"pool.manager@example.com\",\n  \"role_id\": 3,\n  \"email_verified_at\": null,\n  \"created_at\": \"2026-08-05T06:42:45.000000Z\",\n  \"updated_at\": \"2026-08-05T06:42:45.000000Z\",\n  \"client_id\": 2,\n  \"must_change_password\": 0,\n  \"language\": \"en\",\n  \"receive_notifications\": false,\n  \"isDeveloper\": 0,\n  \"login_driver\": \"db\",\n  \"hasPwaInstalled\": 0,\n  \"lastTimePwaPopupShown\": null\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 401,
                            "body": "{\"message\": \"Unauthorized\"}",
                            "name": ""
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "apikey",
        "apikey": [
            {
                "key": "in",
                "value": "header",
                "type": "string"
            },
            {
                "key": "key",
                "value": "X-API-Key",
                "type": "string"
            }
        ]
    }
}