{"info":{"_postman_id":"5592e7aa-86c1-4a46-a77a-30099519427b","name":"Lightfoot Driver API Documentation","description":"<html><head></head><body><p>Document Version History</p>\n<p>This table shows a record of significant changes to the document.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Revision Date</th>\n<th>New Version</th>\n<th>Details of revisions</th>\n<th>Initials</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>25/01/2019</td>\n<td>v0.1</td>\n<td>Creation</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>09/05/2019</td>\n<td>v1.0</td>\n<td>Release of API</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>07/06/2019</td>\n<td>v1.2</td>\n<td>Expanded overview</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>16/08/2019</td>\n<td>v1.3</td>\n<td>UTC explanation</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>27/09/2019</td>\n<td>v1.4</td>\n<td>Moved EP from admin to fleet</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>17/02/2020</td>\n<td>v1.5</td>\n<td>Moved Admim/Fleet EP out of driver doc</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>06/08/2021</td>\n<td>v1.6</td>\n<td>Advanced Insight fields added</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>14/09/2021</td>\n<td>v1.7</td>\n<td>Journey Privacy fields added</td>\n<td>DG</td>\n</tr>\n<tr>\n<td>19/11/2021</td>\n<td>v1.8</td>\n<td>Added postman documentation notes</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>10/01/2022</td>\n<td>v1.9</td>\n<td>Added uplift metrics to dashboard</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>13/09/2022</td>\n<td>v1.10</td>\n<td>Login updated for single fleet ICE vehicle.</td>\n<td>PB</td>\n</tr>\n<tr>\n<td>16/10/2024</td>\n<td>v1.2</td>\n<td>Added fleetName and onboarding</td>\n<td>DG</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"overview\">OVERVIEW</h1>\n<p>API Url: <a href=\"https://data.lightfoot.co.uk\">https://data.lightfoot.co.uk</a></p>\n<p>The Lightfoot Application Programming Interface (API) is a RESTful API, using the Bearer Authentication method from OAuth2. Utilising JSON as the data structure for responses.</p>\n<p>Please note data is stored and returned in the metric system, and time is stored and returned in UTC.</p>\n<p>The API is designed to provide customers with direct access to product data held by Lightfoot. This document is aimed at both business and technical users to provide an understanding the data available via the API, and how to obtain it. To cater for these different audiences, this document will provide the following:</p>\n<ul>\n<li><p>Data and functionality available through the API</p>\n</li>\n<li><p>Security and Access to the API functionality</p>\n</li>\n<li><p>How usage of the API is monitored and controlled</p>\n</li>\n</ul>\n<p><strong>Postman Note:</strong> if you are using the collection in postman application, you will need to setup the parameters in your environment (url, username, password) and 'Pre-request script'. Please see Postman's documentation: <a href=\"https://learning.postman.com/docs/getting-started/introduction/\">https://learning.postman.com/docs/getting-started/introduction/</a></p>\n<h1 id=\"authentication-and-security\">AUTHENTICATION AND SECURITY</h1>\n<p>The API uses Basic Authentication for all endpoints, and a 2-factor authentication method. All users must log in to obtain a token using their Lightfoot account credentials. Once a token has been obtained, it must then be used for further requests to obtain any data.</p>\n<p>A Lightfoot account is required to login through the API and retrieve data. Please see the /login endpoint for details on how to login, and obtain a session token. Each user can only access data and entities relating to their account privilege.</p>\n<p>All API connections are encrypted using TLS (HTTPS). User sessions timeout after a period of inactivity.</p>\n<p>All successful and unsuccessful logins and usage of the API are recorded for security. Accounts are locked if 8 failed login attempts are made in consecutively, after the account password must be reset within the web portal <a href=\"https://my.lightfoot.co.uk/\">https://my.lightfoot.co.uk/</a>.</p>\n<p>User sessions expire after 1 hour of inactivity. If a session is no longer needed before this time then a request can be sent to the logout endpoint to terminate the current session token. More information is available in the /logout endpoint information.</p>\n<h1 id=\"usage-thresholds\">USAGE THRESHOLDS</h1>\n<p>Usage limits are in place to maintain system load and ensure consistent service for all customers. The standard limit for endpoints is 1 request per second. Exceptions are stated in the individual endpoints’ documentation.</p>\n<p>Should a user reach their limit then the server will issue a 429 response with the ‘Request Limit Exceeded’ message.</p>\n<p>It is the responsibility of each API user to ensure the agreed number of requests is not exceeded. Connections may be throttled or terminated without notice if the limits are exceeded.</p>\n<h1 id=\"data-history\">DATA HISTORY</h1>\n<p>Product usage data is available for 9 weeks from the logged / creation time.</p>\n<p>Please note all date / times are stored and returned in UTC, users preferred timezones are returned at login and on userinfo.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"OVERVIEW","slug":"overview"},{"content":"AUTHENTICATION AND SECURITY","slug":"authentication-and-security"},{"content":"USAGE THRESHOLDS","slug":"usage-thresholds"},{"content":"DATA HISTORY","slug":"data-history"}],"owner":"6999201","collectionId":"5592e7aa-86c1-4a46-a77a-30099519427b","publishedId":"S17qS9T6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"378642"},"publishDate":"2019-03-20T15:57:21.000Z"},"item":[{"name":"/login","event":[{"listen":"prerequest","script":{"id":"912bb936-0a3b-4eae-a6f0-5304a794adf7","exec":["","//pm.environment.set(\"username\", \"demo.driver@lightfoot.co.uk\");","//pm.environment.set(\"password\", \"demo123\");","pm.environment.set(\"username\", \"jay.bush@lightfoot.co.uk\");","pm.environment.set(\"password\", \"Not!76likely\");","//pm.environment.set(\"username\", \"montgomery.burns@lightfoot.co.uk\");","//pm.environment.set(\"password\", \"Password1\");"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"test","script":{"id":"d76da96c-4436-4c9e-8f9a-ed492b49a10f","exec":["var jsonData = JSON.parse(responseBody);","pm.environment.set(\"username\", \"1337link\");","pm.environment.set(\"password\", jsonData.data.apiToken);"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"70e7e96b-899a-4e59-9164-d56661d236ef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/login","description":"<p>Used to authenticate the user. The endpoint will return a Session Id (token) to be used for all future calls to endpoints. The token (user session) expires after 1 (24 with the special user) hour of inactivity.</p>\n<p>A Lightfoot username and password must be used on the login API to receive a session token. For all future requests to the other endpoints, <code>bearer</code> must be used for the username and the token as the password in the basic authentication header:</p>\n<p>Please note, when the session token expires, the server will return a 403 status response with 'Incorrect user credentials' error message.</p>\n<p>Data returned in the vehicles object will list all vehicles assigned to the consumer driver account, or the fleet name and the last driven ICE fleet vehicle, and all driven fleet EV vehicles. (or both if they are a fleet driver and consumer). itemID will be vehicleID or fleetID, and itemName will be VRN or fleet name.</p>\n","urlObject":{"path":["v1","login"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"124dab98-3047-4aba-ab17-cfeea79a1d82","name":"/login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":""},"url":"https://devapi.lightfoot.co.uk/v1/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 06 Aug 2021 08:54:53 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.48 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"userID\": 4999,\n        \"username\": \"DemoDriver\",\n        \"vehicleCheckEnabled\": 1,\n        \"dashcamEnabled\": 0,\n        \"userTimezone\": \"Europe/London\",\n        \"locale\": null,\n        \"localeDisplayName\": null,\n        \"isRoot\": 0,\n        \"isDistributor\": 0,\n        \"isFleetManager\": 0,\n        \"mfaEnabled\": 0,\n        \"fleetMobileTrackingApp\": 0,\n        \"editLabels\": 1,\n        \"EnhancedInsights\": 1,\n        \"isDirectLogin\": 1,\n        \"fleetWebPortal\": 0,\n        \"currencySymbol\": \"£\",\n        \"currencyName\": \"GBP\",\n        \"unitOfMeasure\": \"Imperial\",\n        \"apiToken\": \"2cd7a05adb8c28aaf9a18279fefeef129ecc8c751521f7515b5921ae25ffe19e\",\n        \"vehicles\": [\n            {\n                \"fleetID\": 484,\n                \"fleetName\": \"Demo Fleet\",\n                \"VIN\": null,\n                \"driverID\": 39726,\n                \"yearManufactured\": 0,\n                \"MOTRenewal\": \"2025-06-26\",\n                \"taxRenewal\": \"2025-04-07\",\n                \"vehicleID\": 17585,\n                \"vehicleImage\": \"\",\n                \"vehicleMake\": \"Audi\",\n                \"vehicleModel\": \"A5 (2011)\",\n                \"vehicleType\": \"Car\",\n                \"fuel\": \"UNKNOWN\",\n                \"isBatteryHealthy\": 0,\n                \"VRM\": \"AB07ABC\",\n                \"lastDrivenDate\": \"2024-09-24 11:04:25\",\n                \"hubSerial\": 8388507,\n                \"settings.audioVolume\": null,\n                \"settings.endJourneyMessages\": 1,\n                \"settings.inCabAssistance\": 1,\n                \"settings.audioAssistance\": null,\n                \"fleetManagerEmail\": null,\n                \"SOC\": null,\n                \"distRemaining\": null,\n                \"ASevDataTimestamp\": null,\n                \"isCharging\": null,\n                \"latestChargeTime\": null\n            }\n        ],\n        \"oauthToken\": null,\n        \"apiV2Token\": {\n            \"token_type\": \"Bearer\",\n            \"expires_in\": 43200,\n            \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJmZDZjMzFkNy01ZjdlLTExZWQtYmI5Mi0wYWRlNTNiNiIsImp0aSI6IjlmNDc4ZmJlOGU4NDU2ZjVkN2E3YTdlM2RiYjU0OTZlZWE4NGFmYjI1OTQxMTFmMGI5OWE0NTFlMTEwNjVlNDRjNDEwZWVmNWMzNTlmYmNiIiwiaWF0IjoxNzI3MTgwODcyLjE2ODg1NCwibmJmIjoxNzI3MTgwODcyLjE2ODg1NiwiZXhwIjoxNzI3MjI0MDcyLjE0NTMwNCwic3ViIjoiZGVtby5kcml2ZXJAbGlnaHRmb290LmNvLnVrIiwic2NvcGVzIjpbImVtYWlsIl19.cZ4AfJFg8X_dSeZ5j71iy_wcvJ2ZE4xB3Ym1RAnxN2gwjKPpJM-cENsjKc5Fc88s6LoSJ5vEBjMRcuUMQja-Dfr4Y5onXt0R4E-1VU88_sDpA4ntlzoqXok_navHvJkmsOF_jRdGjsFAbEQXdIvx6cfgh-y4XyPBqzDr-Iu1MuFoYxlrT-L2eTg7KlZsiZhvAvBrBueAQI7vII3Btf-YBwCtKEzcnlG2Md-PnrMJbb0zNstMmYxqI_1RMlWadoCwzpe4ZrUSljLS89-dbjDxraE71QXIDM6sWJCWIcb8oGnYpgcCTVj769SzhpSIFM2f4gykZB0PSNQWJPa51S-e9w\",\n            \"refresh_token\": \"def50200ce61dbbe5ec573f4d1ed9e6258cb530e349ad75c3ad6a2570229ffd1712f995a9e8a555f8017de2f4242e9989d7148bdcbc95d0b71725903ab524334b0de1e9e448e4c6c67e8161a816c1abee2edcfecb9762b76d8c8e873a64a0a835c53f77dd76214d97e2831efb6429c344302b6fabe8e2d2a2bdfdd8fd11ba7793023142e105125c35d94891a6c5f9a10aca69577fbd236871539788ac5cc93e1fff4f32665a08ba2dc2157fe74291fbcb9bbf8dd8cd267200781e3a22ca7cdab921668dce8585890a8c9e443f971a7095d71d3bf3a90cc549515c35a2a06fd3aa9e1c63286bcdeba7fe6bd9d39d0839e5c26515f7f6d073c6b1e6db6f0ccdd8be82f3faf642a44445c5b61b081a3ec593cdf093c8bfdff13749b11be16499906197af7ab8eb108713ba282484e06d725261f93455f2edf6dc5f2876e957675cc2ff1831674f76811af2c9de6c82d3b9c795f77944a02e1ef96ce9173cda6b7f833ff50fe9741124babf09ff570b3651b5f33bd1e0b5903354e9f978f6bba96c8dd2c6752acdffb646fca2174c9710111e230a419e19ccfe6b7fff2871c8f6bbad3a382\",\n            \"data\": [],\n            \"meta\": {\n                \"requestId\": \"dcc68f93\",\n                \"datetime\": \"2024-09-24T12:27:52+00:00\"\n            }\n        }\n    }\n}"}],"_postman_id":"70e7e96b-899a-4e59-9164-d56661d236ef"},{"name":"/driver/register","id":"8f44153b-ece1-4e9c-8bbd-5c2221f046cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"firstName\" : \"Phil\",\r\n  \"lastName\" : \"Test\",\r\n  \"email\" : \"biglemail@mail.com\",\r\n  \"password\": \"rawpassword\",\r\n  \"fleet\": {\r\n  \t\"fleetCompanyName\": \"Lightfoot\",\r\n  \t\"driverCode\":\"1234567\"\r\n  }\r\n}"},"url":"{{url}}/v1/driver/register","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Register a new driver-level account and return login details for immediate use.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li><p>Accepts JSON or application/x-www-form-urlencoded bodies (Slim's <code>$request-&gt;getParams()</code> supports both).</p>\n</li>\n<li><p>Validates basic user information and an optional fleet object.</p>\n</li>\n<li><p>If provided, <code>fleet.driverCode</code> must contain only hexadecimal characters (letters A–F/a–f and digits 0–9). The code is normalised to lowercase before processing.</p>\n</li>\n<li><p>A custom validation message is returned for <code>driverCode</code> when invalid: \"Activation code should only contain letters and numbers\".</p>\n</li>\n<li><p>Middleware: TranslationMiddleware and LoggerMiddleware (no authentication required on this route; no explicit rate limiting here).</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/register</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>firstName</code></td>\n<td>string</td>\n<td>Driver's first name. Must be non-empty.</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>string</td>\n<td>Driver's last name. Must be non-empty.</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Driver's email address. Must be a valid email format.</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>string</td>\n<td>Account password. Minimum length 8 characters.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fleet</code></td>\n<td>object</td>\n<td>Optional object containing fleet-related fields. If present, its fields must satisfy their own validation rules.</td>\n</tr>\n<tr>\n<td><code>fleet.fleetCompanyName</code></td>\n<td>string</td>\n<td>Optional fleet company name. Must contain ASCII characters only if provided.</td>\n</tr>\n<tr>\n<td><code>fleet.driverCode</code></td>\n<td>string</td>\n<td>Optional activation/driver code. Must be hexadecimal characters only (0-9, A-F). Case-insensitive; converted to lowercase internally.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable for this endpoint.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable for this endpoint.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable for this endpoint.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li><p>Success: Returns 200 OK with a JSON object of the user's login details as produced by <code>AccountHelper-&gt;registerGetLoginDetails(...)</code>. Exact field names may vary by implementation.</p>\n</li>\n<li><p>Validation failure: Returns 400 with a JSON object mapping invalid fields to human-readable messages. The <code>driverCode</code> validation uses a custom message.</p>\n</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<ul>\n<li>Success fields are determined by backend helper. Typical fields may include identifiers and tokens needed to initialise a session in the client application.</li>\n</ul>\n<h3 id=\"example-responses\">Example Responses</h3>\n<p>Successful registration (example fields may vary):</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"userID\": 123456,\n  \"email\": \"driver@example.com\",\n  \"firstName\": \"Alex\",\n  \"lastName\": \"Driver\",\n  \"token\": \"eyJhbGciOi...\",\n  \"expiresIn\": 3600\n}\n\n</code></pre>\n<p>Validation error (examples):</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"error\": {\n        \"status\": 400,\n        \"message\": \"firstName Required, lastName Required, email Required, password Required\"\n    }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Registration succeeded</td>\n<td>All required fields valid; user created</td>\n<td>Use returned login details to establish session</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation error</td>\n<td>Missing/invalid required fields; invalid fleet data/driverCode</td>\n<td>Correct inputs per error messages and retry</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","register"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"66f4dcf3-df15-4844-9f06-ab1c94668618","name":"/driver/register","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n  \"firstName\" : \"Mike\",\r\n  \"lastName\" : \"Dan\",\r\n  \"email\" : \"abab.lclom\",\r\n  \"password\": \"bbbb\"\r\n}"},"url":"{{url}}/v1/driver/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 11 Apr 2019 14:36:45 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.14"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"userID\": 10974,\n        \"username\": null,\n        \"vehicleCheckEnabled\": 0,\n        \"apiToken\": \"0c253b7b30ccc15114fc71fbeb253d84a95d68560b361a2f311dc596ce64707d\"\n    }\n}"}],"_postman_id":"8f44153b-ece1-4e9c-8bbd-5c2221f046cf"},{"name":"/driver/competition","id":"dd109015-dbd8-46bc-ad7e-4fd7c4b73343","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/v1/driver/competition?competitionID=3840","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Retrieve competition details and computed state for a specific competition.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>competitionID</code> (int).</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/competition</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-query\">Required (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>competitionID</code></td>\n<td>integer</td>\n<td>Competition identifier.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns an object similar to items from <code>/competitions</code>, wrapped in the state-grouping transformer but for a single item.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.open[]</code></td>\n<td>array</td>\n<td>Present when the competition is currently open</td>\n</tr>\n<tr>\n<td><code>data.closed[]</code></td>\n<td>array</td>\n<td>Present when the competition is closed</td>\n</tr>\n<tr>\n<td><code>data.upcoming[]</code></td>\n<td>array</td>\n<td>Present when the competition is upcoming</td>\n</tr>\n<tr>\n<td><code>data.*[].competitionID</code></td>\n<td>integer</td>\n<td>Competition identifier</td>\n</tr>\n<tr>\n<td><code>data.*[].title</code></td>\n<td>string</td>\n<td>Competition title</td>\n</tr>\n<tr>\n<td><code>data.*[].startDate</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>Start date</td>\n</tr>\n<tr>\n<td><code>data.*[].endDate</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>End date</td>\n</tr>\n<tr>\n<td><code>data.*[].competitionState</code></td>\n<td>string</td>\n<td>One of: open, closed, closed_won, pending_winner, upcoming</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"open\": [\n      {\n        \"competitionID\": 501,\n        \"title\": \"September Prize Draw\",\n        \"startDate\": \"2025-09-01\",\n        \"endDate\": \"2025-09-30\",\n        \"competitionState\": \"open\"\n      }\n    ]\n  }\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"All of the required rules must pass for { competitionID: demoString }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Competition returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","competition"],"host":["{{url}}"],"query":[{"key":"competitionID","value":"3840"}],"variable":[]}},"response":[{"id":"e9082d1b-950b-4a49-a25f-ef5f017c211a","name":"/driver/competitions","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{url}}/v1/driver/competitions","host":["{{url}}"],"path":["v1","driver","competitions"],"query":[{"key":"startDate","value":"2019-04-15","disabled":true},{"key":"endDate","value":"2019-05-26","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 03 May 2019 12:40:29 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"termsAndConditionsLink\": \"https://www.lightfoot.co.uk/docs/F40-competition-terms-conditions.pdf\",\n        \"open\": [\n            {\n                \"competitionID\": 3733,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Marriott Leisure Pass ( 1 Lightfoot point to enter)\",\n                \"description\": \"You and a friend can spend the day at one of Marriott's Leisure clubs located across the UK. \\n\\nThe day pass entitles both of you to unlimited use of your chosen club’s facilities for one full day. Feel the burn in a heart-pumping gym session or do some laps of the pool before slowing down the pace in the jacuzzi or the steam room. \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/marriot-spa-mc-1555583454.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": 5,\n                \"premiumEntrancePoints\": 1,\n                \"competitionType\": \"points\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3732,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Demon Valet Pack\",\n                \"description\": \"Opt-in to be in with a chance of winning a Demon car cleaning kit which is famous for its fantastic scent and showroom finish. Your car will shine from top to bottom and make your car truly stand out! \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/demon-valeting-pack-mc-1555582992.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": 14,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3730,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Win one Lightfoot Point!\",\n                \"description\": \"We're giving each Elite driver one Lightfoot point!\\n\\nEnter now to claim yours!\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/lightfoot-points-1-mc-1555582762.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3729,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£50 Tesco Voucher\",\n                \"description\": \"Whether it’s for clothing, treats for the kids, Friday night goodies or just to ease the weekly shopping bill, opt-in to win a £50 Tesco Voucher that will help towards it all. \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/tesco-voucher-mc-1555582473.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3728,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£10 Costa Voucher\",\n                \"description\": \"Are you a velvety flat white, creamy latte or a classic cup of tea kind of person? Whatever your choice of coffee or tea, opt-in to win a £10 Costa voucher to help towards a large cup of your favourite. \\n\\nYou could even grab a panini too!\\n\\nEnsure you’re an Elite Driver during the week of the competition to win. \\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/costa-voucher-mc-1555581657.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3727,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£10 National Trust Voucher\",\n                \"description\": \"With the warmer weather nearly here, head out with friends and loved ones to explore over 500 places and enjoy a spot of lunch while you take in the sights around some of the most glorious country houses in the country.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/national-trust-voucher-mc-1555579532.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": 0,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3726,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£5 Argos Voucher - 4 Lucky Winners\",\n                \"description\": \"With Bbq season nearly upon us, it’s the time to get prepared. Whether you need a new set of tongs, skewers, a paddling pool for the kids to play in while those sausages sizzle away, or something completely different, then this £10 Argos voucher is sure to help towards that cost.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/argos-voucher-mc-1555579485.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3725,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£15 Love2Shop Vouchers\",\n                \"description\": \"Whether it’s for clothing, treats for the kids, Friday night goodies or just to ease the weekly shopping bill with over 150 top brands to choose from such as Argos, Boots, Debenhams, Halfords, and Iceland - You’ll be spoilt for choice!\\n\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/love-2-shop-card-mc-1555313874.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3657,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Unleash the Demon valet pack\",\n                \"description\": \"Spruce up the car with this Demon Valeting Gift Pack. Air Freshener included! \\n\\nContains: Demon wash snow foam Shampoo 1L demon spray on shine 1L Demon clean 1L Demon Wheels 1L Demon Tyres 1L large sponge microfibre cloth.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/demon-valeting-pack-mc-1551432502.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3656,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Paintballing for Two\",\n                \"description\": \"Run, dodge and camouflage yourself amongst the scenery. It’s fun, safe and maybe a little bit scary. \\n\\nThis is the ultimate game of elimination and exhilaration and requires stealth and guts to overcome the opposition. You will be provided with the suitable protective gear, combat suit and gun, so get ready to let the battle commence. \\n\\nYou will be assigned a team and sent out into the wilderness to play an exciting game of paintball. \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/paintballing-mc-1551432427.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            }\n        ],\n        \"closed\": [\n            {\n                \"competitionID\": 3723,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Autoglym drying towel\",\n                \"description\": \"Enter the blurb for the competition\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/autoglym-hi-tech-drying-towel-mc-1555076859.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3722,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Bluetooth wireless earbuds (1 point to enter)\",\n                \"description\": \"Enjoy these wireless earbuds where ever you go.\\n\\nThey come with a mini charge case which is portable and lightweight making it convenient for you to carry everywhere and enjoy music your all day long.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/bluetooth-earbuds-mc-1555076750.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": 1,\n                \"competitionType\": \"points\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3721,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Win Two Lightfoot Points\",\n                \"description\": \"We’re giving all Elite Lightfoot drivers two points! \\n\\nEnter now to top up that points balance!\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/lightfoot-points-2-mc-1555076826.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3720,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£30 Restaurant Choice Voucher\",\n                \"description\": \"With an option for every pocket and every palate, you’ll be spoiled for choice on where to eat with this £30 Restaurant Voucher.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/restaurant-voucher-mc-1555084182.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3647,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Chocolate\",\n                \"description\": \"Chocolate, lots and lots of chocolate\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/photoshoot-mc-1550226180.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-13\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            }\n        ]\n    }\n}"}],"_postman_id":"dd109015-dbd8-46bc-ad7e-4fd7c4b73343"},{"name":"/driver/competitions","id":"e70610a6-a268-4602-b4fc-0deaafe276e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/v1/driver/competitions?startDate=2019-04-15&endDate=2019-05-26","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return competitions relevant to the authenticated user within an optional date window, grouped by state (open, closed, upcoming) and with a Terms and Conditions link.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>If <code>startDate</code>/<code>endDate</code> are not specified, defaults to last 5 weeks to +12 weeks.</li>\n<li>The response includes <code>termsAndConditionsLink</code> and groups competitions by computed <code>competitionState</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/competitions</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"optional-query\">Optional (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>startDate</code></td>\n<td>string (date <code>YYYY-MM-DD</code>)</td>\n<td>Start of range.</td>\n</tr>\n<tr>\n<td><code>endDate</code></td>\n<td>string (date <code>YYYY-MM-DD</code>)</td>\n<td>End of range.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returned by CompetitionHelper-&gt;getCompetitions(userID, startDate, endDate).</li>\n<li>Competitions are grouped into arrays keyed by <code>open</code>, <code>closed</code>, and <code>upcoming</code>. Each item is enriched with <code>competitionState</code>.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.termsAndConditionsLink</code></td>\n<td>string</td>\n<td>Terms and Conditions URL</td>\n</tr>\n<tr>\n<td><code>data.open[]</code></td>\n<td>array</td>\n<td>Open competitions</td>\n</tr>\n<tr>\n<td><code>data.closed[]</code></td>\n<td>array</td>\n<td>Closed competitions</td>\n</tr>\n<tr>\n<td><code>data.upcoming[]</code></td>\n<td>array</td>\n<td>Upcoming competitions</td>\n</tr>\n<tr>\n<td><code>data.*[].competitionID</code></td>\n<td>integer</td>\n<td>Competition identifier</td>\n</tr>\n<tr>\n<td><code>data.*[].title</code></td>\n<td>string</td>\n<td>Competition title</td>\n</tr>\n<tr>\n<td><code>data.*[].startDate</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>Start date</td>\n</tr>\n<tr>\n<td><code>data.*[].endDate</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>End date</td>\n</tr>\n<tr>\n<td><code>data.*[].competitionState</code></td>\n<td>string</td>\n<td>One of: open, closed, closed_won, pending_winner, upcoming</td>\n</tr>\n<tr>\n<td><code>data.*[].imageUrl</code></td>\n<td>string</td>\n<td>Optional image URL (if provided)</td>\n</tr>\n<tr>\n<td><code>data.*[].description</code></td>\n<td>string</td>\n<td>Optional description (if provided)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"termsAndConditionsLink\": \"https://example.com/terms/competition\",\n    \"open\": [\n      {\n        \"competitionID\": 501,\n        \"title\": \"September Prize Draw\",\n        \"startDate\": \"2025-09-01\",\n        \"endDate\": \"2025-09-30\",\n        \"competitionState\": \"open\"\n      }\n    ],\n    \"closed\": [\n      {\n        \"competitionID\": 490,\n        \"title\": \"August Lottery\",\n        \"startDate\": \"2025-08-01\",\n        \"endDate\": \"2025-08-31\",\n        \"competitionState\": \"closed\"\n      }\n    ],\n    \"upcoming\": [\n      {\n        \"competitionID\": 510,\n        \"title\": \"October Prize\",\n        \"startDate\": \"2025-10-01\",\n        \"endDate\": \"2025-10-31\",\n        \"competitionState\": \"upcoming\"\n      }\n    ]\n  }\n}\n</code></pre>\n<h3 id=\"example-error-validation\">Example Error (validation)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"All of the required rules must pass for { startDate: demoString }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Competitions returned</td>\n<td>Valid request</td>\n<td>Render list</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Invalid date format</td>\n<td>Correct parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","competitions"],"host":["{{url}}"],"query":[{"key":"startDate","value":"2019-04-15"},{"key":"endDate","value":"2019-05-26"}],"variable":[]}},"response":[{"id":"aeb2b249-eb9f-46a6-b355-e014cae47e51","name":"/driver/competitions","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{url}}/v1/driver/competitions","host":["{{url}}"],"path":["v1","driver","competitions"],"query":[{"key":"startDate","value":"2019-04-15","disabled":true},{"key":"endDate","value":"2019-05-26","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 03 May 2019 12:40:29 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"termsAndConditionsLink\": \"https://www.lightfoot.co.uk/docs/F40-competition-terms-conditions.pdf\",\n        \"open\": [\n            {\n                \"competitionID\": 3733,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Marriott Leisure Pass ( 1 Lightfoot point to enter)\",\n                \"description\": \"You and a friend can spend the day at one of Marriott's Leisure clubs located across the UK. \\n\\nThe day pass entitles both of you to unlimited use of your chosen club’s facilities for one full day. Feel the burn in a heart-pumping gym session or do some laps of the pool before slowing down the pace in the jacuzzi or the steam room. \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/marriot-spa-mc-1555583454.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": 5,\n                \"premiumEntrancePoints\": 1,\n                \"competitionType\": \"points\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3732,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Demon Valet Pack\",\n                \"description\": \"Opt-in to be in with a chance of winning a Demon car cleaning kit which is famous for its fantastic scent and showroom finish. Your car will shine from top to bottom and make your car truly stand out! \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/demon-valeting-pack-mc-1555582992.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": 14,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3730,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Win one Lightfoot Point!\",\n                \"description\": \"We're giving each Elite driver one Lightfoot point!\\n\\nEnter now to claim yours!\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/lightfoot-points-1-mc-1555582762.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3729,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£50 Tesco Voucher\",\n                \"description\": \"Whether it’s for clothing, treats for the kids, Friday night goodies or just to ease the weekly shopping bill, opt-in to win a £50 Tesco Voucher that will help towards it all. \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/tesco-voucher-mc-1555582473.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3728,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£10 Costa Voucher\",\n                \"description\": \"Are you a velvety flat white, creamy latte or a classic cup of tea kind of person? Whatever your choice of coffee or tea, opt-in to win a £10 Costa voucher to help towards a large cup of your favourite. \\n\\nYou could even grab a panini too!\\n\\nEnsure you’re an Elite Driver during the week of the competition to win. \\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/costa-voucher-mc-1555581657.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3727,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£10 National Trust Voucher\",\n                \"description\": \"With the warmer weather nearly here, head out with friends and loved ones to explore over 500 places and enjoy a spot of lunch while you take in the sights around some of the most glorious country houses in the country.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/national-trust-voucher-mc-1555579532.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": 0,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3726,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£5 Argos Voucher - 4 Lucky Winners\",\n                \"description\": \"With Bbq season nearly upon us, it’s the time to get prepared. Whether you need a new set of tongs, skewers, a paddling pool for the kids to play in while those sausages sizzle away, or something completely different, then this £10 Argos voucher is sure to help towards that cost.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/argos-voucher-mc-1555579485.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-05\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3725,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£15 Love2Shop Vouchers\",\n                \"description\": \"Whether it’s for clothing, treats for the kids, Friday night goodies or just to ease the weekly shopping bill with over 150 top brands to choose from such as Argos, Boots, Debenhams, Halfords, and Iceland - You’ll be spoilt for choice!\\n\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/love-2-shop-card-mc-1555313874.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3657,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Unleash the Demon valet pack\",\n                \"description\": \"Spruce up the car with this Demon Valeting Gift Pack. Air Freshener included! \\n\\nContains: Demon wash snow foam Shampoo 1L demon spray on shine 1L Demon clean 1L Demon Wheels 1L Demon Tyres 1L large sponge microfibre cloth.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/demon-valeting-pack-mc-1551432502.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            },\n            {\n                \"competitionID\": 3656,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Paintballing for Two\",\n                \"description\": \"Run, dodge and camouflage yourself amongst the scenery. It’s fun, safe and maybe a little bit scary. \\n\\nThis is the ultimate game of elimination and exhilaration and requires stealth and guts to overcome the opposition. You will be provided with the suitable protective gear, combat suit and gun, so get ready to let the battle commence. \\n\\nYou will be assigned a team and sent out into the wilderness to play an exciting game of paintball. \\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/paintballing-mc-1551432427.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"pending_winner\"\n            }\n        ],\n        \"closed\": [\n            {\n                \"competitionID\": 3723,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Autoglym drying towel\",\n                \"description\": \"Enter the blurb for the competition\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/autoglym-hi-tech-drying-towel-mc-1555076859.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3722,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Bluetooth wireless earbuds (1 point to enter)\",\n                \"description\": \"Enjoy these wireless earbuds where ever you go.\\n\\nThey come with a mini charge case which is portable and lightweight making it convenient for you to carry everywhere and enjoy music your all day long.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/bluetooth-earbuds-mc-1555076750.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": 1,\n                \"competitionType\": \"points\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3721,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Win Two Lightfoot Points\",\n                \"description\": \"We’re giving all Elite Lightfoot drivers two points! \\n\\nEnter now to top up that points balance!\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/lightfoot-points-2-mc-1555076826.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3720,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"£30 Restaurant Choice Voucher\",\n                \"description\": \"With an option for every pocket and every palate, you’ll be spoiled for choice on where to eat with this £30 Restaurant Voucher.\\n\\nEnsure you’re an Elite Driver during the week of the competition to be in with a chance to win.\\n\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/restaurant-voucher-mc-1555084182.jpg\",\n                \"startDate\": \"2019-04-22\",\n                \"endDate\": \"2019-04-28\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            },\n            {\n                \"competitionID\": 3647,\n                \"hasEnteredCompetition\": 0,\n                \"name\": \"Chocolate\",\n                \"description\": \"Chocolate, lots and lots of chocolate\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/photoshoot-mc-1550226180.jpg\",\n                \"startDate\": \"2019-04-29\",\n                \"endDate\": \"2019-05-13\",\n                \"remainingSpaces\": null,\n                \"premiumEntrancePoints\": null,\n                \"competitionType\": \"opt-in\",\n                \"competitionState\": \"closed\"\n            }\n        ]\n    }\n}"}],"_postman_id":"e70610a6-a268-4602-b4fc-0deaafe276e6"},{"name":"/driver/myCompetitions","id":"8df94f0d-5cca-41c8-961b-bdfcbaff926f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/v1/driver/myCompetitions","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return past (closed) competitions associated with the user (e.g., recently closed or won).</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>No parameters. Uses CompetitionHelper-&gt;getPastCompetitions(userID).</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/myCompetitions</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<p>None.</p>\n<h3 id=\"optional\">Optional</h3>\n<p>None.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns an array of past competition entries (shape determined by stored procedure <code>sp_api_competition_getClosedByDriver</code>).</li>\n</ul>\n<h3 id=\"fields-representative\">Fields (representative)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data[]</code></td>\n<td>array</td>\n<td>List of past competitions</td>\n</tr>\n<tr>\n<td><code>data[].competitionID</code></td>\n<td>integer</td>\n<td>Competition identifier</td>\n</tr>\n<tr>\n<td><code>data[].title</code></td>\n<td>string</td>\n<td>Competition title</td>\n</tr>\n<tr>\n<td><code>data[].startDate</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>Start date (if returned)</td>\n</tr>\n<tr>\n<td><code>data[].endDate</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>End date</td>\n</tr>\n<tr>\n<td><code>data[].competitionState</code></td>\n<td>string</td>\n<td>State label (e.g., <code>closed</code>, <code>closed_won</code>) if present</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    { \"competitionID\": 490, \"title\": \"August Lottery\", \"endDate\": \"2025-08-31\" },\n    { \"competitionID\": 475, \"title\": \"July Promo\", \"endDate\": \"2025-07-31\" }\n  ]\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Past competitions returned</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","myCompetitions"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"d759e7fb-8b1d-4339-93c7-1bc06d4344bc","name":"/driver/myCompetitions","originalRequest":{"method":"GET","header":[],"url":"https://devdata.lightfoot.co.uk/v1/driver/myCompetitions"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 22 Feb 2019 14:52:58 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.13"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"prizeCompetitionID\": 3647,\n            \"name\": \"Chocolate\",\n            \"description\": \"Chocolate, lots and lots of chocolate\",\n            \"competitionType\": \"opt-in\",\n            \"value\": null,\n            \"startDate\": \"2019-02-05\",\n            \"endDate\": \"2019-02-13\",\n            \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/photoshoot-mc-1550226180.jpg\"\n        }\n    ]\n}"}],"_postman_id":"8df94f0d-5cca-41c8-961b-bdfcbaff926f"},{"name":"/driver/dashboard","id":"8a77d810-42df-4e0d-b448-ca436c48c66d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{url}}/v1/driver/dashboard","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return a consolidated dashboard for the user including device status, journeys summaries (last week/this week/last30Days/thisYear), unrevealed lotteries, new competition wins, notifications, last journey, featured competitions, and vehicles. Provides a <code>sectionOrder</code> object to suggest UI ordering.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li><p>Requires authenticated <code>userID</code> and optionally uses <code>driverIDs</code> attribute for journey-related sections.</p>\n</li>\n<li><p>Journeys breakdown keys include: last week vs this week keyed by <code>weekStr</code>, plus <code>last30Days</code> and <code>thisYear</code> rollups (may be empty objects).</p>\n</li>\n<li><p>Adds <code>prizeDisclaimer</code> if there are unrevealed lotteries: \"Prize value is indicative only due to exchange rate fluctuations and paid out in GBP\".</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/dashboard</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Response aggregates data from AccountHelper, JourneyHelper, CompetitionHelper, NotificationHelper, and FetchVehiclesByUserId use case.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.sectionOrder</code></td>\n<td>object</td>\n<td>Map of section names to display order (e.g., <code>journeys: 0</code>, <code>vehicles: 6</code>).</td>\n</tr>\n<tr>\n<td><code>data.journeys</code></td>\n<td>object</td>\n<td>Journey summaries keyed by week (e.g., <code>2025-W36</code>) and periods: <code>last30Days</code>, <code>thisYear</code>.</td>\n</tr>\n<tr>\n<td><code>data.journeys..score</code></td>\n<td>number</td>\n<td>Score for the given week.</td>\n</tr>\n<tr>\n<td><code>data.journeys..distance</code></td>\n<td>number</td>\n<td>Distance for the given week (units per user settings).</td>\n</tr>\n<tr>\n<td><code>data.journeys.last30Days</code></td>\n<td>object</td>\n<td>Rollup for last 30 days; may be an empty object <code>{}</code>.</td>\n</tr>\n<tr>\n<td><code>data.journeys.thisYear</code></td>\n<td>object</td>\n<td>Rollup for the current year; may be an empty object <code>{}</code>.</td>\n</tr>\n<tr>\n<td><code>data.unrevealedLottery[]</code></td>\n<td>array</td>\n<td>List of unrevealed lotteries for the user (shape from DB).</td>\n</tr>\n<tr>\n<td><code>data.prizeDisclaimer</code></td>\n<td>string</td>\n<td>Present when unrevealed lotteries exist; informs about prize value currency/forex.</td>\n</tr>\n<tr>\n<td><code>data.newCompetitionWin[]</code></td>\n<td>array</td>\n<td>List of unclaimed competitions for the user.</td>\n</tr>\n<tr>\n<td><code>data.notifications</code></td>\n<td>string or object</td>\n<td>Currently an empty string by default (placeholder for notifications).</td>\n</tr>\n<tr>\n<td><code>data.lastJourney</code></td>\n<td>object</td>\n<td>Most recent journey for the user's drivers, or an empty object if none.</td>\n</tr>\n<tr>\n<td><code>data.featuredCompetitions[]</code></td>\n<td>array</td>\n<td>Featured competitions for the user.</td>\n</tr>\n<tr>\n<td><code>data.vehicles[]</code></td>\n<td>array</td>\n<td>Vehicles belonging to the user (from FetchVehiclesByUserId use case).</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"sectionOrder\": {\n      \"journeys\": 0,\n      \"unrevealedLottery\": 1,\n      \"newCompetitionWin\": 2,\n      \"notifications\": 3,\n      \"lastJourney\": 4,\n      \"featuredCompetitions\": 5,\n      \"vehicles\": 6\n    },\n    \"journeys\": {\n      \"2025-W35\": { \"score\": 95.2, \"distance\": 120.4 },\n      \"2025-W36\": { \"score\": 96.1, \"distance\": 98.7 },\n      \"last30Days\": {},\n      \"thisYear\": {}\n    },\n    \"unrevealedLottery\": [],\n    \"newCompetitionWin\": [],\n    \"notifications\": \"\",\n    \"lastJourney\": { \"journeyID\": 12345, \"date\": \"2025-09-08\" },\n    \"featuredCompetitions\": [ { \"competitionID\": 501, \"title\": \"September Prize\" } ],\n    \"vehicles\": [ { \"vehicleID\": 77, \"registration\": \"AB12CDE\" } ]\n  }\n}\n\n</code></pre>\n<h3 id=\"example-error-missing-userid\">Example Error (missing userID)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Something went wrong.\"\n  }\n}\n\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Dashboard returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Missing userID / validation failure</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","dashboard"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"17a0b48a-e0b4-46ab-ab1f-5001418494b3","name":"/driver/dashboard","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"gen2externalapi.local:81/v1/driver/dashboard","host":["gen2externalapi","local"],"port":"81","path":["v1","driver","dashboard"],"query":[{"key":"userID","value":"36601","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Jan 2022 11:26:02 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.51 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"needsInstallationOrFleet\": 0,\n        \"awaitingDeviceContact\": 0,\n        \"isCollectingData\": 0,\n        \"sectionOrder\": {\n            \"journeys\": 0,\n            \"unrevealedLottery\": 1,\n            \"newCompetitionWin\": 2,\n            \"notifications\": 3,\n            \"lastJourney\": 4,\n            \"featuredCompetitions\": 5,\n            \"vehicles\": 6\n        },\n        \"journeys\": {\n            \"thisWeek\": {\n                \"weekStart\": \"2022-01-10\",\n                \"weeklyScore\": 9632,\n                \"weeklyGreen\": \"1651\",\n                \"weeklyYellow\": \"63\",\n                \"weeklyRed\": \"0\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistance\": \"98.4\",\n                \"weeklyIdleTime\": \"320\",\n                \"weeklyTotalTime\": \"8064\",\n                \"weeklyJourneys\": 15,\n                \"fuelUsed\": \"795.31\",\n                \"fuelSaved\": \"55.67\",\n                \"fuelEconomy\": \"808.24\",\n                \"co2Produced\": \"1992.25\",\n                \"co2Saved\": \"139.46\"\n            },\n            \"lastWeek\": {\n                \"weekStart\": \"2022-01-03\",\n                \"weeklyScore\": 9598,\n                \"weeklyGreen\": \"18865\",\n                \"weeklyYellow\": \"790\",\n                \"weeklyRed\": \"0\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistance\": \"1189.5\",\n                \"weeklyIdleTime\": \"3700\",\n                \"weeklyTotalTime\": \"92765\",\n                \"weeklyJourneys\": 110,\n                \"fuelUsed\": \"9614.01\",\n                \"fuelSaved\": \"672.98\",\n                \"fuelEconomy\": \"808.24\",\n                \"co2Produced\": \"24083.11\",\n                \"co2Saved\": \"1685.82\"\n            },\n            \"last30Days\": {\n                \"score\": 9599,\n                \"greenTime\": \"77111\",\n                \"yellowTime\": \"3223\",\n                \"redTime\": \"0\",\n                \"penalties\": \"0\",\n                \"distanceKm\": \"4856.4\",\n                \"idleTime\": \"15120\",\n                \"duration\": \"379124\",\n                \"trips\": \"455\",\n                \"fuelUsed\": \"39251.37\",\n                \"fuelEconomy\": \"808.24\",\n                \"co2Produced\": \"98324.68\",\n                \"fuelSaved\": \"2747.60\",\n                \"co2Saved\": \"6882.73\"\n            },\n            \"thisYear\": {\n                \"score\": 9601,\n                \"greenTime\": \"20516\",\n                \"yellowTime\": \"853\",\n                \"redTime\": \"0\",\n                \"penalties\": \"0\",\n                \"distanceKm\": \"1287.9\",\n                \"idleTime\": \"4020\",\n                \"duration\": \"100829\",\n                \"trips\": \"125\",\n                \"fuelUsed\": \"10409.32\",\n                \"fuelEconomy\": \"808.24\",\n                \"co2Produced\": \"26075.35\",\n                \"fuelSaved\": \"728.65\",\n                \"co2Saved\": \"1825.27\"\n            }\n        },\n        \"unrevealedLottery\": [\n            {\n                \"userID\": 35746,\n                \"lotteryID\": 4995,\n                \"lotteryName\": \"Competition Test cash 2025-06-26 14:59:08\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/drivers-lottery-mc-1576153328.png\",\n                \"startDate\": \"2025-06-16\",\n                \"endDate\": \"2025-06-22\",\n                \"prizeValue\": \"12.34\",\n                \"isEntered\": 1,\n                \"currencyCode\": \"GBP\",\n                \"currencySymbol\": \"£\",\n                \"currecyPosition\": \"before\",\n                \"currencyUnicode\": \"&#163;\"\n            }\n        ],\n        \"newCompetitionWin\": [\n            {\n                \"prizeCompetitionID\": 4996,\n                \"localeID\": 1,\n                \"name\": \"Competition Test  2025-06-26 14:59:14\",\n                \"description\": \"Competition description TEST\",\n                \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/rockbox-xl-mc-1576510874.jpg\",\n                \"competitionType\": \"opt-in\",\n                \"daysLeft\": 30\n            }\n        ],\n        \"notifications\": null,\n        \"lastJourney\": [\n            {\n                \"journeyID\": 397491715,\n                \"journeyType\": \"business\",\n                \"journeyScore\": 9709,\n                \"journeyDuration\": 1377,\n                \"journeyDistanceKilometers\": \"26.0\",\n                \"startTime\": \"2022-01-10 10:22:37\",\n                \"endTime\": \"2022-01-10 10:45:35\",\n                \"startPosnLatitude\": 50.42665,\n                \"startPosnLongitude\": -3.83435,\n                \"endPosnLatitude\": 50.4151,\n                \"endPosnLongitude\": -4.08922,\n                \"startAddress\": \"Station Road, South Brent, TQ10 9, United Kingdom\",\n                \"endAddress\": \"1 Bush Park, Plymouth, PL6 7RG, United Kingdom\",\n                \"vehicleNickname\": \"\",\n                \"VRM\": \"AB02ABC\",\n                \"deviceID\": 8388502,\n                \"driverID\": 39721\n            }\n        ],\n        \"featuredCompetitions\": [\n            {\n                \"competitionID\": 4268,\n                \"competitionName\": \"Drivers’ Lottery for week ending 16/1/2022\",\n                \"competitionImage\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/drivers-lottery-mc-1576153328-1611583115.png\",\n                \"competitionStartDate\": \"2022-01-10\",\n                \"competitionEndDate\": \"2022-01-16\"\n            },\n            {\n                \"competitionID\": 4269,\n                \"competitionName\": \"Marley Positive Vibration On-Ear Headphones\",\n                \"competitionImage\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/marley-on-ear-headhones-mc-1578588244.jpg\",\n                \"competitionStartDate\": \"2022-01-10\",\n                \"competitionEndDate\": \"2022-01-16\"\n            }\n        ],\n        \"vehicles\": [\n            {\n                \"fleetID\": 484,\n                \"fleetName\": \"Demo Fleet\",\n                \"VIN\": null,\n                \"driverID\": 39721,\n                \"yearManufactured\": 0,\n                \"MOTRenewal\": \"2022-08-27\",\n                \"taxRenewal\": \"2022-03-01\",\n                \"vehicleID\": 17580,\n                \"vehicleImage\": \"\",\n                \"vehicleMake\": \"Aston Martin\",\n                \"vehicleModel\": \"DB9 (2006)\",\n                \"vehicleType\": \"Car\",\n                \"fuel\": \"UNKNOWN\",\n                \"isBatteryHealthy\": 0,\n                \"VRM\": \"AB02ABC\",\n                \"lastDrivenDate\": \"2022-01-10 11:07:15\",\n                \"hubSerial\": 8388502,\n                \"settings.audioVolume\": 80,\n                \"settings.endJourneyMessages\": 1,\n                \"settings.inCabAssistance\": 1,\n                \"settings.audioAssistance\": null,\n                \"fleetManagerEmail\": \"demo.manager@lightfoot.co.uk\",\n                \"SOC\": null,\n                \"distRemaining\": null,\n                \"ASevDataTimestamp\": null,\n                \"isCharging\": null,\n                \"latestChargeTime\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"8a77d810-42df-4e0d-b448-ca436c48c66d"},{"name":"/driver/journeys","event":[{"listen":"prerequest","script":{"id":"4c579f3c-07d8-4723-9432-26f75033a8df","exec":["// Date jazz\r","var moment = require('moment');\r","pm.environment.set(\"startDate\", moment().subtract(3,'day').format('YYYY-MM-DD'));\r","pm.environment.set(\"endDate\", moment().format('YYYY-MM-DD'));"],"type":"text/javascript"}}],"id":"99e7c056-7128-4cc0-b135-cae87deafed1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/v1/driver/journeys?startDate={{startDate}}&endDate={{endDate}}","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return journeys for the authenticated driver's driverIDs between <code>startDate</code> and <code>endDate</code>, with options to include zero-distance trips, select units, and filter by vehicle.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>startDate</code> and <code>endDate</code> in format <code>YYYY-MM-DD</code>.</li>\n<li>If <code>endDate</code> has no time component, it is adjusted to the end of the given day (23:59:59).</li>\n<li><code>zeroTrips</code> and <code>unitType</code> are provided as integers and internally treated as booleans (non-zero =&gt; true).</li>\n<li><code>vehicleID</code> filters to a single vehicle.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/journeys</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>403 Forbidden</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-query\">Required (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>startDate</code></td>\n<td>string (date <code>YYYY-MM-DD</code>)</td>\n<td>Start date (inclusive).</td>\n</tr>\n<tr>\n<td><code>endDate</code></td>\n<td>string (date <code>YYYY-MM-DD</code>)</td>\n<td>End date; if time omitted, treated as 23:59:59 of that day.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-query\">Optional (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>vehicleID</code></td>\n<td>integer</td>\n<td>Filter by a single vehicle id.</td>\n</tr>\n<tr>\n<td><code>zeroTrips</code></td>\n<td>integer</td>\n<td>When non-zero, include zero-distance journeys.</td>\n</tr>\n<tr>\n<td><code>unitType</code></td>\n<td>integer</td>\n<td>When non-zero, use imperial units (miles). Default is metric.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>The body is produced by the FetchJourneysByDriverAndTimePeriod use case presenter. Fields include journey records and metadata; exact schema depends on implementation. A representative example is provided.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.journeys[].journeyID</code></td>\n<td>integer</td>\n<td>Unique identifier of the journey</td>\n</tr>\n<tr>\n<td><code>data.journeys[].driverID</code></td>\n<td>integer</td>\n<td>Driver identifier</td>\n</tr>\n<tr>\n<td><code>data.journeys[].vehicleID</code></td>\n<td>integer</td>\n<td>Vehicle identifier</td>\n</tr>\n<tr>\n<td><code>data.journeys[].startDateTime</code></td>\n<td>string (ISO 8601)</td>\n<td>Journey start timestamp</td>\n</tr>\n<tr>\n<td><code>data.journeys[].endDateTime</code></td>\n<td>string (ISO 8601)</td>\n<td>Journey end timestamp</td>\n</tr>\n<tr>\n<td><code>data.journeys[].distance</code></td>\n<td>number</td>\n<td>Journey distance in selected units</td>\n</tr>\n<tr>\n<td><code>data.journeys[].unit</code></td>\n<td>string</td>\n<td>\"km\" or \"mi\" depending on <code>unitType</code></td>\n</tr>\n<tr>\n<td><code>data.journeys[].type</code></td>\n<td>string</td>\n<td>\"business\" or \"personal\"</td>\n</tr>\n<tr>\n<td><code>data.journeys[].score</code></td>\n<td>number</td>\n<td>Driving score (if available)</td>\n</tr>\n<tr>\n<td><code>data.journeys[].note</code></td>\n<td>string</td>\n<td>Optional note attached to the journey</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"journeys\": [\n      {\n        \"journeyID\": 12345,\n        \"driverID\": 789,\n        \"vehicleID\": 456,\n        \"startDateTime\": \"2025-09-01T08:15:00Z\",\n        \"endDateTime\": \"2025-09-01T08:45:00Z\",\n        \"distance\": 12.4,\n        \"unit\": \"mi\",\n        \"type\": \"business\",\n        \"score\": 96.3,\n        \"note\": \"Visited client\"\n      }\n    ]\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Journeys returned</td>\n<td>Valid request</td>\n<td>Render journeys</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid <code>startDate</code>/<code>endDate</code>, bad types</td>\n<td>Correct parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n<td>Access denied</td>\n<td>User not permitted for driverIDs</td>\n<td>Check permissions</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","journeys"],"host":["{{url}}"],"query":[{"key":"startDate","value":"{{startDate}}"},{"key":"endDate","value":"{{endDate}}"}],"variable":[]}},"response":[{"id":"7c0f0ec4-efd7-41ac-b48b-a19959e4fbf8","name":"/driver/journeys","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{url}}/v1/driver/journeys?startDate=2024-05-11&endDate=2024-05-16","host":["{{url}}"],"path":["v1","driver","journeys"],"query":[{"key":"startDate","value":"2024-05-11"},{"key":"endDate","value":"2024-05-16"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 14 Sep 2021 10:22:51 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.48 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"journeyID\": 321361334,\n            \"startTime\": \"2021-08-11 05:48:56\",\n            \"endTime\": \"2021-08-11 06:06:41\",\n            \"journeyDuration\": 1063,\n            \"VRM\": \"AB02ABC\",\n            \"vehicleNickname\": \"\",\n            \"journeyScore\": 9336,\n            \"journeyType\": \"business\",\n            \"journeyDistance\": \"14.9\",\n            \"startPosnLatitude\": 50.3514,\n            \"startPosnLongitude\": -4.0311,\n            \"endPosnLatitude\": 50.41527,\n            \"endPosnLongitude\": -4.08948,\n            \"startAddress\": \"Kitley View, Plymouth, PL8 2, United Kingdom\",\n            \"endAddress\": \"Plymouth, England, United Kingdom\",\n            \"endOfJourneyOdometer\": \"25498.9\",\n            \"vehicleID\": 17580,\n            \"deviceID\": 8388502,\n            \"driverID\": 39721,\n            \"journeyNote\": null,\n            \"personalPrivacyID\": 2,\n            \"personalPrivacyText\": \"No location information at fleet\",\n            \"businessPrivacyID\": 1,\n            \"businessPrivacyText\": \"Show all\"\n        },\n        {\n            \"journeyID\": 321403351,\n            \"startTime\": \"2021-08-11 07:23:44\",\n            \"endTime\": \"2021-08-11 07:38:01\",\n            \"journeyDuration\": 855,\n            \"VRM\": \"AB02ABC\",\n            \"vehicleNickname\": \"\",\n            \"journeyScore\": 9999,\n            \"journeyType\": \"business\",\n            \"journeyDistance\": \"8.7\",\n            \"startPosnLatitude\": 50.41505,\n            \"startPosnLongitude\": -4.0892,\n            \"endPosnLatitude\": 50.36617,\n            \"endPosnLongitude\": -4.09888,\n            \"startAddress\": \"1 Bush Park, Plymouth, PL6 7RG, United Kingdom\",\n            \"endAddress\": \"Plymouth, England, United Kingdom\",\n            \"endOfJourneyOdometer\": \"25507.6\",\n            \"vehicleID\": 17580,\n            \"deviceID\": 8388502,\n            \"driverID\": 39721,\n            \"journeyNote\": null,\n            \"personalPrivacyID\": 2,\n            \"personalPrivacyText\": \"No location information at fleet\",\n            \"businessPrivacyID\": 1,\n            \"businessPrivacyText\": \"Show all\"\n        },\n        {\n            \"journeyID\": 321413097,\n            \"startTime\": \"2021-08-11 07:47:49\",\n            \"endTime\": \"2021-08-11 07:52:59\",\n            \"journeyDuration\": 308,\n            \"VRM\": \"AB02ABC\",\n            \"vehicleNickname\": \"\",\n            \"journeyScore\": 9722,\n            \"journeyType\": \"personal\",\n            \"journeyDistance\": \"1.4\",\n            \"startPosnLatitude\": 50.36617,\n            \"startPosnLongitude\": -4.09888,\n            \"endPosnLatitude\": 50.35927,\n            \"endPosnLongitude\": -4.09512,\n            \"startAddress\": \"Plymouth, England, United Kingdom\",\n            \"endAddress\": \"6 Radford Park Road, Plymouth, PL9 9, United Kingdom\",\n            \"endOfJourneyOdometer\": \"25509.0\",\n            \"vehicleID\": 17580,\n            \"deviceID\": 8388502,\n            \"driverID\": 39721,\n            \"journeyNote\": null,\n            \"personalPrivacyID\": 2,\n            \"personalPrivacyText\": \"No location information at fleet\",\n            \"businessPrivacyID\": 1,\n            \"businessPrivacyText\": \"Show all\"\n        },\n        {\n            \"journeyID\": 321424567,\n            \"startTime\": \"2021-08-11 08:05:21\",\n            \"endTime\": \"2021-08-11 08:08:51\",\n            \"journeyDuration\": 207,\n            \"VRM\": \"AB02ABC\",\n            \"vehicleNickname\": \"\",\n            \"journeyScore\": 9999,\n            \"journeyType\": \"business\",\n            \"journeyDistance\": \"0.7\",\n            \"startPosnLatitude\": 50.35927,\n            \"startPosnLongitude\": -4.09512,\n            \"endPosnLatitude\": 50.35972,\n            \"endPosnLongitude\": -4.0914,\n            \"startAddress\": \"6 Radford Park Road, Plymouth, PL9 9, United Kingdom\",\n            \"endAddress\": \"Plymouth, PL9 9, United Kingdom\",\n            \"endOfJourneyOdometer\": \"25509.7\",\n            \"vehicleID\": 17580,\n            \"deviceID\": 8388502,\n            \"driverID\": 39721,\n            \"journeyNote\": null,\n            \"personalPrivacyID\": 2,\n            \"personalPrivacyText\": \"No location information at fleet\",\n            \"businessPrivacyID\": 1,\n            \"businessPrivacyText\": \"Show all\"\n        }\n    ]\n}"}],"_postman_id":"99e7c056-7128-4cc0-b135-cae87deafed1"},{"name":"/driver/league","id":"17f379f6-7c5b-4812-9960-c425c8e3355a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/league?leagueID=4656","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return standings and details for a given league. Supports either grouped public leagues or individual leagues based on <code>leagueType</code>.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>leagueID</code>.</li>\n<li>Optional <code>leagueType</code> query parameter:<ul>\n<li><code>grouped</code>: fetches a grouped public league preview via <code>LeagueHelper-&gt;getGroupedLeague(...)</code> (previous week).</li>\n<li><code>individual</code>: fetches an individual league a user belongs to via <code>LeagueHelper-&gt;getIndividualLeague(...)</code> (previous week).</li>\n<li>Omitted: uses <code>LeagueHelper-&gt;getLeague(...)</code> with <code>week</code> (defaults to <code>lastweek</code>).</li>\n</ul>\n</li>\n<li>If the user is not allowed or the league is unknown, a 400 error is returned.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/league</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-query\">Required (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>The league identifier.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-query\">Optional (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueType</code></td>\n<td>string</td>\n<td><code>grouped</code> or <code>individual</code>. Controls which helper path is used.</td>\n</tr>\n<tr>\n<td><code>week</code></td>\n<td>string</td>\n<td>When <code>leagueType</code> omitted, week bucket for cached standings: <code>thisweek</code>, <code>lastweek</code> (default), <code>thismonth</code>, <code>lastmonth</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>For grouped: returns an object with <code>leagueID</code>, <code>leagueName</code>, <code>leagueType: grouped</code>, <code>userStatus</code> (<code>joined</code>/<code>notJoined</code>), and <code>preview</code> (top positions, including the user's position if applicable).</li>\n<li>For individual: returns league details with <code>leagueType: individual</code> and <code>participants</code> array (ordered with positions).</li>\n<li>For default (no leagueType): returns the full league details and <code>participants</code> for the given week.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<ul>\n<li>Grouped (typical): <code>leagueID</code> (int), <code>leagueName</code> (string), <code>leagueType</code> (\"grouped\"), <code>userStatus</code> (string), <code>members</code> (int, for some grouped responses), <code>preview</code> (array of group entries with <code>position</code>, <code>leagueID</code>/<code>groupID</code>, names/scores).</li>\n<li>Individual/Default: <code>leagueID</code> (int), <code>leagueName</code> (string), optionally <code>leagueType</code> (\"individual\"), <code>participants</code> (array of participant objects). The current user's anonymized fields may be de-anonymised.</li>\n</ul>\n<h3 id=\"example-response-grouped\">Example Response (grouped)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"leagueID\": 2001,\n  \"leagueName\": \"Public Counties League\",\n  \"leagueType\": \"grouped\",\n  \"userStatus\": \"joined\",\n  \"members\": 128,\n  \"preview\": [\n    { \"position\": 1, \"groupID\": 3001, \"groupName\": \"County A\", \"score\": 97.3, \"userStatus\": \"notJoined\" },\n    { \"position\": 2, \"groupID\": 3005, \"groupName\": \"County B\", \"score\": 96.1, \"userStatus\": \"joined\" },\n    { \"position\": 3, \"groupID\": 3003, \"groupName\": \"County C\", \"score\": 95.9, \"userStatus\": \"notJoined\" },\n    { \"position\": 4, \"groupID\": 3002, \"groupName\": \"County D\", \"score\": 95.0, \"userStatus\": \"notJoined\" }\n  ]\n}\n</code></pre>\n<h3 id=\"example-response-individual\">Example Response (individual)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"leagueID\": 101,\n  \"leagueName\": \"Acme Fleet League\",\n  \"leagueType\": \"individual\",\n  \"participants\": [\n    { \"position\": 1, \"driverID\": 7001, \"screenName\": \"Top Driver\", \"score\": 98.7 },\n    { \"position\": 2, \"driverID\": 7002, \"screenName\": \"Jane D.\", \"score\": 97.1 }\n  ]\n}\n</code></pre>\n<h3 id=\"example-error-not-allowedincorrect\">Example Error (not allowed/incorrect)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"error\": \"Incorrect League ID or not allowed.\" }\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>League returned</td>\n<td>Valid league and access</td>\n<td>Render standings</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Not allowed/Unknown league</td>\n<td>League not public or not joined; invalid <code>leagueID</code></td>\n<td>Verify the league id and membership</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","league"],"host":["{{url}}"],"query":[{"key":"leagueID","value":"4656"},{"disabled":true,"description":{"content":"<p>Optional 'individual' or 'grouped' Defaults to individual</p>\n","type":"text/plain"},"key":"leagueType","value":"individual"},{"disabled":true,"description":{"content":"<p>Optional 'thisweek' or 'lastweek'  Defaults to lastweek</p>\n","type":"text/plain"},"key":"week","value":"thisweek"}],"variable":[]}},"response":[{"id":"71702f34-7c17-4783-ac28-9b9b1d8e7746","name":"/driver/league","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/v1/driver/league?leagueID=4656","host":["{{url}}"],"path":["v1","driver","league"],"query":[{"key":"leagueID","value":"4656"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 07 Jun 2019 14:45:29 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"leagueID\": 4656,\n        \"leagueName\": \"test\",\n        \"leagueType\": \"individual\",\n        \"userStatus\": 0,\n        \"leagueCategory\": \"Private\",\n        \"members\": 1,\n        \"participants\": [\n            {\n                \"leagueName\": \"test\",\n                \"driverID\": 39720,\n                \"screenName\": \"Handy Driver\",\n                \"firstName\": \"Handy\",\n                \"lastName\": \"Driver\",\n                \"imageURL\": \"https://lf-profile-pictures.s3.eu-west-1.amazonaws.com/S12Wizard-1536582479.png\",\n                \"score\": null,\n                \"mileage\": null,\n                \"isPrimary\": \"0\",\n                \"leagueID\": 4656,\n                \"globalUserID\": 10972,\n                \"position\": 1,\n                \"anonDrivers\": 0\n            }\n        ]\n    }\n}"}],"_postman_id":"17f379f6-7c5b-4812-9960-c425c8e3355a"},{"name":"/driver/leagues","id":"cbe74537-235a-4e56-a506-605dfc31bb94","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/v1/driver/leagues","description":"<h1 id=\"endpoint-summary\">Endpoint Summary</h1>\n<p><strong>Purpose:</strong> Retrieve the leagues that a driver is associated with.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<p>Provides a comprehensive overview of the leagues a driver is part of, including various settings and identifiers associated with each league.</p>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/leagues</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>401 Unauthorized</code>, <code>404 Not Found</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<p>Not Applicable</p>\n<h3 id=\"optional\">Optional</h3>\n<p>Not Applicable</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not Applicable</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not Applicable</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not Applicable</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<p>Returns an array of league objects with detailed properties for each league associated with the driver.</p>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>Unique identifier for the league</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Name of the league</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td>string</td>\n<td>Description of the league</td>\n</tr>\n<tr>\n<td><code>privacySetting</code></td>\n<td>string</td>\n<td>Privacy setting of the league</td>\n</tr>\n<tr>\n<td><code>fleetLeague</code></td>\n<td>integer</td>\n<td>Indicates if it's a fleet league</td>\n</tr>\n<tr>\n<td><code>sponsoredLeague</code></td>\n<td>integer</td>\n<td>Indicates if it's a sponsored league</td>\n</tr>\n<tr>\n<td><code>fleetLevelID</code></td>\n<td>integer</td>\n<td>Fleet level identifier</td>\n</tr>\n<tr>\n<td><code>defaultLeague</code></td>\n<td>integer</td>\n<td>Indicates if it's the default league</td>\n</tr>\n<tr>\n<td><code>groupUserID</code></td>\n<td>integer</td>\n<td>Group user identifier</td>\n</tr>\n<tr>\n<td><code>userID</code></td>\n<td>integer</td>\n<td>User identifier</td>\n</tr>\n<tr>\n<td><code>userEmailSetting</code></td>\n<td>integer</td>\n<td>User email setting status</td>\n</tr>\n<tr>\n<td><code>groupEmailSetting</code></td>\n<td>integer</td>\n<td>Group email setting status</td>\n</tr>\n<tr>\n<td><code>admin</code></td>\n<td>object / null</td>\n<td>Admin information (if applicable)</td>\n</tr>\n<tr>\n<td><code>inviteStatus</code></td>\n<td>integer</td>\n<td>Status of the invite</td>\n</tr>\n<tr>\n<td><code>isPrimary</code></td>\n<td>string</td>\n<td>Indicates if this is the primary league</td>\n</tr>\n<tr>\n<td><code>anonDrivers</code></td>\n<td>integer</td>\n<td>Count of anonymous drivers</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"leagueID\": 0,\n      \"name\": \"\",\n      \"description\": \"\",\n      \"privacySetting\": \"\",\n      \"fleetLeague\": 0,\n      \"sponsoredLeague\": 0,\n      \"fleetLevelID\": 0,\n      \"defaultLeague\": 0,\n      \"groupUserID\": 0,\n      \"userID\": 0,\n      \"userEmailSetting\": 0,\n      \"groupEmailSetting\": 0,\n      \"admin\": null,\n      \"inviteStatus\": 0,\n      \"isPrimary\": \"\",\n      \"anonDrivers\": 0\n    }\n  ]\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td><code>OK</code></td>\n<td>Successful request</td>\n<td>None</td>\n<td>Use returned data</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Invalid or missing authentication</td>\n<td>Provide valid authentication credentials</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>No leagues found for the driver</td>\n<td>Verify driver association</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server encountered an error</td>\n<td>Unexpected server condition</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","leagues"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"1f93faa6-b91d-4be9-8bc8-adfd812c9eb1","name":"/driver/leagues","originalRequest":{"method":"GET","header":[],"url":"{{url}}/v1/driver/leagues"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 08 May 2019 13:50:02 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"leagueID\": 4650,\n            \"name\": \"Herefordshire\",\n            \"description\": \"\",\n            \"privacySetting\": \"Public\",\n            \"fleetLeague\": 1,\n            \"sponsoredLeague\": 0,\n            \"fleetLevelID\": 8,\n            \"defaultLeague\": 0,\n            \"groupUserID\": 8,\n            \"userID\": 39720,\n            \"userEmailSetting\": 0,\n            \"groupEmailSetting\": 1,\n            \"admin\": null,\n            \"inviteStatus\": 1,\n            \"isPrimary\": \"0\",\n            \"anonDrivers\": 0\n        },\n        {\n            \"leagueID\": 4651,\n            \"name\": \"My Driving Mates\",\n            \"description\": \"\",\n            \"privacySetting\": \"Private\",\n            \"fleetLeague\": 0,\n            \"sponsoredLeague\": 0,\n            \"fleetLevelID\": null,\n            \"defaultLeague\": 0,\n            \"groupUserID\": 9,\n            \"userID\": 39720,\n            \"userEmailSetting\": 0,\n            \"groupEmailSetting\": 1,\n            \"admin\": 1,\n            \"inviteStatus\": 1,\n            \"isPrimary\": \"0\",\n            \"anonDrivers\": 0\n        }\n    ]\n}"}],"_postman_id":"cbe74537-235a-4e56-a506-605dfc31bb94"},{"name":"/driver/leagueDash","id":"6f0eeb45-8e1d-4cee-879f-1bece14d8efc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/leagueDash","description":"<h3 id=\"get-league-dashboard\">Get League Dashboard</h3>\n<p>This API endpoint retrieves the league dashboard for the user. It returns any pending invitations that have been received but not yet accepted, along with details of the leagues the user is part of, including scores of other members within those leagues and information on leagues that are available to join.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p><strong>Method</strong>: GET</p>\n</li>\n<li><p><strong>Endpoint</strong>: <code>{{url}}/v1/driver/leagueDash</code></p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><strong>Status</strong>: 200</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json</p>\n</li>\n</ul>\n<h5 id=\"response-structure\">Response Structure</h5>\n<p>The response is a JSON object containing the following fields:</p>\n<ul>\n<li><p><strong>data</strong> (object): The main data object containing:</p>\n<ul>\n<li><p><strong>invitations</strong> (array): An array of invitation objects. Each invitation object has the following structure:</p>\n<ul>\n<li><p><strong>leagueID</strong> (integer): The unique identifier for the league.</p>\n</li>\n<li><p><strong>leagueName</strong> (string): The name of the league.</p>\n</li>\n<li><p><strong>inviteFrom</strong> (string): The user who sent the invitation.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>public</strong> (object): An object representing public leagues the user can join. Each key is a league ID with the following structure:</p>\n<ul>\n<li><p><strong>leagueName</strong> (string): The name of the public league.</p>\n</li>\n<li><p><strong>leagueType</strong> (string): The type of the league.</p>\n</li>\n<li><p><strong>userStatus</strong> (string): The user's status in the league.</p>\n</li>\n<li><p><strong>score</strong> (array): An array of score objects for the league. Each score object has:</p>\n<ul>\n<li><p><strong>competitionID</strong> (integer): The unique identifier for the competition.</p>\n</li>\n<li><p><strong>leagueID</strong> (integer): The unique identifier for the league.</p>\n</li>\n<li><p><strong>competitionName</strong> (string): The name of the competition.</p>\n</li>\n<li><p><strong>name</strong> (string): The name of the participant.</p>\n</li>\n<li><p><strong>score</strong> (string): The score of the participant.</p>\n</li>\n<li><p><strong>imageUrl</strong> (string): A URL to the participant's image.</p>\n</li>\n<li><p><strong>position</strong> (integer): The position of the participant in the league.</p>\n</li>\n<li><p><strong>userStatus</strong> (string): The status of the user in the league.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>private</strong> (object): An object representing private leagues the user is part of. Each key is a league ID with the following structure:</p>\n<ul>\n<li><p><strong>members</strong> (integer): The number of members in the private league.</p>\n</li>\n<li><p><strong>leagueName</strong> (string): The name of the private league.</p>\n</li>\n<li><p><strong>leagueType</strong> (string): The type of the league.</p>\n</li>\n<li><p><strong>userStatus</strong> (string): The user's status in the league.</p>\n</li>\n<li><p><strong>score</strong> (array): An array of score objects for the league. Each score object has:</p>\n<ul>\n<li><p><strong>leagueName</strong> (string): The name of the league.</p>\n</li>\n<li><p><strong>driverID</strong> (integer): The unique identifier for the driver.</p>\n</li>\n<li><p><strong>screenName</strong> (string): The screen name of the driver.</p>\n</li>\n<li><p><strong>firstName</strong> (string): The first name of the driver.</p>\n</li>\n<li><p><strong>lastName</strong> (string): The last name of the driver.</p>\n</li>\n<li><p><strong>score</strong> (integer): The score of the driver.</p>\n</li>\n<li><p><strong>mileage</strong> (string): The mileage of the driver.</p>\n</li>\n<li><p><strong>leagueID</strong> (integer): The unique identifier for the league.</p>\n</li>\n<li><p><strong>globalUserID</strong> (integer): The global user identifier.</p>\n</li>\n<li><p><strong>position</strong> (integer): The position of the driver in the league.</p>\n</li>\n<li><p><strong>anonDrivers</strong> (integer): The number of anonymous drivers.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"example-responses\">Example Responses</h4>\n<p><strong>Successful Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"invitations\": [],\n    \"public\": {\n      \"887\": {\n        \"leagueName\": \"Public League A\",\n        \"leagueType\": \"Open\",\n        \"userStatus\": \"Joined\",\n        \"score\": [\n          {\n            \"competitionID\": 1,\n            \"leagueID\": 887,\n            \"competitionName\": \"Competition 1\",\n            \"name\": \"John Doe\",\n            \"score\": \"100\",\n            \"imageUrl\": \"http://example.com/image.jpg\",\n            \"position\": 1,\n            \"userStatus\": \"Active\"\n          }\n        ]\n      }\n    },\n    \"private\": {\n      \"4651\": {\n        \"members\": 5,\n        \"leagueName\": \"Private League B\",\n        \"leagueType\": \"Invite Only\",\n        \"userStatus\": \"Pending\",\n        \"score\": [\n          {\n            \"leagueName\": \"Private League B\",\n            \"driverID\": 123,\n            \"screenName\": \"Driver123\",\n            \"firstName\": \"Alice\",\n            \"lastName\": \"Smith\",\n            \"score\": 95,\n            \"mileage\": \"1500\",\n            \"leagueID\": 4651,\n            \"globalUserID\": 456,\n            \"position\": 2,\n            \"anonDrivers\": 1\n          }\n        ]\n      }\n    }\n  }\n}\n\n</code></pre>\n<p><strong>Error Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Bad Request\"\n  }\n}\n\n</code></pre>\n<p>It will also consist of leagues you are in along with details for each league, including scores of others within the league, and ones eligeble to join.</p>\n","urlObject":{"path":["v1","driver","leagueDash"],"host":["{{url}}"],"query":[{"disabled":true,"description":{"content":"<p>Optional 'thisweek', 'lastweek' defaults to lastweek if not set.</p>\n","type":"text/plain"},"key":"week","value":"thisweek"}],"variable":[]}},"response":[{"id":"d3f345ed-3228-4077-a2a5-e033ee0708cb","name":"/driver/leagueDash","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/leagueDash"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 08 May 2019 13:33:33 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"invitations\": [\n            {\n                \"leagueID\": 4652,\n                \"leagueName\": \"Raiding, Ploughing, Looting\",\n                \"inviteFrom\": \"The Viking\"\n            }\n        ],\n        \"public\": {\n            \"887\": {\n                \"leagueName\": \"Counties\",\n                \"leagueType\": \"grouped\",\n                \"userStatus\": \"joined\",\n                \"score\": [\n                    {\n                        \"competitionID\": 887,\n                        \"leagueID\": 3832,\n                        \"competitionName\": \"Counties\",\n                        \"name\": \"Cornwall\",\n                        \"score\": \"DQ\",\n                        \"imageUrl\": \"/assets/img/leagues/counties-cornwall-flag.png\",\n                        \"position\": 1,\n                        \"userStatus\": \"notJoined\"\n                    },\n                    {\n                        \"competitionID\": 887,\n                        \"leagueID\": 4472,\n                        \"competitionName\": \"Counties\",\n                        \"name\": \"Hampshire\",\n                        \"score\": \"DQ\",\n                        \"imageUrl\": \"/assets/img/leagues/counties-hampshire-flag.png\",\n                        \"position\": 9,\n                        \"userStatus\": \"notJoined\"\n                    },\n                    {\n                        \"competitionID\": 887,\n                        \"leagueID\": 4650,\n                        \"competitionName\": \"Counties\",\n                        \"name\": \"Herefordshire\",\n                        \"score\": \"DQ\",\n                        \"imageUrl\": \"/assets/img/leagues/counties-herefordshire-flag.png\",\n                        \"position\": 10,\n                        \"userStatus\": \"joined\"\n                    },\n                    {\n                        \"competitionID\": 887,\n                        \"leagueID\": 4473,\n                        \"competitionName\": \"Counties\",\n                        \"name\": \"Kent\",\n                        \"score\": \"DQ\",\n                        \"imageUrl\": \"/assets/img/leagues/counties-kent-flag.png\",\n                        \"position\": 11,\n                        \"userStatus\": \"notJoined\"\n                    }\n                ]\n            }\n        },\n        \"private\": {\n            \"4651\": {\n                \"members\": 2,\n                \"leagueName\": \"My Driving Mates\",\n                \"leagueType\": \"individual\",\n                \"userStatus\": \"joined\",\n                \"score\": [\n                    {\n                        \"leagueName\": \"My Driving Mates\",\n                        \"driverID\": 39720,\n                        \"screenName\": \"Handy Driver\",\n                        \"firstName\": \"Handy\",\n                        \"lastName\": \"Driver\",\n                        \"score\": 9327,\n                        \"mileage\": \"505.9\",\n                        \"leagueID\": 4651,\n                        \"globalUserID\": 10972,\n                        \"position\": 1,\n                        \"anonDrivers\": 0\n                    },\n                    {\n                        \"leagueName\": \"My Driving Mates\",\n                        \"driverID\": 39720,\n                        \"screenName\": \"Handy Driver\",\n                        \"firstName\": \"Handy\",\n                        \"lastName\": \"Driver\",\n                        \"score\": 8057,\n                        \"mileage\": \"56.5\",\n                        \"leagueID\": 4651,\n                        \"globalUserID\": 10972,\n                        \"position\": 2,\n                        \"anonDrivers\": 0\n                    }\n                ]\n            }\n        }\n    }\n}"}],"_postman_id":"6f0eeb45-8e1d-4cee-879f-1bece14d8efc"},{"name":"/driver/leagueGroups","id":"698b9760-dc09-4422-babc-b2573680fd1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/leagueGroups?leagueID=\"foot\"","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return grouped league scores (e.g., by regions/divisions) for a specific league group.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>leagueID</code>. Validated as int.</li>\n<li>Uses <code>LeagueHelper-&gt;getLeagueGroupScoresByCompetitionID(leagueID)</code> to fetch preview rows with positions and group metadata.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/leagueGroups</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-query\">Required (Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League competition identifier.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns an array of preview rows. Each row generally contains <code>leagueID</code>, <code>leagueName</code>, <code>groupID</code>, <code>groupName</code>, scores, and will be augmented with a <code>position</code> key and <code>userStatus</code> in helper composition.</li>\n</ul>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  { \"leagueID\": 2001, \"leagueName\": \"Public Counties League\", \"groupID\": 3001, \"groupName\": \"County A\", \"score\": 97.3 },\n  { \"leagueID\": 2001, \"leagueName\": \"Public Counties League\", \"groupID\": 3005, \"groupName\": \"County B\", \"score\": 96.1 }\n]\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": \"No data found\"\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"All of the required rules must pass for { leagueID: demoString }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Group scores returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","leagueGroups"],"host":["{{url}}"],"query":[{"key":"leagueID","value":"\"foot\""}],"variable":[]}},"response":[{"id":"9ec5dbb4-fd1d-4b6b-940d-eddfb2fd52de","name":"/driver/leagueGroups","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":887\n}"},"url":{"raw":"{{url}}/v1/driver/leagueGroups?leagueID=887","host":["{{url}}"],"path":["v1","driver","leagueGroups"],"query":[{"key":"leagueID","value":"887"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 03 Apr 2019 13:18:45 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"486"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"leagueID\": 888,\n            \"groupID\": 4130,\n            \"leagueName\": \"Countries\",\n            \"groupName\": \"United Kingdom\",\n            \"score\": \"9497\",\n            \"imageUrl\": \"/assets/img/leagues/counties-uk-flag.jpg\",\n            \"position\": 1\n        },\n        {\n            \"leagueID\": 888,\n            \"groupID\": 4131,\n            \"leagueName\": \"Countries\",\n            \"groupName\": \"United States\",\n            \"score\": \"9490\",\n            \"imageUrl\": \"/assets/img/leagues/counties-uae-flag.jpg\",\n            \"position\": 2\n        }\n    ]\n}"}],"_postman_id":"698b9760-dc09-4422-babc-b2573680fd1d"},{"name":"/driver/myDeals","id":"d0780438-6c76-41cd-995f-3e310f60b37b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/myDeals","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return deals for the user. Currently returns a static stub JSON payload.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>This endpoint reads from stubs/driver/myDeals.json and returns the contents.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/myDeals</code><br /><strong>Status Codes:</strong> <code>200 OK</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<p>None.</p>\n<h3 id=\"optional\">Optional</h3>\n<p>None.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>The exact shape depends on the stub file contents.</li>\n</ul>\n<h3 id=\"fields-representative\">Fields (representative)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.deals[]</code></td>\n<td>array</td>\n<td>List of deals</td>\n</tr>\n<tr>\n<td><code>data.deals[].title</code></td>\n<td>string</td>\n<td>Deal title</td>\n</tr>\n<tr>\n<td><code>data.deals[].expires</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>Expiry date of the deal</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response-representative\">Example Response (representative)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"deals\": [\n      { \"title\": \"10% off accessories\", \"expires\": \"2025-12-31\" }\n    ]\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Stubbed deals returned</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","myDeals"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"7572172f-6ce7-4fd8-9547-efe8f9062eb0","name":"/driver/myDeals","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"week\":\"thisweek\"\n}"},"url":"{{url}}/v1/driver/myDeals"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 04 Apr 2019 12:20:31 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.14"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"deals\": [\n            {\n                \"dealName\": \"Car Insurance\",\n                \"dealImage\": \"https://my.lightfoot.co.uk/assets/img/go-skippy.png\",\n                \"dealDescription\": \"Lightfoot Elite Drivers are now entitled to discounts on their personal car insurance premium! Only have Lightfoot in your work vehicle? Fear not – use your Elite Driver status earnt at work to get yourself a special deal on your personal car insurance at home! Click the button below to retrieve your discount code...\",\n                \"dealProviderIcon\": \"string\",\n                \"dealBadge\": \"20% discount for Elite Drivers\",\n                \"dealRedemptionType\": {\n                    \"redemptionType\": \"Cpn\",\n                    \"couponCode\": \"ABC\",\n                    \"dealUrl\": \"https://goskippy.com/?lightfoot_load_externally=true\"\n                }\n            },\n            {\n                \"dealName\": \"Car & Van Rental\",\n                \"dealImage\": \"https://my.lightfoot.co.uk/assets/img/thrifty.png\",\n                \"dealDescription\": \"Need to hire a vehicle? Great news – Lightfoot Elite Drivers get 10% off at Thrifty on vehicle hire. Whether it's a van to help move house, or that little sporty number for a fun weekend away – get the best deal possible from Thrifty by using your Elite Driver discount. Click the button below to retrieve your discount code...\",\n                \"dealProviderIcon\": \"string\",\n                \"dealBadge\": \"10% discount for Elite Drivers\",\n                \"dealRedemptionType\": {\n                    \"redemptionType\": \"Url\",\n                    \"dealUrl\": \"https://www.thrifty.co.uk/?lightfoot_load_externally=true\"\n                }\n            }\n        ]\n    }\n}"}],"_postman_id":"d0780438-6c76-41cd-995f-3e310f60b37b"},{"name":"/driver/userInfo","id":"946fe3dc-9463-4824-8765-30ffb7d15880","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{url}}/v1/driver/userInfo","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return account details for the user plus their vehicles list.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Combines AccountHelper-&gt;getAccountDetails(userID) with vehicles fetched via the FetchVehiclesByUserId use case.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/userInfo</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li><code>vehicles</code> appended as an array from the presenter.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.firstName</code></td>\n<td>string</td>\n<td>User's first name</td>\n</tr>\n<tr>\n<td><code>data.lastName</code></td>\n<td>string</td>\n<td>User's last name</td>\n</tr>\n<tr>\n<td><code>data.email</code></td>\n<td>string</td>\n<td>User email address</td>\n</tr>\n<tr>\n<td><code>data.speedUnits</code></td>\n<td>string</td>\n<td>Preferred speed units (e.g., mph, kph)</td>\n</tr>\n<tr>\n<td><code>data.vehicles[]</code></td>\n<td>array</td>\n<td>Vehicles list as returned by the presenter</td>\n</tr>\n<tr>\n<td><code>data.vehicles[].vehicleID</code></td>\n<td>integer</td>\n<td>Vehicle identifier</td>\n</tr>\n<tr>\n<td><code>data.vehicles[].registration</code></td>\n<td>string</td>\n<td>Vehicle registration (VRN)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"firstName\": \"Jane\",\n    \"lastName\": \"Doe\",\n    \"email\": \"jane@example.com\",\n    \"speedUnits\": \"mph\",\n    \"vehicles\": [\n      { \"vehicleID\": 77, \"registration\": \"AB12CDE\" }\n    ]\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>User info returned</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","userInfo"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"69301a95-2f57-49af-9bc8-87f2400a6839","name":"/driver/userInfo","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{url}}/v1/driver/userInfo"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 08 May 2019 13:09:47 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"firstName\": \"Demo\",\n        \"lastName\": \"Driver\",\n        \"username\": \"Demo Driver\",\n        \"email\": \"demo.driver@lightfoot.co.uk\",\n        \"profilePicture\": \"https://lf-profile-pictures.s3.eu-west-1.amazonaws.com/big-prizes-1535966986.png\",\n        \"userTimezone\": \"Europe/London\",\n        \"unitOfMeasure\": \"Imperial\",\n        \"locale\": \"en\",\n        \"localeDisplayName\": \"English\",\n        \"currenySymbol\": \"£\",\n        \"currencyName\": \"GBP\",\n        \"thisWeekScore\": 5415,\n        \"lastWeekScore\": 9326,\n        \"vehicleCheckEnabled\": 1,\n        \"dashcamEnabled\": 1,\n        \"vehicles\": [\n            {\n                \"fleetID\": 484,\n                \"fleetName\": \"Demo Fleet\",\n                \"VIN\": \"12345678901234501\",\n                \"driverID\": 39720,\n                \"MOTRenewal\": \"2019-10-05\",\n                \"taxRenewal\": \"2020-02-01\",\n                \"isBatteryHealthy\": 0,\n                \"vehicleID\": 17579,\n                \"vehicleImage\": \"\",\n                \"vehicleMake\": \"Alfa Romeo\",\n                \"vehicleModel\": \"Spider (2008)\",\n                \"vehicleType\": \"Car\",\n                \"VRM\": \"AB01ABC\",\n                \"lastDrivenDate\": \"2019-05-30 12:14:47\",\n                \"hubSerial\": 8388501,\n                \"settings.audioVolume\": null,\n                \"settings.endJourneyMessages\": 1,\n                \"settings.inCabAssistance\": 1,\n                \"settings.audioAssistance\": null,\n                \"fleetManagerEmail\": \"demo.manager@lightfoot.co.uk\"\n            },\n            {\n                \"fleetID\": null,\n                \"fleetName\": null,\n                \"VIN\": \"12345678901234549\",\n                \"driverID\": 39768,\n                \"MOTRenewal\": \"2021-05-04\",\n                \"taxRenewal\": \"2019-07-01\",\n                \"isBatteryHealthy\": 1,\n                \"vehicleID\": 17627,\n                \"vehicleImage\": \"\",\n                \"vehicleMake\": \"Mercedes-Benz\",\n                \"vehicleModel\": \"Vito\",\n                \"vehicleType\": \"Car\",\n                \"VRM\": \"AB49ABC\",\n                \"lastDrivenDate\": \"2019-05-30 12:26:14\",\n                \"hubSerial\": 8388549,\n                \"settings.audioVolume\": null,\n                \"settings.endJourneyMessages\": 1,\n                \"settings.inCabAssistance\": 1,\n                \"settings.audioAssistance\": null,\n                \"fleetManagerEmail\": null\n            }\n        ]\n    }\n}"},{"id":"41dd8898-5ba3-49df-9056-41a2d3fc9e42","name":"/driver/userInfo","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"{{url}}/v1/driver/userInfo"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 24 Sep 2024 12:30:42 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.62 ()"},{"key":"X-Powered-By","value":"PHP/7.4.28"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Language","value":"en"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"userID\": 4999,\n        \"firstName\": \"Demo\",\n        \"lastName\": \"Driver\",\n        \"username\": \"DemoDriver\",\n        \"email\": \"demo.driver@lightfoot.co.uk\",\n        \"profilePicture\": \"https://lf-profile-pictures.s3.eu-west-1.amazonaws.com/istockphoto-466409279-612x612-1574863356.jpg\",\n        \"userTimezone\": \"Europe/London\",\n        \"unitOfMeasure\": \"Imperial\",\n        \"locale\": \"en\",\n        \"localeDisplayName\": \"English\",\n        \"currenySymbol\": \"£\",\n        \"currencyName\": \"GBP\",\n        \"thisWeekScore\": 9172,\n        \"lastWeekScore\": 9210,\n        \"vehicleCheckEnabled\": 1,\n        \"dashcamEnabled\": 1,\n        \"EnhancedInsights\": 1,\n        \"editLabels\": 1,\n        \"vehicles\": [\n            {\n                \"fleetID\": 484,\n                \"fleetName\": \"Demo Fleet\",\n                \"VIN\": null,\n                \"driverID\": 39726,\n                \"yearManufactured\": 0,\n                \"MOTRenewal\": \"2025-06-26\",\n                \"taxRenewal\": \"2025-04-07\",\n                \"vehicleID\": 17585,\n                \"vehicleImage\": \"\",\n                \"vehicleMake\": \"Audi\",\n                \"vehicleModel\": \"A5 (2011)\",\n                \"vehicleType\": \"Car\",\n                \"fuel\": \"UNKNOWN\",\n                \"isBatteryHealthy\": 0,\n                \"VRM\": \"AB07ABC\",\n                \"lastDrivenDate\": \"2024-09-24 11:04:25\",\n                \"hubSerial\": 8388507,\n                \"settings.audioVolume\": null,\n                \"settings.endJourneyMessages\": 1,\n                \"settings.inCabAssistance\": 1,\n                \"settings.audioAssistance\": null,\n                \"fleetManagerEmail\": null,\n                \"SOC\": null,\n                \"distRemaining\": null,\n                \"ASevDataTimestamp\": null,\n                \"isCharging\": null,\n                \"latestChargeTime\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"946fe3dc-9463-4824-8765-30ffb7d15880"},{"name":"/driver/vehicles","id":"655cf25c-bc06-4d51-ba9c-4d21a4c7b9e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/vehicles","description":"<h1 id=\"endpoint-list-vehicles\">Endpoint: List Vehicles</h1>\n<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Return vehicles for the authenticated user. If no vehicles, returns <code>\"No data found\"</code> as data.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Presenter overrides getDataAsJson() to set <code>data</code> to the string <code>\"No data found\"</code> when empty.</li>\n<li>GET /v1/driver/deviceSettings redirects to this endpoint (see separate entry below).</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/vehicles</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data</code></td>\n<td>array or string</td>\n<td>Either an array of vehicles or the string \"No data found\" when empty</td>\n</tr>\n<tr>\n<td><code>data[].vehicleID</code></td>\n<td>integer</td>\n<td>Vehicle identifier</td>\n</tr>\n<tr>\n<td><code>data[].registration</code></td>\n<td>string</td>\n<td>Vehicle registration (VRN)</td>\n</tr>\n<tr>\n<td><code>data[].hubSerial</code></td>\n<td>integer</td>\n<td>Hub serial number (if present)</td>\n</tr>\n<tr>\n<td><code>data[].settings.audioVolume</code></td>\n<td>integer</td>\n<td>Current audio volume setting</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response-with-vehicles\">Example Response (with vehicles)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    { \"vehicleID\": 77, \"registration\": \"AB12CDE\", \"hubSerial\": 1234567, \"settings.audioVolume\": 4 }\n  ]\n}\n</code></pre>\n<h3 id=\"example-response-no-vehicles\">Example Response (no vehicles)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": \"No data found\"\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 500,\n    \"message\": \"&lt;error details&gt;\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Vehicles listed</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","vehicles"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"dc3a0dee-9afc-4c2d-a2df-b44fa8aba760","name":"/driver/vehicles","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/vehicles"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 13 Apr 2021 16:09:16 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.46 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"fleetID\": 484,\n            \"fleetName\": \"Demo Fleet\",\n            \"VIN\": null,\n            \"driverID\": 166459,\n            \"yearManufactured\": null,\n            \"MOTRenewal\": null,\n            \"taxRenewal\": null,\n            \"vehicleID\": 56561,\n            \"vehicleImage\": \"\",\n            \"vehicleMake\": \"Nissan\",\n            \"vehicleModel\": \"LEAF E + TEKNA\",\n            \"vehicleType\": \"Car\",\n            \"fuel\": \"electric\",\n            \"isBatteryHealthy\": 1,\n            \"VRM\": \"AB51ABC\",\n            \"lastDrivenDate\": \"2021-04-13 15:28:33\",\n            \"hubSerial\": 8388551,\n            \"settings.audioVolume\": null,\n            \"settings.endJourneyMessages\": 1,\n            \"settings.inCabAssistance\": 1,\n            \"settings.audioAssistance\": null,\n            \"fleetManagerEmail\": null,\n            \"SOC\": \"46.33\",\n            \"distRemaining\": null,\n            \"ASevDataTimestamp\": \"2021-04-12 22:07:50\",\n            \"isCharging\": 1,\n            \"latestChargeTime\": \"2021-04-12 22:07:50\"\n        }\n    ]\n}"},{"id":"ec634786-1abe-4f37-a03e-d9017aa1530b","name":"/driver/vehicles","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"week\":\"thisweek\"\n}"},"url":"{{url}}/v1/driver/vehicles"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 02 Apr 2019 09:35:13 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"901"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"vehicles\": [\n            {\n                \"vehicleID\": 1,\n                \"vrn\": \"AB19123\",\n                \"vin\": \"1HFGSDFHHFDS34342\",\n                \"MOTRenewal\": \"2020-01-05\",\n                \"taxRenewal\": \"2020-01-01\",\n                \"isBatteryHealthy\": true,\n                \"vehicleImage\": \"https://cdn.bringatrailer.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-2.31.27-PM-940x619.png\",\n                \"vehicleMake\": \"Volkswagen\",\n                \"vehicleModel\": \"MUSTANG\"\n            },\n            {\n                \"vehicleID\": 2,\n                \"vrn\": \"ABCD124\",\n                \"vin\": \"1HFGSDFHHFDSD34142\",\n                \"MOTRenewal\": \"2020-01-05\",\n                \"taxRenewal\": \"2020-01-01\",\n                \"isBatteryHealthy\": false,\n                \"vehicleImage\": \"https://images.pexels.com/photos/35967/mini-cooper-auto-model-vehicle.jpg?cs=srgb&dl=car-macro-mini-cooper-35967.jpg&fm=jpg\",\n                \"vehicleMake\": \"BMW\",\n                \"vehicleModel\": \"Audi Q7\"\n            }\n        ]\n    }\n}"}],"_postman_id":"655cf25c-bc06-4d51-ba9c-4d21a4c7b9e2"},{"name":"/driver/vehicleCharges","event":[{"listen":"prerequest","script":{"id":"a9f19ed8-c93c-4a57-997c-f8afe9eef353","exec":["// Date jazz\r","var moment = require('moment');\r","pm.environment.set(\"startDate\", moment().subtract(14,'day').format('YYYY-MM-DD'));\r","pm.environment.set(\"endDate\", moment().subtract(10,'day').format('YYYY-MM-DD'));"],"type":"text/javascript"}}],"id":"3b52138c-d903-4e74-b02e-70cc4c3460d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/vehicleCharges?startDate={{startDate}}&endDate={{endDate}}","description":"<h2 id=\"get-vehiclecharges\">GET /vehicleCharges</h2>\n<p><strong>Purpose:</strong> Fetch electric vehicle charges for a user within a date range.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>userID</code> from request context.</li>\n<li>Optional query parameters: <code>startDate</code>, <code>endDate</code> (UTC <code>Y-m-d</code>).</li>\n<li>Returns metadata with the charge array.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> GET<br /><strong>URL:</strong> /vehicleCharges<br /><strong>Status Codes:</strong> 200 OK, 400 Bad Request, 500 Internal Server Error</p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>startDate</code></td>\n<td>string</td>\n<td>UTC date (<code>Y-m-d</code>) to filter start of range</td>\n</tr>\n<tr>\n<td><code>endDate</code></td>\n<td>string</td>\n<td>UTC date (<code>Y-m-d</code>) to filter end of range</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Include</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"entity-aliases\">Entity Aliases</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Alias</th>\n<th>Entity Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<p>Returns a list of vehicle charges along with metadata.</p>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>charges</code></td>\n<td>array</td>\n<td>List of charges</td>\n</tr>\n<tr>\n<td><code>charges[].id</code></td>\n<td>int</td>\n<td>Charge ID</td>\n</tr>\n<tr>\n<td><code>charges[].vehicleID</code></td>\n<td>int</td>\n<td>Vehicle ID associated with the charge</td>\n</tr>\n<tr>\n<td><code>charges[].startTime</code></td>\n<td>string</td>\n<td>UTC start time (<code>Y-m-d H:i</code>)</td>\n</tr>\n<tr>\n<td><code>charges[].endTime</code></td>\n<td>string</td>\n<td>UTC end time (<code>Y-m-d H:i</code>)</td>\n</tr>\n<tr>\n<td><code>charges[].locationType</code></td>\n<td>int</td>\n<td>Location type ID</td>\n</tr>\n<tr>\n<td><code>meta</code></td>\n<td>object</td>\n<td>Additional metadata (pagination etc.)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"charges\": [\n    {\n      \"id\": 1,\n      \"vehicleID\": 123,\n      \"startTime\": \"2025-09-01 08:00\",\n      \"endTime\": \"2025-09-01 09:00\",\n      \"locationType\": 2\n    }\n  ],\n  \"meta\": {\n    \"total\": 1\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>Malformed request</td>\n<td>Invalid date format</td>\n<td>Check input parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Invalid token</td>\n<td>Refresh credentials</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>Insufficient permissions</td>\n<td>Check user roles</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>No charges in range</td>\n<td>Verify request parameters</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server error</td>\n<td>Unexpected server condition</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service unavailable</td>\n<td>Maintenance/server overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","vehicleCharges"],"host":["{{url}}"],"query":[{"key":"startDate","value":"{{startDate}}"},{"key":"endDate","value":"{{endDate}}"},{"disabled":true,"key":"","value":""}],"variable":[]}},"response":[{"id":"3ab105ff-fe10-49a3-9f2b-487aeff68aff","name":"/driver/vehicleCharges","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/v1/driver/vehicleCharges?startDate=2021-11-06&endDate=2021-11-07","host":["{{url}}"],"path":["v1","driver","vehicleCharges"],"query":[{"key":"","value":"","disabled":true},{"key":"startDate","value":"2021-11-06"},{"key":"endDate","value":"2021-11-07"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Nov 2021 14:49:16 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.51 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"chargeID\": 6056,\n            \"chargeLocationTypeID\": 1,\n            \"chargerType\": \"standard\",\n            \"startTime\": \"2021-11-05 22:07:50\",\n            \"endTime\": \"2021-11-06 08:01:51\",\n            \"startSoC\": \"46.33\",\n            \"endSoC\": \"76.02\",\n            \"energyAddedKWh\": \"11.90\",\n            \"maxTemperature\": \"14.00\",\n            \"totalDuration\": 35641,\n            \"latitude\": 54.12425,\n            \"longitude\": -2.65825,\n            \"address\": \"Fall Kirk, Lancaster, LA2 8, United Kingdom\",\n            \"VRM\": \"AB51ABC\",\n            \"vehicleNickname\": null,\n            \"deviceID\": 8388551,\n            \"driverID\": 166459\n        },\n        {\n            \"chargeID\": 6068,\n            \"chargeLocationTypeID\": 1,\n            \"chargerType\": \"standard\",\n            \"startTime\": \"2021-11-06 13:41:36\",\n            \"endTime\": \"2021-11-06 15:28:33\",\n            \"startSoC\": \"44.79\",\n            \"endSoC\": \"64.70\",\n            \"energyAddedKWh\": \"7.90\",\n            \"maxTemperature\": \"15.00\",\n            \"totalDuration\": 6417,\n            \"latitude\": 53.40623,\n            \"longitude\": -2.89165,\n            \"address\": \"M62, Liverpool, L14 3, United Kingdom\",\n            \"VRM\": \"AB51ABC\",\n            \"vehicleNickname\": null,\n            \"deviceID\": 8388551,\n            \"driverID\": 166459\n        },\n        {\n            \"chargeID\": 6071,\n            \"chargeLocationTypeID\": 1,\n            \"chargerType\": \"standard\",\n            \"startTime\": \"2021-11-06 15:42:36\",\n            \"endTime\": \"2021-11-06 19:10:50\",\n            \"startSoC\": \"64.85\",\n            \"endSoC\": \"96.84\",\n            \"energyAddedKWh\": \"13.60\",\n            \"maxTemperature\": \"15.00\",\n            \"totalDuration\": 12494,\n            \"latitude\": 53.40623,\n            \"longitude\": -2.89165,\n            \"address\": \"M62, Liverpool, L14 3, United Kingdom\",\n            \"VRM\": \"AB51ABC\",\n            \"vehicleNickname\": null,\n            \"deviceID\": 8388551,\n            \"driverID\": 166459\n        }\n    ],\n    \"meta\": {\n        \"ChargeLocationTypes\": [\n            {\n                \"chargeLocationTypeID\": 1,\n                \"chargeLocationTypeName\": \"Unknown\",\n                \"description\": null,\n                \"initialRate\": \"0.00\",\n                \"driverCanOverride\": null,\n                \"isDefault\": 0\n            },\n            {\n                \"chargeLocationTypeID\": 2,\n                \"chargeLocationTypeName\": \"Home\",\n                \"description\": null,\n                \"initialRate\": \"0.10\",\n                \"driverCanOverride\": null,\n                \"isDefault\": 1\n            },\n            {\n                \"chargeLocationTypeID\": 3,\n                \"chargeLocationTypeName\": \"Work\",\n                \"description\": null,\n                \"initialRate\": \"0.00\",\n                \"driverCanOverride\": null,\n                \"isDefault\": 0\n            },\n            {\n                \"chargeLocationTypeID\": 4,\n                \"chargeLocationTypeName\": \"Public\",\n                \"description\": null,\n                \"initialRate\": \"0.20\",\n                \"driverCanOverride\": null,\n                \"isDefault\": 0\n            }\n        ]\n    }\n}"}],"_postman_id":"3b52138c-d903-4e74-b02e-70cc4c3460d4"},{"name":"/driver/vehicleCheckStatus","id":"f23bf0a9-20cb-4fd6-9827-869679b662f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{url}}/v1/driver/vehicleCheckStatus","description":"<h1 id=\"endpoint-summary\">Endpoint Summary</h1>\n<p>This section documents the <strong>Vehicle Check APIs</strong>. These endpoints support driver vehicle checks, retrieving vehicle check status, questions, and saving check answers (with optional attachments).</p>\n<hr />\n<p>GET <code>/vehicleCheckStatus</code></p>\n<p><strong>Purpose:</strong> Returns the completion status of a vehicle check for the logged-in user.</p>\n<h3 id=\"endpoint-notes\">Endpoint Notes</h3>\n<ul>\n<li><p>Uses the authenticated user's <code>userID</code> (request attribute).</p>\n</li>\n<li><p>Wraps logic via <code>VehicleCheckHelper::userCompletedCheck()</code>.</p>\n</li>\n<li><p>If an error is present, a <code>400 Bad Request</code> is returned.</p>\n</li>\n</ul>\n<h3 id=\"http-info\">HTTP Info</h3>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/vehicleCheckStatus</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<h3 id=\"request-fields\">Request Fields</h3>\n<p><em>No request parameters required. The endpoint uses the</em> <code>_userID_</code> <em>from the request attribute.</em></p>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"fields\">Fields</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Outcome (<code>success</code>, <code>error</code>).</td>\n</tr>\n<tr>\n<td><code>data</code></td>\n<td>object</td>\n<td>Contains details of vehicle check status (structure defined by <code>VehicleCheckHelper</code>).</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Present if an error occurs.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"example-responses\">Example Responses</h4>\n<p><strong>Success (200)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"completed\": true,\n    \"lastCheckDate\": \"2025-09-07T08:00:00Z\"\n  },\n  \"message\": \"OK\"\n}\n\n</code></pre>\n<p><strong>Error (400)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"error\",\n  \"data\": [\"Data Missing, {\"checkID\": \"Invalid\"}\"],\n  \"message\": \"Invalid vehicle check data\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td><code>OK</code></td>\n<td>Request successful</td>\n<td>Valid parameters and fleet check saved/retrieved</td>\n<td>Continue workflow</td>\n</tr>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>Invalid request</td>\n<td>Missing/invalid VRM, vehicle ID, or check fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Missing/invalid authentication/session</td>\n<td>Re-authenticate</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>User does not have permission</td>\n<td>Verify permissions</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>Fleet check ID not found</td>\n<td>Check identifiers</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server encountered an unexpected error</td>\n<td>Repository/database failure</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service temporarily unavailable</td>\n<td>Maintenance or overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","vehicleCheckStatus"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"dd5a885e-6582-430c-850c-bc6d0012f4bb","name":"/driver/vehicleCheckStatus","originalRequest":{"method":"GET","header":[],"url":"{{url}}/v1/driver/vehicleCheckStatus"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 10 Jul 2019 13:07:43 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"29"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"checkCompleted\": 0\n    }\n}"}],"_postman_id":"f23bf0a9-20cb-4fd6-9827-869679b662f5"},{"name":"/driver/vehicleQuestions","id":"7bf41ead-3224-4fbe-a58d-21ab4f0d9843","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"url":"{{url}}/v1/driver/vehicleQuestions?vrm=AB01ABC","description":"<h1 id=\"endpoint-summary\">Endpoint Summary</h1>\n<p>This section documents the <strong>Vehicle Check APIs</strong>. These endpoints support driver vehicle checks, retrieving vehicle check status, questions, and saving check answers (with optional attachments).</p>\n<hr />\n<h2 id=\"get-vehiclequestions\">GET <code>/vehicleQuestions</code></h2>\n<p><strong>Purpose:</strong> Retrieves the vehicle check questions for a given vehicle, identified by VRM.</p>\n<h3 id=\"endpoint-notes\">Endpoint Notes</h3>\n<ul>\n<li><p>Requires query parameter <code>vrm</code> (ASCII string).</p>\n</li>\n<li><p>Validates via <code>Respect\\Validation</code>.</p>\n</li>\n<li><p>Returns vehicle check structure via <code>VehicleCheckHelper::getVehicleCheck()</code>.</p>\n</li>\n</ul>\n<h3 id=\"http-info\">HTTP Info</h3>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/vehicleQuestions</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<h3 id=\"request-fields\">Request Fields</h3>\n<h4 id=\"required\">Required</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>vrm</code></td>\n<td>string</td>\n<td>Vehicle Registration Mark (ASCII characters).</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional\">Optional</h4>\n<p><em>None.</em></p>\n<h3 id=\"response\">Response</h3>\n<h4 id=\"fields\">Fields</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Outcome (<code>success</code>, <code>error</code>).</td>\n</tr>\n<tr>\n<td><code>data</code></td>\n<td>object</td>\n<td>Object containing the vehicle check questions.</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Present if error occurs.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"example-responses\">Example Responses</h4>\n<p><strong>Success (200)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"questions\": [\n      {\n        \"id\": 1,\n        \"text\": \"Are tyres in good condition?\",\n        \"type\": \"boolean\"\n      },\n      {\n        \"id\": 2,\n        \"text\": \"Record odometer reading\",\n        \"type\": \"number\"\n      }\n    ]\n  },\n  \"message\": \"OK\"\n}\n\n</code></pre>\n<p><strong>Error (400)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"error\",\n  \"data\": [\"Data Missing, {\"vrm\": \"Invalid\"}\"],\n  \"message\": \"Invalid VRM provided\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td><code>OK</code></td>\n<td>Request successful</td>\n<td>Valid parameters and fleet check saved/retrieved</td>\n<td>Continue workflow</td>\n</tr>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>Invalid request</td>\n<td>Missing/invalid VRM, vehicle ID, or check fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Missing/invalid authentication/session</td>\n<td>Re-authenticate</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>User does not have permission</td>\n<td>Verify permissions</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>Fleet check ID not found</td>\n<td>Check identifiers</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server encountered an unexpected error</td>\n<td>Repository/database failure</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service temporarily unavailable</td>\n<td>Maintenance or overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","vehicleQuestions"],"host":["{{url}}"],"query":[{"key":"vrm","value":"AB01ABC"}],"variable":[]}},"response":[{"id":"637e478b-3800-4789-a770-b0125afbfb54","name":"/driver/vehicleQuestions","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"url":{"raw":"https://devdata.lightfoot.co.uk/v1/driver/vehicleQuestions?vrm=AB00ABC","protocol":"https","host":["devdata","lightfoot","co","uk"],"path":["v1","driver","vehicleQuestions"],"query":[{"key":"vrm","value":"AB00ABC"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 08 Feb 2019 11:52:16 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.13"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"vehicleCheckID\": 9,\n            \"fleetID\": 484,\n            \"vehicleID\": 17578,\n            \"checkFrequency\": 1,\n            \"vehicleTypeID\": 1,\n            \"questions\": [\n                {\n                    \"questionID\": 3,\n                    \"description\": \"Test\",\n                    \"vehicleTypeID\": 0\n                },\n                {\n                    \"questionID\": 4,\n                    \"description\": \"Test Question 2\",\n                    \"vehicleTypeID\": 0\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"7bf41ead-3224-4fbe-a58d-21ab4f0d9843"},{"name":"/driver/weeklyScores","id":"2c176a03-c768-40b5-b8c2-e901aac745a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/weeklyScores","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Fetch weekly driving scores for the authenticated user, along with the user's preferred speed units.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Response wraps <code>weeklyScores</code> with <code>userSettings.preferredUnits</code> taken from <code>speedUnits</code> request attribute.</li>\n<li>Enhanced insights may alter score computation if enabled for the user.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <code>/v1/driver/weeklyScores</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<p>Not applicable.</p>\n<h3 id=\"optional\">Optional</h3>\n<p>Not applicable.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Presenter returns <code>{ data: { userSettings, weeklyScores } }</code>.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.userSettings.preferredUnits</code></td>\n<td>string</td>\n<td>Preferred speed units (e.g., mph, kmh)</td>\n</tr>\n<tr>\n<td><code>data.weeklyScores[]</code></td>\n<td>array</td>\n<td>Weekly score entries</td>\n</tr>\n<tr>\n<td><code>data.weeklyScores[].weekStart</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>Week start date</td>\n</tr>\n<tr>\n<td><code>data.weeklyScores[].weekEnd</code></td>\n<td>string (YYYY-MM-DD)</td>\n<td>Week end date</td>\n</tr>\n<tr>\n<td><code>data.weeklyScores[].score</code></td>\n<td>number</td>\n<td>Weekly driving score</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"userSettings\": { \"preferredUnits\": \"mph\" },\n    \"weeklyScores\": [\n      { \"weekStart\": \"2025-08-25\", \"weekEnd\": \"2025-08-31\", \"score\": 95.2 },\n      { \"weekStart\": \"2025-09-01\", \"weekEnd\": \"2025-09-07\", \"score\": 96.0 }\n    ]\n  }\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 500,\n    \"message\": \"Unable to fetch weekly scores\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Scores returned</td>\n<td>Valid request</td>\n<td>Render scores</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","weeklyScores"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"92468a0c-2fec-4540-8498-a5c5315ac6ae","name":"/driver/weeklyScores","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/weeklyScores"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 11 Aug 2021 15:00:36 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.48 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"userSettings\": {\n            \"preferredUnits\": \"mph\"\n        },\n        \"weeklyScores\": [\n            {\n                \"weekStart\": \"2021-08-02\",\n                \"weeklyScore\": 9372,\n                \"weeklyGreen\": \"5943\",\n                \"weeklyRed\": \"4\",\n                \"weeklyAmber\": \"390\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistanceKilometers\": \"826.1\",\n                \"weeklyIdleTime\": \"4325\",\n                \"weeklyJourneys\": 22,\n                \"weeklyTime\": \"50279\",\n                \"weeklyIdlingPenalties\": null,\n                \"weeklyHarshAccelerationEvents\": null,\n                \"weeklyHarshCorneringEvents\": null,\n                \"weeklyHarshBrakingEvents\": null,\n                \"weeklyOverspeedMinorEvents\": null,\n                \"weeklyOverspeedMajorEvents\": null,\n                \"weeklyOverspeedSevereEvents\": null\n            },\n            {\n                \"weekStart\": \"2021-07-26\",\n                \"weeklyScore\": 9402,\n                \"weeklyGreen\": \"3464\",\n                \"weeklyRed\": \"3\",\n                \"weeklyAmber\": \"214\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistanceKilometers\": \"380.7\",\n                \"weeklyIdleTime\": \"2145\",\n                \"weeklyJourneys\": 15,\n                \"weeklyTime\": \"26326\",\n                \"weeklyIdlingPenalties\": null,\n                \"weeklyHarshAccelerationEvents\": null,\n                \"weeklyHarshCorneringEvents\": null,\n                \"weeklyHarshBrakingEvents\": null,\n                \"weeklyOverspeedMinorEvents\": null,\n                \"weeklyOverspeedMajorEvents\": null,\n                \"weeklyOverspeedSevereEvents\": null\n            },\n            {\n                \"weekStart\": \"2021-07-19\",\n                \"weeklyScore\": 9615,\n                \"weeklyGreen\": \"5949\",\n                \"weeklyRed\": \"1\",\n                \"weeklyAmber\": \"236\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistanceKilometers\": \"850.8\",\n                \"weeklyIdleTime\": \"7055\",\n                \"weeklyJourneys\": 20,\n                \"weeklyTime\": \"50998\",\n                \"weeklyIdlingPenalties\": null,\n                \"weeklyHarshAccelerationEvents\": null,\n                \"weeklyHarshCorneringEvents\": null,\n                \"weeklyHarshBrakingEvents\": null,\n                \"weeklyOverspeedMinorEvents\": null,\n                \"weeklyOverspeedMajorEvents\": null,\n                \"weeklyOverspeedSevereEvents\": null\n            },\n            {\n                \"weekStart\": \"2021-07-12\",\n                \"weeklyScore\": 9457,\n                \"weeklyGreen\": \"6308\",\n                \"weeklyRed\": \"0\",\n                \"weeklyAmber\": \"362\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistanceKilometers\": \"923.4\",\n                \"weeklyIdleTime\": \"7960\",\n                \"weeklyJourneys\": 25,\n                \"weeklyTime\": \"55159\",\n                \"weeklyIdlingPenalties\": null,\n                \"weeklyHarshAccelerationEvents\": null,\n                \"weeklyHarshCorneringEvents\": null,\n                \"weeklyHarshBrakingEvents\": null,\n                \"weeklyOverspeedMinorEvents\": null,\n                \"weeklyOverspeedMajorEvents\": null,\n                \"weeklyOverspeedSevereEvents\": null\n            },\n            {\n                \"weekStart\": \"2021-07-05\",\n                \"weeklyScore\": 9350,\n                \"weeklyGreen\": \"3152\",\n                \"weeklyRed\": \"1\",\n                \"weeklyAmber\": \"217\",\n                \"weeklyPenalties\": \"0\",\n                \"weeklyDistanceKilometers\": \"381.3\",\n                \"weeklyIdleTime\": \"2005\",\n                \"weeklyJourneys\": 17,\n                \"weeklyTime\": \"25350\",\n                \"weeklyIdlingPenalties\": null,\n                \"weeklyHarshAccelerationEvents\": null,\n                \"weeklyHarshCorneringEvents\": null,\n                \"weeklyHarshBrakingEvents\": null,\n                \"weeklyOverspeedMinorEvents\": null,\n                \"weeklyOverspeedMajorEvents\": null,\n                \"weeklyOverspeedSevereEvents\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"2c176a03-c768-40b5-b8c2-e901aac745a3"},{"name":"/driver/competition","id":"15c1c0ae-4b1d-42f5-b6b6-9395c1868c10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"competitionID\":3646\n}"},"url":"{{url}}/v1/driver/competition","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Enter a competition for the authenticated user.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>competitionID</code> (int). If user has insufficient points or a business rule fails, a 400 error is thrown.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/competition</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>competitionID</code></td>\n<td>integer</td>\n<td>Competition identifier to enter.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns DB result from <code>sp_api_competition_enter</code> on success.</li>\n</ul>\n<h3 id=\"fields-representative\">Fields (representative)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.prizeCompetitionEntrantID</code></td>\n<td>integer</td>\n<td>Identifier for the entrant record</td>\n</tr>\n<tr>\n<td><code>data.status</code></td>\n<td>string</td>\n<td>Operation status (e.g., <code>entered</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"competitionID\": null,\n        \"hasEnteredCompetition\": 1,\n        \"name\": null,\n        \"description\": null,\n        \"imageURL\": null,\n        \"startDate\": null,\n        \"endDate\": null,\n        \"remainingSpaces\": null,\n        \"premiumEntrancePoints\": null,\n        \"winnersName\": null,\n        \"winnerUserID\": null,\n        \"competitionType\": null,\n        \"prizeCompetitionEntrantID\": null\n    }\n}\n\n</code></pre>\n<h3 id=\"example-error-insufficient-points\">Example Error (insufficient points)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Insufficient points\"\n  }\n}\n\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Entered competition</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or business rule error</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","competition"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"48ebc02c-af0b-4229-80b7-2c8542833327","name":"/driver/competition","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"competitionID\":3646\n}"},"url":"https://devdata.lightfoot.co.uk/v1/driver/competition"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 22 Feb 2019 14:56:10 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.13"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"prizeCompetitionID\": 3646,\n        \"name\": \"Photo shoot Choice\",\n        \"description\": \"Capture a magical moment with the Photoshoot choice. This makes a fantastic gift for somebody because it means they can choose the photoshoot that best suits them. There is a choice of seven photographic sessions so you are guaranteed to find one that suits you.\\n\\nChoose from the following photoshoots:\\n\\n•Couple’s\\n•Boudoir\\n•Family\\n•Bump to Baby\\n•Mother and Daughter\\n•Fashion Makeover\\n•Pet\\n\",\n        \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/photoshoot-mc-1550226180.jpg\",\n        \"startDate\": \"2019-02-15\",\n        \"endDate\": \"2019-02-23\",\n        \"fleetLevelID\": 3793,\n        \"competitionType\": \"opt-in\",\n        \"value\": null,\n        \"prizeReference\": null,\n        \"dispatchType\": null,\n        \"added\": \"2019-02-15 10:21:16\",\n        \"addedBy\": \"competitions\",\n        \"lastUpdate\": \"2019-02-22 14:47:57\",\n        \"updatedBy\": \"\",\n        \"maxEntries\": 0,\n        \"winnersName\": null,\n        \"winnerUserID\": null,\n        \"isLive\": 1,\n        \"isDeleted\": 0\n    }\n}"}],"_postman_id":"15c1c0ae-4b1d-42f5-b6b6-9395c1868c10"},{"name":"/driver/fleetActivation","id":"e4ef3522-0f44-45cb-89aa-567e6b25c01b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"activationCode\" : \"c5b24b3de676\"\n}"},"url":"{{url}}/v1/driver/fleetActivation","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Activate a driver within a fleet using an activation code (and optional fleet name), then return login details. Sends a welcome email if activation completes.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Validates <code>activationCode</code> (hex string) and optional <code>fleetName</code>.</li>\n<li>Uses AccountHelper-&gt;driverFleetActivation and then AccountHelper-&gt;registerGetLoginDetails.</li>\n<li>If <code>needsInstallationOrFleet == 0</code> in details, triggers welcome email via SparkPost.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/fleetActivation</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>activationCode</code></td>\n<td>string (hex)</td>\n<td>Fleet activation code.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fleetName</code></td>\n<td>string</td>\n<td>Fleet name (optional).</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-activated-and-welcomes-sent\">Example Response (activated and welcomes sent)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"email\": \"jane@example.com\",\n    \"needsInstallationOrFleet\": 0,\n    \"message\": \"Activation complete\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-invalid-code\">Example Error (invalid code)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"All of the required rules must pass for { activationCode: demoString }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Activation complete/details returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","fleetActivation"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"f32a53b5-01f4-44c1-a31f-62db3d616788","name":"/driver/fleetActivation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"activationCode\" : \"c5b24b3de676\"\n}"},"url":"{{url}}/v1/driver/fleetActivation"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"userID\": 25261,\n        \"username\": null,\n        \"vehicleCheckEnabled\": 1,\n        \"vehicles\": [\n            {\n                \"fleetID\": 484,\n                \"fleetName\": \"Demo Fleet\",\n                \"VIN\": null,\n                \"driverID\": 39766,\n                \"MOTRenewal\": \"2020-06-30\",\n                \"taxRenewal\": \"2020-11-01\",\n                \"isBatteryHealthy\": 0,\n                \"vehicleID\": 17625,\n                \"vehicleImage\": \"\",\n                \"vehicleMake\": \"Fiat\",\n                \"vehicleModel\": \"FULLBACK LX 4X4\",\n                \"vehicleType\": \"Car\",\n                \"VRM\": \"AB47ABC\",\n                \"lastDrivenDate\": \"2020-06-22 16:01:45\",\n                \"hubSerial\": 8388547,\n                \"settings.audioVolume\": null,\n                \"settings.endJourneyMessages\": 1,\n                \"settings.inCabAssistance\": 1,\n                \"settings.audioAssistance\": null,\n                \"fleetManagerEmail\": null\n            }\n        ],\n        \"apiToken\": \"8db2cf0bf4440d3de807ac69f43dacd4ce1e81065b55ff555362c4bee13e850a\"\n    }\n}\n"}],"_postman_id":"e4ef3522-0f44-45cb-89aa-567e6b25c01b"},{"name":"/driver/deviceSettings","id":"1375f8eb-17ba-44a7-a97a-8678c89913e5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"vehicleID\":1,\n\t\"settings.audioVolume\":50,\n\t\"settings.inCabAssistance\":true,\n\t\"settings.audioAssistance\":1,\n\t\"settings.endJourneyMessages\":true\n}"},"url":"{{url}}/v1/driver/deviceSettings","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Update hub/device settings for a specific vehicle by computing differences and sending updates to the hub.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Validates required fields under <code>settings</code>:<ul>\n<li><code>audioVolume</code> (int),</li>\n<li><code>endJourneyMessages</code> (bool),</li>\n<li><code>inCabAssistance</code> (bool),</li>\n<li><code>audioAssistance</code> (int).</li>\n</ul>\n</li>\n<li>Only applies when the <code>vehicleID</code> belongs to the authenticated user; otherwise returns a message that no changes will be made (implicitly, via comparison result being null if not found).</li>\n<li>If no differences are found, returns <code>\"No changes, hub settings not updated.\"</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/deviceSettings</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>vehicleID</code></td>\n<td>integer</td>\n<td>Vehicle to update.</td>\n</tr>\n<tr>\n<td><code>settings.audioVolume</code></td>\n<td>integer</td>\n<td>Volume level.</td>\n</tr>\n<tr>\n<td><code>settings.endJourneyMessages</code></td>\n<td>boolean</td>\n<td>Toggle end-of-journey messages.</td>\n</tr>\n<tr>\n<td><code>settings.inCabAssistance</code></td>\n<td>boolean</td>\n<td>Toggle in-cab assistance.</td>\n</tr>\n<tr>\n<td><code>settings.audioAssistance</code></td>\n<td>integer</td>\n<td>Assistance mode level.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-no-changes\">Example Response (no changes)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"message\": \"No changes, hub settings not updated.\"\n  }\n}\n</code></pre>\n<h3 id=\"example-response-updated\">Example Response (updated)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"message\": \"Hub settings successfully updated.\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-validation\">Example Error (validation)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"All of the required rules must pass for { settings.audioVolume: demoString }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Settings updated or no-op message returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","deviceSettings"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"881fc4a6-9b7f-40d7-8103-d8b83d001c7d","name":"/driver/deviceSettings","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"vehicleID\":1,\n\t\"settings.audioVolume\":50,\n\t\"settings.inCabAssistance\":true,\n\t\"settings.audioAssistance\":1,\n\t\"settings.endJourneyMessages\":true\n}"},"url":"{{url}}/v1/driver/deviceSettings"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 08 May 2019 12:29:21 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"VIN\": \"12345678901234501\",\n            \"driverID\": 39720,\n            \"MOTRenewal\": \"2019-10-05\",\n            \"taxRenewal\": \"2020-02-01\",\n            \"isBatteryHealthy\": 0,\n            \"vehicleImage\": \"\",\n            \"vehicleMake\": \"Alfa Romeo\",\n            \"vehicleModel\": \"Spider (2008)\",\n            \"vehicleType\": \"Car\",\n            \"VRM\": \"AB01ABC\",\n            \"settings.audioVolume\": null,\n            \"settings.endJourneyMessages\": 1,\n            \"settings.inCabAssistance\": 1,\n            \"settings.audioAssistance\": null,\n            \"vehicleID\": 17579\n        },\n        {\n            \"VIN\": \"12345678901234549\",\n            \"driverID\": 39768,\n            \"MOTRenewal\": \"2021-05-04\",\n            \"taxRenewal\": \"2019-07-01\",\n            \"isBatteryHealthy\": 1,\n            \"vehicleImage\": \"\",\n            \"vehicleMake\": \"Mercedes-Benz\",\n            \"vehicleModel\": \"Vito\",\n            \"vehicleType\": \"Car\",\n            \"VRM\": \"AB49ABC\",\n            \"settings.audioVolume\": null,\n            \"settings.endJourneyMessages\": 1,\n            \"settings.inCabAssistance\": 1,\n            \"settings.audioAssistance\": null,\n            \"vehicleID\": 17627\n        }\n    ]\n}"}],"_postman_id":"1375f8eb-17ba-44a7-a97a-8678c89913e5"},{"name":"/driver/expenseReport","id":"e336532d-83e2-405f-b84c-015e373431bb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"recipientEmail\":\"phil.bate@lightfoot.co.uk\",\n\t\"journeys\":[\n    {\n      \"journeyCost\" : 10.55,\n      \"VRM\": \"string\",\n      \"startTime\": \"2019-01-25 06:40:58\",\n      \"endTime\" : \"string\",\n      \"startAddress\": \"string\",\n      \"endAddress\": \"string\",\n      \"journeyDuration\": 1236,\n      \"journeyDistance\": \"11.7\",\n      \"journeyType\": \"business\"\n    },\n    {\n      \"journeyCost\" : 10.55,\n      \"VRM\": \"string\",\n      \"startTime\": \"2019-01-25 06:40:58\",\n      \"endTime\" : \"string\",\n      \"startAddress\": \"string\",\n      \"endAddress\": \"string\",\n      \"journeyDuration\": 1236,\n      \"journeyDistance\": \"11.7\",\n      \"journeyType\": \"business\"\n    }\n  ]\n}"},"url":"{{url}}/v1/driver/expenseReport","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Generate an expense report (CSV/PDF) for a set of journeys and email it to a recipient. Marked as possibly deprecated in code.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>May be superseded by <code>/sendExpense</code> and <code>/downloadExpenses</code> endpoints.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/expenseReport</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>recipientEmail</code></td>\n<td>string (email)</td>\n<td>Recipient email address.</td>\n</tr>\n<tr>\n<td><code>journeys</code></td>\n<td>array</td>\n<td>Array of journeys to include (structure consumed by helper).</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>odoReading</code></td>\n<td>number (float)</td>\n<td>Ending odometer reading to include in the report.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>On success, sends emails and returns a success message.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Operation result message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"message\": \"Successfully sent expense report.\" }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Invalid recipientEmail\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Report sent</td>\n<td>Valid input</td>\n<td>Inform user</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Invalid email or missing journeys</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Email/send failure</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","expenseReport"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"1029e314-9fe6-4ae8-b123-672943a3295f","name":"/driver/expenseReport","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"recipientEmail\":\"phil.bate@lightfoot.co.uk\",\n\t\"journeys\":[\n    {\n      \"journeyCost\" : 10.55,\n      \"VRM\": \"string\",\n      \"startTime\": \"2019-01-25 06:40:58\",\n      \"endTime\" : \"string\",\n      \"startAddress\": \"string\",\n      \"endAddress\": \"string\",\n      \"journeyDuration\": 1236,\n      \"journeyDistance\": \"11.7\",\n      \"journeyType\": \"business\"\n    },\n    {\n      \"journeyCost\" : 10.55,\n      \"VRM\": \"string\",\n      \"startTime\": \"2019-01-25 06:40:58\",\n      \"endTime\" : \"string\",\n      \"startAddress\": \"string\",\n      \"endAddress\": \"string\",\n      \"journeyDuration\": 1236,\n      \"journeyDistance\": \"11.7\",\n      \"journeyType\": \"business\"\n    }\n  ]\n}"},"url":"{{url}}/v1/driver/expenseReport"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 09 May 2019 11:24:48 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"56"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Successfully sent expense report.\"\n    }\n}"}],"_postman_id":"e336532d-83e2-405f-b84c-015e373431bb"},{"name":"/driver/journeyType","id":"73635718-34eb-4151-b62e-2e31d307d24b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\":155058410,\n\t\"journeyType\":\"personal\"\n}"},"url":"{{url}}/v1/driver/journeyType","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Set a journey's type to <code>personal</code> or <code>business</code>.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires permission to edit labels (AuthMiddleware::KEY_EDIT_LABELS). If not permitted, returns 403 with an error message.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/journeyType</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>403 Forbidden</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyID</code></td>\n<td>integer</td>\n<td>The journey to update.</td>\n</tr>\n<tr>\n<td><code>journeyType</code></td>\n<td>string</td>\n<td>Must be <code>personal</code> or <code>business</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<p>Not applicable.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns the result of <code>JourneyHelper-&gt;updateJourneyType(...)</code>. Shape depends on helper; commonly includes the updated journey or a status.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyID</code></td>\n<td>integer</td>\n<td>Updated journey ID</td>\n</tr>\n<tr>\n<td><code>journeyType</code></td>\n<td>string</td>\n<td>New type: \"business\" or \"personal\"</td>\n</tr>\n<tr>\n<td><code>updatedBy</code></td>\n<td>integer</td>\n<td>User ID who performed the change</td>\n</tr>\n<tr>\n<td><code>updatedAt</code></td>\n<td>string (ISO 8601)</td>\n<td>Timestamp of the update</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"journeyID\": 12345, \"journeyType\": \"business\", \"updatedBy\": 42, \"updatedAt\": \"2025-09-09T12:34:56Z\" }\n</code></pre>\n<h3 id=\"example-error-no-permission\">Example Error (no permission)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 403,\n    \"message\": \"You don't have permission to change the journey type\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Type updated</td>\n<td>Valid input and permission</td>\n<td>Refresh UI</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>403</td>\n<td>Forbidden</td>\n<td>No permission</td>\n<td>User lacks KEY_EDIT_LABELS</td>\n<td>Request permission</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","journeyType"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"047c622e-0bde-4029-8bfd-7efdd3e88333","name":"/driver/journeyType","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\":155058410,\n\t\"journeyType\":\"personal\"\n}"},"url":"{{url}}/v1/driver/journeyType"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Successfully updated Journey type.\"\n    }\n}"}],"_postman_id":"73635718-34eb-4151-b62e-2e31d307d24b"},{"name":"/driver/joinLeague","id":"188abdcf-7e74-4ccd-a69b-30bf89ab4e8a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":4651\n}"},"url":"{{url}}/v1/driver/joinLeague","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Join a league or a grouped league on behalf of the user's drivers.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires one of: <code>leagueID</code> or <code>groupID</code> (validated with Respect <code>oneOf</code>).</li>\n<li>Uses <code>LeagueHelper-&gt;joinLeague(driverIDs, leagueIDOrGroupID)</code>; will raise a 400 if the league is private and the user has no invitation.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/joinLeague</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League ID to join (if not sending <code>groupID</code>).</td>\n</tr>\n<tr>\n<td><code>groupID</code></td>\n<td>integer</td>\n<td>Group ID inside a public grouped league (if not sending <code>leagueID</code>).</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns DB result for the join operation (e.g., confirmation object).</li>\n</ul>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"leagueID\": 101, \"status\": \"joined\" }\n</code></pre>\n<h3 id=\"example-error-private-league\">Example Error (private league)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": {\n      \"error\": \"Can not join a private league for which you've not had an invitation.\",\n      \"leagueID\": 4651\n    }\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Joined</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Cannot join private league without invite / validation error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","joinLeague"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"91914b9b-1c74-433d-abfb-a88c2bca1cc2","name":"/driver/joinLeague","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":4651\n}"},"url":"{{url}}/v1/driver/joinLeague"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 09 May 2019 09:17:56 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"groupUserID\": 12,\n        \"groupID\": 4651,\n        \"userID\": 39731,\n        \"emailSetting\": 0,\n        \"inviteStatus\": 1,\n        \"inLeagueFrom\": 201919,\n        \"inLeagueTo\": null,\n        \"added\": \"2019-05-09 09:16:11\",\n        \"addedBy\": \"10972\",\n        \"lastUpdate\": \"2019-05-09 09:17:56\",\n        \"updatedBy\": \"\",\n        \"isDeleted\": 0\n    }\n}"}],"_postman_id":"188abdcf-7e74-4ccd-a69b-30bf89ab4e8a"},{"name":"/driver/inviteLeague","id":"0be68459-2b86-400c-87e8-948c6254b2d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userEmail\": \"phil-bate@hotmail.co.uk\",\n\t\"leagueID\": 5593\n}"},"url":"{{url}}/v1/driver/inviteLeague","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Invite a driver (by email) to join a league where the current user is an admin.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>userEmail</code> (ASCII) and <code>leagueID</code> (int).</li>\n<li>Verifies that the current user is an admin for the league via <code>sp_api_leagues_adminCheck</code>; if not, returns 401 with <code>You are not an admin.</code></li>\n<li>Validates the invitee's eligibility; may return 400 if the driver is already invited or not eligible.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/inviteLeague</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userEmail</code></td>\n<td>string (ASCII)</td>\n<td>Email of the driver to invite.</td>\n</tr>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League identifier.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>On success, returns the DB result from <code>sp_api_leagues_invite</code> (an object describing the invitation created).</li>\n</ul>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"leagueID\": 101, \"invitedDriverID\": 555, \"status\": \"invited\" }\n</code></pre>\n<h3 id=\"example-error-responses\">Example Error Responses</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"All of the required rules must pass for { leagueID: demoString }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Invitation created</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Eligibility error (already invited/not a driver)</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not an admin</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","inviteLeague"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"d0797e6d-d629-453f-95d4-b007084efe0a","name":"/driver/league","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userID\":1234,\n\t\"groupID\":1\n}"},"url":"192.168.33.10/v1/driver/league"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 14 Feb 2019 14:17:59 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"226"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"groupUserID\": 296765,\n        \"groupID\": 1,\n        \"userID\": 29117,\n        \"emailSetting\": 0,\n        \"inviteStatus\": 1,\n        \"inLeagueFrom\": 201907,\n        \"inLeagueTo\": null,\n        \"added\": \"2019-02-14 14:18:56\",\n        \"addedBy\": \"1234\",\n        \"lastUpdate\": null,\n        \"updatedBy\": \"\",\n        \"isDeleted\": 0\n    }\n}"}],"_postman_id":"0be68459-2b86-400c-87e8-948c6254b2d9"},{"name":"/driver/leaveLeague","id":"66b3dbf9-d7a5-4c96-89b8-421bee612f42","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":\"league\"\n}"},"url":"{{url}}/v1/driver/leaveLeague","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Leave a league on behalf of the user's drivers.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>leagueID</code>.</li>\n<li>Calls <code>LeagueHelper-&gt;leaveLeague(leagueID, driverIDs, userID)</code> and returns DB result.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/leaveLeague</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League ID to leave.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<ul>\n<li>None</li>\n</ul>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"leagueID\": 101, \"status\": \"left\" }\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": \"No data found\"\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 500,\n    \"message\": \"leagueID must be an integer number\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Left league</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","leaveLeague"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"19e7f5f7-689f-4a1a-8dfb-582b88219799","name":"/driver/leaveLeague","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":4651\n}"},"url":"{{url}}/v1/driver/leaveLeague"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 09 May 2019 09:20:58 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Sucessfully Updated.\"\n    }\n}"}],"_postman_id":"66b3dbf9-d7a5-4c96-89b8-421bee612f42"},{"name":"/driver/league","id":"632f3704-99cd-4f5f-9ba9-51dc4a7bdf06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"groupName\": \"mike test drivers\"\n}"},"url":"{{url}}/v1/driver/league","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Create a new league (group) for consumer fleets (where applicable).</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Validates optional <code>groupName</code> (ASCII). When present and the user is a consumer driver (fleet type), creates a new private league for the driver via <code>LeagueHelper-&gt;createLeague(userID, groupName, driverID)</code>.</li>\n<li>If the user context does not match consumer fleet criteria, returns default <code>['No league created']</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/league</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>groupName</code></td>\n<td>string (ASCII)</td>\n<td>Name of the league/group to create.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"leagueID\": 12345, \"leagueName\": \"My Private League\", \"status\": \"created\" }\n</code></pre>\n<h3 id=\"example-response-no-creation\">Example Response (no creation)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    \"No league created\"\n  ]\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\"&lt;error details&gt;\"]\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>League created or message returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","league"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"c96f7e96-2805-4f5f-b256-f484dade7933","name":"/driver/league","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userID\":1234,\n\t\"groupID\":1\n}"},"url":"192.168.33.10/v1/driver/league"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 14 Feb 2019 14:17:59 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"226"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"groupUserID\": 296765,\n        \"groupID\": 1,\n        \"userID\": 29117,\n        \"emailSetting\": 0,\n        \"inviteStatus\": 1,\n        \"inLeagueFrom\": 201907,\n        \"inLeagueTo\": null,\n        \"added\": \"2019-02-14 14:18:56\",\n        \"addedBy\": \"1234\",\n        \"lastUpdate\": null,\n        \"updatedBy\": \"\",\n        \"isDeleted\": 0\n    }\n}"},{"id":"caa156c0-2a78-404e-805f-3232e75033f7","name":"/driver/league","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"groupName\":\"Daves drivers\"\n}"},"url":"{{url}}/v1/driver/league"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 21 Nov 2019 11:59:35 GMT"},{"key":"Server","value":"Apache/2.4.39 (Unix)"},{"key":"X-Powered-By","value":"PHP/7.3.11"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"groupUserID\": 510414,\n        \"groupID\": 7692,\n        \"userID\": 7847,\n        \"emailSetting\": 0,\n        \"inviteStatus\": 1,\n        \"inLeagueFrom\": 201947,\n        \"inLeagueTo\": null,\n        \"added\": \"2019-11-21 11:59:36\",\n        \"addedBy\": \"1\",\n        \"lastUpdate\": null,\n        \"updatedBy\": \"\",\n        \"isDeleted\": 0\n    }\n}"}],"_postman_id":"632f3704-99cd-4f5f-9ba9-51dc4a7bdf06"},{"name":"/driver/prizeClaim","id":"6ea614cf-6b91-4aff-b801-97320ba9b6c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"prizeID\":\"1\",\n\t\"name\":\"Champion Phil\",\n\t\"phoneNumber\":\"01803123123\",\n\t\"email\":\"phil@mail.com\",\n\t\"country\":\"gb\",\n\t\"address1\":\"15 road\",\n\t\"address2\":\"\",\n\t\"city\":\"exeter\",\n\t\"county\":\"\",\n\t\"postcode\":\"TQ1 3QB\"\n}"},"url":"{{url}}/v1/driver/prizeClaim","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Claim a prize for a lottery or competition. Accepts either a lottery claim (requires <code>lotteryID</code> and <code>email</code>) or a competition prize claim (requires <code>prizeID</code> and address/contact details). Validates postcodes by country.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Exactly one of <code>lotteryID</code> or <code>prizeID</code> must be provided (validated with oneOf).</li>\n<li>For lottery claim:<ul>\n<li>Requires <code>email</code> (valid email).</li>\n</ul>\n</li>\n<li>For prize claim:<ul>\n<li>Requires fields: <code>name</code>, <code>email</code>, <code>country</code> (ISO code), <code>address1</code>, <code>city</code>, <code>postcode</code> (validated based on country), optional <code>phoneNumber</code>, <code>address2</code>, <code>county</code>.</li>\n</ul>\n</li>\n<li>On certain failures, the route throws a SlimException with a 400 status and a message (e.g., invalid postcode, user error from DB, etc.).</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/prizeClaim</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body-when-sending-lotteryid\">Required (Body) when sending <code>lotteryID</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>lotteryID</code></td>\n<td>integer</td>\n<td>Lottery ID.</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string (email)</td>\n<td>Contact email for claim.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"required-body-when-sending-prizeid\">Required (Body) when sending <code>prizeID</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>prizeID</code></td>\n<td>integer</td>\n<td>Prize competition ID.</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Recipient name.</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string (email)</td>\n<td>Contact email.</td>\n</tr>\n<tr>\n<td><code>country</code></td>\n<td>string (ISO country code)</td>\n<td>Country for address and postcode validation.</td>\n</tr>\n<tr>\n<td><code>address1</code></td>\n<td>string</td>\n<td>Address line 1.</td>\n</tr>\n<tr>\n<td><code>city</code></td>\n<td>string</td>\n<td>City.</td>\n</tr>\n<tr>\n<td><code>postcode</code></td>\n<td>string</td>\n<td>Postcode; validation depends on <code>country</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body-with-prizeid\">Optional (Body) with <code>prizeID</code></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>phoneNumber</code></td>\n<td>string</td>\n<td>Phone number (validated if provided).</td>\n</tr>\n<tr>\n<td><code>address2</code></td>\n<td>string</td>\n<td>Address line 2.</td>\n</tr>\n<tr>\n<td><code>county</code></td>\n<td>string</td>\n<td>County/Region.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>On success, returns the result of updating winner details in the DB. Shape varies but includes identifiers and status.</li>\n</ul>\n<h3 id=\"fields-representative\">Fields (representative)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.prizeCompetitionID</code></td>\n<td>integer</td>\n<td>Prize or lottery identifier associated to the claim</td>\n</tr>\n<tr>\n<td><code>data.userID</code></td>\n<td>integer</td>\n<td>User identifier</td>\n</tr>\n<tr>\n<td><code>data.addressID</code></td>\n<td>integer</td>\n<td>Address identifier when address was created (prize claim path)</td>\n</tr>\n<tr>\n<td><code>data.status</code></td>\n<td>string</td>\n<td>Status text indicating claim recorded/updated</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response-lottery-claim\">Example Response (lottery claim)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"prizeCompetitionID\": 6601,\n    \"userID\": 42,\n    \"status\": \"claim-recorded\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-invalid-postcode\">Example Error (invalid postcode)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Invalid Postcode\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Claim recorded</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed or business rule error</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","prizeClaim"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"d9d1733c-7d53-4b76-8b14-15d56352e531","name":"/driver/prizeClaim","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"prizeID\":\"1\",\n\t\"name\":\"Champion Phil\",\n\t\"phoneNumber\":\"01803123123\",\n\t\"email\":\"phil@mail.com\",\n\t\"country\":\"gb\",\n\t\"address1\":\"15 road\",\n\t\"address2\":\"\",\n\t\"city\":\"exeter\",\n\t\"county\":\"\",\n\t\"postcode\":\"TQ1 3QB\"\n}"},"url":"{{url}}/v1/driver/prizeClaim"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 09 May 2019 15:52:50 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"42"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"Result\": \"Sucessfully Updated.\"\n    }\n}"}],"_postman_id":"6ea614cf-6b91-4aff-b801-97320ba9b6c6"},{"name":"/driver/profile","id":"37322843-c8b4-4150-8cf0-65f2a099679a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"Dave\",\n\t\"lastName\": \"Mustain\",\n\t\"email\":\"Dave.mustain@metal.com\",\n\t\"DOB\":\"1962-09-13\",\n\t\"gender\":\"Male\",\n\t\"username\":\"MegaMustain\",\n\t\"userTimezone\":\"bst\",\n\t\"speedUnits\":\"mph\",\n\t\"primaryLeague\":18\n}"},"url":"{{url}}/v1/driver/profile","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Updates user profile fields. Currently a placeholder that sends a static parameter set to AccountHelper-&gt;updateUserDetails.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>The route sends a predefined set of keys (with mostly nulls) to updateUserDetails and returns the result. Expect future specification updates.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/profile</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<p>Not specified. Current implementation ignores request body and uses a static parameter array.</p>\n<h3 id=\"optional\">Optional</h3>\n<p>Not specified.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"message\": \"Profile updated\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 500,\n    \"message\": \"&lt;internal error details&gt;\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Profile updated</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","profile"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"58c9e401-6c58-4d55-9dcb-8bc0c4dd1f77","name":"/driver/competition","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"competitionID\":3630\n}"},"url":"192.168.33.10/v1/driver/competition"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 14 Feb 2019 11:59:46 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"1053"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"prizeCompetitionID\": 3630,\n        \"name\": \"Anker Bluetooth Portable Mini Speaker\",\n        \"description\": \"Small, compact and powerful: Super-portable Bluetooth speaker delivers powerful sound and robust bass through an advanced 5W driver and passive subwoofer. \\n\\nUnstoppable Music: Micro SD support, AUX capability provide endless audio options. Extensive Connectivity: Utilizes Bluetooth 4.0 technology for seamless device linking and a 66ft connection range. \\n\\nExtended Playtime: Anker battery technology supplies 15 hours of continuous playtime on a single charge; more than double that of comparable speakers.\",\n        \"imageURL\": \"https://lf-competition-images.s3.eu-west-1.amazonaws.com/small-anker-speaker-mc-1549030759.png\",\n        \"startDate\": \"2019-02-11\",\n        \"endDate\": \"2019-02-17\",\n        \"fleetLevelID\": 8,\n        \"competitionType\": \"opt-in\",\n        \"value\": null,\n        \"prizeReference\": null,\n        \"dispatchType\": null,\n        \"added\": \"2019-02-01 14:17:59\",\n        \"addedBy\": \"competitions\",\n        \"lastUpdate\": \"2019-02-01 14:19:32\",\n        \"updatedBy\": \"\",\n        \"maxEntries\": 0,\n        \"winnersName\": null,\n        \"winnerUserID\": null,\n        \"isLive\": 1,\n        \"isDeleted\": 0\n    }\n}"}],"_postman_id":"37322843-c8b4-4150-8cf0-65f2a099679a"},{"name":"/driver/vehiclecheck","id":"af6a7f43-57fc-499c-85d9-45e2196c6806","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{url}}/v1/driver/vehiclecheck","description":"<h1 id=\"endpoint-summary\">Endpoint Summary</h1>\n<p>This section documents the <strong>Vehicle Check APIs</strong>. These endpoints support driver vehicle checks, retrieving vehicle check status, questions, and saving check answers (with optional attachments).</p>\n<hr />\n<h2 id=\"post-vehiclecheck\">POST <code>/vehiclecheck</code></h2>\n<p><strong>Purpose:</strong> Saves driver’s fleet check answers, including optional attachments.</p>\n<h3 id=\"endpoint-notes\">Endpoint Notes</h3>\n<ul>\n<li><p>Accepts answers either as JSON (in <code>data</code> param) or as form-data.</p>\n</li>\n<li><p>Supports file uploads via multipart/form-data under <code>attachments</code>.</p>\n</li>\n<li><p>Uses <code>VehicleCheckHelper::saveDriverVehicleCheck()</code> to persist answers.</p>\n</li>\n<li><p>After saving, attachments are linked to the created <code>answerID</code>.</p>\n</li>\n</ul>\n<h3 id=\"http-info\">HTTP Info</h3>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/vehiclecheck</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>500 Internal Server Error</code></p>\n<h3 id=\"request-fields\">Request Fields</h3>\n<h4 id=\"required\">Required</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>vehicleCheckID</code></td>\n<td>integer</td>\n<td>ID of the vehicle check.</td>\n</tr>\n<tr>\n<td><code>vehicleID</code></td>\n<td>integer</td>\n<td>ID of the vehicle.</td>\n</tr>\n<tr>\n<td><code>isAdvisory</code></td>\n<td>boolean</td>\n<td>Whether the answer is advisory.</td>\n</tr>\n<tr>\n<td><code>advisoryText</code></td>\n<td>string</td>\n<td>Advisory details (ASCII).</td>\n</tr>\n<tr>\n<td><code>isFault</code></td>\n<td>boolean</td>\n<td>Whether the answer indicates a fault.</td>\n</tr>\n<tr>\n<td><code>faultText</code></td>\n<td>string</td>\n<td>Fault details (ASCII).</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"optional\">Optional</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>odoReading</code></td>\n<td>float</td>\n<td>Vehicle odometer reading.</td>\n</tr>\n<tr>\n<td><code>answerDuration</code></td>\n<td>float</td>\n<td>Time taken to answer the check.</td>\n</tr>\n<tr>\n<td><code>attachments</code></td>\n<td>array</td>\n<td>JSON array of attachment descriptions.</td>\n</tr>\n<tr>\n<td><code>attachments[].description</code></td>\n<td>string</td>\n<td>Text description of the uploaded attachment.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response\">Response</h3>\n<h4 id=\"fields\">Fields</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Outcome (<code>success</code>, <code>error</code>).</td>\n</tr>\n<tr>\n<td><code>data</code></td>\n<td>object</td>\n<td>Contains saved answer details, including <code>answerID</code> and optionally <code>attachments</code>.</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Error message if unsuccessful.</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"example-responses\">Example Responses</h4>\n<p><strong>Success (200)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": {\n        \"answerID\": 2136527,\n        \"vehicleCheckID\": 1,\n        \"vehicleID\": 123,\n        \"driverID\": 39719,\n        \"checkDate\": \"2020-02-27 14:02:49\",\n        \"isAdvisory\": 1,\n        \"advisoryText\": \"cracked lense\",\n        \"isFault\": 0,\n        \"faultText\": \"\",\n        \"note\": null,\n        \"missedCheck\": null,\n        \"lastUpdate\": null,\n        \"isDismissed\": 0,\n        \"updatedBy\": null,\n        \"odoReading\": \"12312.7\",\n        \"answerDuration\": 33\n    }\n}\n\n</code></pre>\n<p><strong>Error (400 — Missing Data)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"error\",\n  \"data\": [\"Data Missing, {\"vehicleID\": \"Required\"}\"],\n  \"message\": \"Validation failed\"\n}\n\n</code></pre>\n<p><strong>Error (500 — Internal Error)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"error\",\n  \"data\": {\n    \"message\": \"Database connection failed\",\n    \"code\": 5001\n  },\n  \"message\": \"Error saving vehicle check\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td><code>OK</code></td>\n<td>Request successful</td>\n<td>Valid parameters and fleet check saved/retrieved</td>\n<td>Continue workflow</td>\n</tr>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>Invalid request</td>\n<td>Missing/invalid VRM, vehicle ID, or check fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Missing/invalid authentication/session</td>\n<td>Re-authenticate</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>User does not have permission</td>\n<td>Verify permissions</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>Fleet check ID not found</td>\n<td>Check identifiers</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server encountered an unexpected error</td>\n<td>Repository/database failure</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service temporarily unavailable</td>\n<td>Maintenance or overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","vehiclecheck"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"f2485f94-4ef4-42d6-8851-d1434517b446","name":"/driver/vehiclecheck","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"vehicleCheckID\":1,\n\t\"vehicleID\": 123,\n\t\"userID\": 123,\n\t\"isAdvisory\":1,\n\t\"advisoryText\" : \"cracked lense\",\n\t\"isFault\": 0,\n\t\"faultText\": \"\",\n\t\"odoReading\":\"12312.7\",\n\t\"answerDuration\": 33\n}"},"url":"{{url}}/v1/driver/vehiclecheck"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 27 Feb 2020 14:02:47 GMT"},{"key":"Server","value":"Apache/2.4.39 (Unix)"},{"key":"X-Powered-By","value":"PHP/7.3.11"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"answerID\": 2136527,\n        \"vehicleCheckID\": 1,\n        \"vehicleID\": 123,\n        \"driverID\": 39719,\n        \"checkDate\": \"2020-02-27 14:02:49\",\n        \"isAdvisory\": 1,\n        \"advisoryText\": \"cracked lense\",\n        \"isFault\": 0,\n        \"faultText\": \"\",\n        \"note\": null,\n        \"missedCheck\": null,\n        \"lastUpdate\": null,\n        \"isDismissed\": 0,\n        \"updatedBy\": null,\n        \"odoReading\": \"12312.7\",\n        \"answerDuration\": 33\n    }\n}"}],"_postman_id":"af6a7f43-57fc-499c-85d9-45e2196c6806"},{"name":"/driver/journeyNote","id":"c5688061-4a65-4b75-81a1-7a3ac6b90720","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\": 123456789,\n\t\"note\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit.\"\n}"},"url":"{{url}}/v1/driver/journeyNote","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Create a note for a specific journey.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<p>None.</p>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/journeyNote</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyID</code></td>\n<td>integer</td>\n<td>Journey id to attach the note to.</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Note content.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<p>Not applicable.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns a success message on creation.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Operation result message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"message\": \"Journey note added successfully.\" }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Validation failed: note is required\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Note created</td>\n<td>Valid input</td>\n<td>Inform user</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","journeyNote"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"cad184ec-3d1e-4444-9688-24f5b70a36c6","name":"/driver/journeyNote","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\": 12345978,\n\t\"note\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit.\"\n}"},"url":{"raw":"{{url}}/v1/driver/journeyNote","host":["{{url}}"],"path":["v1","driver","journeyNote"],"query":[{"key":"journeyID","value":null,"type":"text","disabled":true},{"key":"note","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Note added successfully\"\n    }\n}"}],"_postman_id":"c5688061-4a65-4b75-81a1-7a3ac6b90720"},{"name":"/driver/journeyNotes","id":"e860998b-3466-4e46-908c-8f745432e1ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"journeys\": [\n        {\n            \"journeyID\": 123456789,\n            \"note\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit.\"\n        },\n        {\n            \"journeyID\": 789456123,\n            \"note\": \"Duis aute irure dolor in reprehenderit in voluptate velit esse.\"\n        }\n    ]\n}"},"url":"{{url}}/v1/driver/journeyNotes","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Create or update notes for an array of journeys.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>For each journey in <code>journeys</code>, creates a note if none exists; otherwise updates the existing note.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/journeyNotes</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeys</code></td>\n<td>array of objects</td>\n<td>Each object must include <code>journeyID</code> (int) and typically <code>note</code> (string).</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<p>Not applicable.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns a success message after processing all journey notes.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Operation result message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"message\": \"Journey notes added successfully.\" }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Validation failed: journeys is required\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Notes processed</td>\n<td>Valid input</td>\n<td>Inform user</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid journeys array</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","journeyNotes"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"6738af76-8bff-41ac-b2b9-bdc7a038d2cf","name":"/driver/journeyNotes","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"journeys\": [\n        {\n            \"journeyID\": 123456789,\n            \"note\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit.\"\n        },\n        {\n            \"journeyID\": 789456123,\n            \"note\": \"Duis aute irure dolor in reprehenderit in voluptate velit esse.\"\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/v1/driver/journeyNotes","host":["{{url}}"],"path":["v1","driver","journeyNotes"],"query":[{"key":"journeyID","value":null,"type":"text","disabled":true},{"key":"note","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Journey notes added successfully.\"\n    }\n}"}],"_postman_id":"e860998b-3466-4e46-908c-8f745432e1ce"},{"name":"/driver/downloadVehicleChargeExpenses","id":"90a1693f-293b-491f-b7ac-6f080edb4650","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"chargeIDs\": [4037,4038,4042,4043,4045,4046],\n\t\"reportType\": \"pdf\",\n    \"chargeLocationTypeOverride\": [\n        {\n            \"chargeLocationTypeID\": 2,\n            \"rate\":0.75\n        }\n    ]\n}"},"url":"{{url}}/v1/driver/downloadVehicleChargeExpenses","description":"<h2 id=\"post-downloadvehiclechargeexpenses\">POST /downloadVehicleChargeExpenses</h2>\n<p><strong>Purpose:</strong> Download vehicle charge expenses in PDF or CSV format.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>userID</code> from request context.</li>\n<li>Fields: <code>chargeIds</code> (array), <code>reportType</code> ('pdf'|'csv'), optional <code>chargeLocationTypeOverride</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> POST\n<strong>URL:</strong> /downloadVehicleChargeExpenses\n<strong>Status Codes:</strong> 200 OK, 400 Bad Request, 500 Internal Server Error</p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>chargeIds</code></td>\n<td>array</td>\n<td>Array of charge IDs to include in report</td>\n</tr>\n<tr>\n<td><code>reportType</code></td>\n<td>string</td>\n<td>Report format: 'pdf' or 'csv'</td>\n</tr>\n<tr>\n<td><code>chargeIds[]</code></td>\n<td>int</td>\n<td>Individual charge ID</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>chargeLocationTypeOverride</code></td>\n<td>array</td>\n<td>Optional location type overrides</td>\n</tr>\n<tr>\n<td><code>chargeLocationTypeOverride[]</code></td>\n<td>int</td>\n<td>Individual location type ID override</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Include</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"entity-aliases\">Entity Aliases</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Alias</th>\n<th>Entity Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<p>Returns download URL of generated report.</p>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>reportUrl</code></td>\n<td>string</td>\n<td>URL to download the report</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<p><strong>Success:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"reportUrl\": \"https://example.com/expense_report_2025-09-08.pdf\"\n}\n</code></pre>\n<p><strong>Error:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": 400,\n  \"data\": [\"reportType must be 'pdf' or 'csv'\"]\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>Malformed request</td>\n<td>Invalid array or reportType</td>\n<td>Check input parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Invalid token</td>\n<td>Refresh credentials</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>Insufficient permissions</td>\n<td>Check user roles</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>Charge IDs not found</td>\n<td>Verify IDs</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server error</td>\n<td>Unexpected condition</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service unavailable</td>\n<td>Maintenance/server overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","downloadVehicleChargeExpenses"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"200509d5-5454-475e-9bf6-48ca9058b90e","name":"/driver/downloadVehicleChargeExpenses","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"chargeIDs\": [6056,6058,6071],\n\t\"reportType\": \"pdf\",\n    \"chargeLocationTypeOverride\": [\n        {\n            \"chargeLocationTypeID\": 2,\n            \"rate\":0.75\n        }\n    ]\n}"},"url":{"raw":"{{url}}/v1/driver/downloadVehicleChargeExpenses","host":["{{url}}"],"path":["v1","driver","downloadVehicleChargeExpenses"],"query":[{"key":"journeyID","type":"text","value":"","disabled":true},{"key":"note","type":"text","value":"","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 17 Nov 2021 16:41:50 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.51 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"EV Expense report downloaded successfully.\",\n        \"reportUrl\": \"https://lf-ev-charge-expenses.s3.eu-west-1.amazonaws.com/Demo%20Driver52%20EV%20Charge%20Expense%20report%20-%20Lightfoot%20-%206th%20NovembuMat7k.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Security-Token=FwoGZXIvYXdzEAIaDIfplRfwC8Ybh1TXEyK3AdSBE0RiKqHMzOyWjj%2FhyhneXoPh07NTqk1HE1qQXRO5Xx71HRNuJGKUnzLNIEpJFC%2FElauVvVGje2ljj041etp13vWkXrl16vKWLJ%2FV6WBpg3qUaJs65MimANyITYVGx3anBq3U61g9je1rt9j2snmAxuPPNKkdo8O9FMcvNHBH0xSY5TKODzCAF48M5LWEZmlzLJW1sEbTEiNKVoHKD6O8NmpRm%2FGmM3aIgEVGfTkO4HxaB6yxZyjN4dSMBjIt0RX%2BBwXNRiZA67eXhKCtM3%2FA0T3RPlwhlHBTqIbYpqK%2FuTGuHbyd7nB%2Fgbqn&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4S5LMBI544YXAD4V%2F20211117%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20211117T164150Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=11f89e3cf5acdb2be16629c3e7223c0d5da12e697e88d01641ca6002de35c741\"\n    }\n}"}],"_postman_id":"90a1693f-293b-491f-b7ac-6f080edb4650"},{"name":"/driver/downloadExpenses","id":"c1dc3aad-35a1-452d-840e-02615137d02b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyIDs\": [12345678,23456789],\n\t\"reportType\": \"pdf\"\n}"},"url":"{{url}}/v1/driver/downloadExpenses","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Generate an expense report (PDF or CSV) for selected journeys and return a reference/download payload.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li><p>Uses the <code>CreateExpenseReport</code> use case. <code>reportType</code> must be <code>pdf</code> or <code>csv</code>.</p>\n</li>\n<li><p><code>userID</code> may be passed explicitly; otherwise the authenticated <code>userID</code> attribute is used.</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/downloadExpenses</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyIDs</code></td>\n<td>array of integers</td>\n<td>Journey IDs to include.</td>\n</tr>\n<tr>\n<td><code>reportType</code></td>\n<td>string</td>\n<td><code>pdf</code> or <code>csv</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>userID</code></td>\n<td>integer</td>\n<td>User ID to use for the report; defaults to authenticated user.</td>\n</tr>\n<tr>\n<td><code>odoReading</code></td>\n<td>number (float)</td>\n<td>Ending odometer reading.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns the presenter JSON from <code>CreateExpenseReport</code> use case. This may include a temporary URL, file token, or embedded data (implementation-dependent).</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Operation status (e.g., \"success\")</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Human-readable result message</td>\n</tr>\n<tr>\n<td><code>reportType</code></td>\n<td>string</td>\n<td>Generated report type: \"pdf\" or \"csv\"</td>\n</tr>\n<tr>\n<td><code>downloadUrl</code></td>\n<td>string</td>\n<td>URL to download the generated report (if available)</td>\n</tr>\n<tr>\n<td><code>reportId</code></td>\n<td>string</td>\n<td>Identifier for the generated report (if provided)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"status\": \"success\", \"reportType\": \"pdf\", \"downloadUrl\": \"https://example.com/reports/abc123.pdf\" }\n\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Validation failed: reportType must be pdf or csv\"\n  }\n}\n\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Report generated</td>\n<td>Valid input</td>\n<td>Offer download</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Generation failure</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h1 id=\"appendix-field-and-validation-notes\">Appendix: Field and Validation Notes</h1>\n<ul>\n<li><p>Date fields use format <code>YYYY-MM-DD</code>. For <code>/journeys</code>, times are derived from dates; <code>endDate</code> is set to end-of-day if time omitted.</p>\n</li>\n<li><p>Integer booleans: <code>zeroTrips</code> and <code>unitType</code> are integers but are treated as booleans (<code>0</code> =&gt; false, non-zero =&gt; true).</p>\n</li>\n<li><p>Permissions: Updating journey type requires edit labels permission; lacking this yields 403.</p>\n</li>\n<li><p>Error handling: All endpoints route exceptions through a common Responder service, which returns JSON error bodies with appropriate HTTP codes.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","driver","downloadExpenses"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"3100dc8e-0ae1-46d6-807b-bd17432391af","name":"/driver/downloadExpenses","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyIDs\": [12345678,23456789],\n\t\"reportType\": \"pdf\"\n}"},"url":{"raw":"{{url}}/v1/driver/downloadExpenses","host":["{{url}}"],"path":["v1","driver","downloadExpenses"],"query":[{"key":"journeyID","value":null,"type":"text","disabled":true},{"key":"note","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Expenses report created successfully\",\n        \"reportUrl\": \"https://.s3.eu-west-2.amazonaws.com/Demo%20Driver%20Expense%20report%20-%20Lightfoot%20-%2022nd%20March%202020jO1lqH.pdf\"\n    }\n}"}],"_postman_id":"c1dc3aad-35a1-452d-840e-02615137d02b"},{"name":"/driver/sendExpense","id":"bff4e7cb-9fc6-4306-96a3-487989d0b2cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyIDs\": [12345678,23456789],\n\t\"emails\": [\"demo1@example.com\",\"demo2@example.com\"]\n}"},"url":"{{url}}/v1/driver/sendExpense","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Generate an expense report for selected journeys and email it to specified recipients.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Uses the <code>CreateExpenseReport</code> use case. <code>odoReading</code> is optional and ignored when <code>0</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/sendExpense</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyIDs</code></td>\n<td>array of integers</td>\n<td>Journey IDs to include.</td>\n</tr>\n<tr>\n<td><code>emails</code></td>\n<td>array of strings (email)</td>\n<td>Recipient email addresses.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>odoReading</code></td>\n<td>number (float)</td>\n<td>Ending odometer reading; if <code>0</code> it is ignored.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns the presenter JSON from <code>CreateExpenseReport</code> use case, indicating success and/or identifiers for sent artifacts.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Operation status indicator (e.g., \"success\")</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Human-readable result message</td>\n</tr>\n<tr>\n<td><code>emailRecipients[]</code></td>\n<td>array</td>\n<td>List of recipients the report was emailed to</td>\n</tr>\n<tr>\n<td><code>reportId</code></td>\n<td>string</td>\n<td>Identifier for the generated report (if provided)</td>\n</tr>\n<tr>\n<td><code>attachments[]</code></td>\n<td>array</td>\n<td>Details of attachments sent (if provided)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"status\": \"success\", \"message\": \"Expense report emailed\", \"emailRecipients\": [\"manager@example.com\"] }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Validation failed: emails is required\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Report sent</td>\n<td>Valid input</td>\n<td>Inform user</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Email/send failure</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","sendExpense"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"ffe8954d-fc84-4829-953f-ba121bfb0d6b","name":"/driver/sendExpense","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyIDs\": [12345678,23456789],\n\t\"emails\": [\"demo1@example.com\",\"demo2@example.com\"]\n}"},"url":{"raw":"{{url}}/v1/driver/sendExpense","host":["{{url}}"],"path":["v1","driver","sendExpense"],"query":[{"key":"journeyID","value":null,"type":"text","disabled":true},{"key":"note","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Report email sent successfully\"\n    }\n}"}],"_postman_id":"bff4e7cb-9fc6-4306-96a3-487989d0b2cc"},{"name":"/driver/sendVehicleChargeExpense","id":"aa0c98fd-a91a-4a06-81dc-31446a4c75ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"journeyIDs\": [56734],\n\t\"chargeIDs\": [4037,4038,4042,4043,4045,4046],\n\t\"emails\": [\"demo.driver@lightfoot.co.uk\"],\n    \"chargeLocationTypeOverride\": [\n        {\n            \"chargeLocationTypeID\": 2,\n            \"rate\":20\n        }\n    ]\n    \n\n}"},"url":"{{url}}/v1/driver/sendVehicleChargeExpense","description":"<h2 id=\"post-sendvehiclechargeexpense\">POST /sendVehicleChargeExpense</h2>\n<p><strong>Purpose:</strong> Send vehicle charge expenses via email.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>userID</code> from request context.</li>\n<li>Returns 204 No Content on success.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> POST\n<strong>URL:</strong> /sendVehicleChargeExpense\n<strong>Status Codes:</strong> 204 OK, 400 Bad Request, 500 Internal Server Error</p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required\">Required</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>chargeIds</code></td>\n<td>array</td>\n<td>Array of charge IDs to send</td>\n</tr>\n<tr>\n<td><code>emailRecipients</code></td>\n<td>array</td>\n<td>Array of email addresses</td>\n</tr>\n<tr>\n<td><code>chargeIds[]</code></td>\n<td>int</td>\n<td>Individual charge ID</td>\n</tr>\n<tr>\n<td><code>emailRecipients[]</code></td>\n<td>string</td>\n<td>Individual email address</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>chargeLocationTypeOverride</code></td>\n<td>array</td>\n<td>Optional location type overrides</td>\n</tr>\n<tr>\n<td><code>chargeLocationTypeOverride[]</code></td>\n<td>int</td>\n<td>Individual location type ID override</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Include</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"filter-fields\">Filter Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"entity-aliases\">Entity Aliases</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Alias</th>\n<th>Entity Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n<td>Not Applicable</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<p>Returns confirmation of email being sent.</p>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>string</td>\n<td>Status of the operation, e.g., 'success'</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Descriptive message, e.g., 'Expense email sent.'</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<p><strong>Success:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"message\": \"Expense email sent.\"\n}\n</code></pre>\n<p><strong>Error:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": 400,\n  \"data\": [\"chargeIds must be an array\"]\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>Malformed request</td>\n<td>Invalid array or missing parameter</td>\n<td>Check input parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Invalid token</td>\n<td>Refresh credentials</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>Insufficient permissions</td>\n<td>Check user roles</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>Charge IDs not found</td>\n<td>Verify IDs</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server error</td>\n<td>Unexpected condition</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service unavailable</td>\n<td>Maintenance/server overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","sendVehicleChargeExpense"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"dd7814e0-bc3d-40ad-a9a1-79b517d28572","name":"/driver/sendVehicleChargeExpense","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"vehicleChargeIDs\": [12345678,23456789],\n\t\"emails\": [\"demo1@example.com\",\"demo2@example.com\"]\n}"},"url":{"raw":"{{url}}/v1/driver/sendVehicleChargeExpense","host":["{{url}}"],"path":["v1","driver","sendVehicleChargeExpense"],"query":[{"key":"journeyID","type":"text","value":"","disabled":true},{"key":"note","type":"text","value":"","disabled":true}]}},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Thu, 16 Sep 2021 13:25:19 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.48 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"aa0c98fd-a91a-4a06-81dc-31446a4c75ca"},{"name":"/driver/vehicleChargeLocationType","id":"4b422ee1-7bdc-4967-8b12-070eb6bab67d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"vehicleChargeID\": 111,\r\n    \"vehicleChargeLocationTypeID\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/vehicleChargeLocationType","description":"<h2 id=\"post-vehiclechargelocationtype\">POST /vehicleChargeLocationType</h2>\n<p><strong>Purpose:</strong> Update the location type for a specific vehicle charge record.</p>\n<hr />\n<h3 id=\"endpoint-notes\">Endpoint Notes</h3>\n<ul>\n<li>Requires <code>userID</code> from request context.  </li>\n<li>Both fields are required integers.</li>\n</ul>\n<hr />\n<h3 id=\"http-info\">HTTP Info</h3>\n<p><strong>Method:</strong> POST<br /><strong>URL:</strong> <code>/vehicleChargeLocationType</code><br /><strong>Status Codes:</strong> <code>204 No Content</code>, <code>400 Bad Request</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h3 id=\"request-fields\">Request Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>vehicleChargeID</td>\n<td>int</td>\n<td>Yes</td>\n<td>ID of the vehicle charge</td>\n</tr>\n<tr>\n<td>vehicleChargeLocationTypeID</td>\n<td>int</td>\n<td>Yes</td>\n<td>New location type ID</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"response-fields\">Response Fields</h3>\n<p><strong>Success (204 No Content):</strong> No body returned  </p>\n<p><strong>Error (JSON):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": 400,\n  \"data\": [\"vehicleChargeID must be an integer\"]\n}\n</code></pre>\n<hr />\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>The request was malformed</td>\n<td>Missing required parameter, invalid format</td>\n<td>Check input parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Invalid API key / token</td>\n<td>Refresh credentials or provide valid token</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>Insufficient permissions</td>\n<td>Check user roles/permissions</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>ID does not exist</td>\n<td>Verify resource ID</td>\n</tr>\n<tr>\n<td>429</td>\n<td><code>TooManyRequests</code></td>\n<td>Rate limit exceeded</td>\n<td>Too many requests in a short period</td>\n<td>Retry after backoff / respect rate limits</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server encountered an error</td>\n<td>Unexpected server condition</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service temporarily unavailable</td>\n<td>Maintenance or server overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","vehicleChargeLocationType"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"b04ee692-a994-4839-a1a2-9b7c314464c2","name":"/driver/vehicleChargeLocationType","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"vehicleChargeID\": 4565,\r\n    \"vehicleChargeLocationTypeID\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/vehicleChargeLocationType"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Thu, 28 Oct 2021 10:36:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.51 ()"},{"key":"X-Powered-By","value":"PHP/7.3.15"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"4b422ee1-7bdc-4967-8b12-070eb6bab67d"},{"name":"/driver/vehicleOdo","id":"02dcd28b-9e3f-4189-9e5f-8dcdf5b6b325","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"vehicleID\": 111,\r\n    \"odoReading\": 12345,\r\n    \"calibrationTime\": \"2020-01-01 13:45\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/vehicleOdo","description":"<h2 id=\"post-vehicleodo\">POST /vehicleOdo</h2>\n<p><strong>Purpose:</strong> Submit a vehicle odometer reading for one or more drivers.</p>\n<hr />\n<h3 id=\"endpoint-notes\">Endpoint Notes</h3>\n<ul>\n<li>Requires <code>driverIDs</code> attribute from request context.  </li>\n<li>Date fields are in UTC (<code>Y-m-d H:i</code>).  </li>\n<li>Validates <code>vehicleID</code> as integer, <code>odoReading</code> as float, <code>calibrationTime</code> as date.  </li>\n<li>Returns <code>204 No Content</code> on success if everything executes correctly.</li>\n</ul>\n<hr />\n<h3 id=\"http-info\">HTTP Info</h3>\n<p><strong>Method:</strong> POST<br /><strong>URL:</strong> <code>/vehicleOdo</code><br /><strong>Status Codes:</strong> <code>204 No Content</code>, <code>400 Bad Request</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h3 id=\"request-fields\">Request Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Notes</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>vehicleID</td>\n<td>int</td>\n<td>Yes</td>\n<td>Vehicle identifier</td>\n</tr>\n<tr>\n<td>odoReading</td>\n<td>float</td>\n<td>Yes</td>\n<td>Odometer reading in km</td>\n</tr>\n<tr>\n<td>calibrationTime</td>\n<td>string</td>\n<td>Yes</td>\n<td>UTC timestamp (<code>Y-m-d H:i</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"response-fields\">Response Fields</h3>\n<p><strong>Success (204 No Content):</strong> No body returned  </p>\n<p><strong>Error (JSON):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": 400,\n  \"data\": [\"vehicleID must be an integer\", \"odoReading must be a float\"]\n}\n</code></pre>\n<ul>\n<li><code>status</code>: HTTP status code  </li>\n<li><code>data</code>: Array of error messages</li>\n</ul>\n<hr />\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400</td>\n<td><code>BadRequest</code></td>\n<td>The request was malformed</td>\n<td>Missing required parameter, invalid format</td>\n<td>Check input parameters</td>\n</tr>\n<tr>\n<td>401</td>\n<td><code>Unauthorized</code></td>\n<td>Authentication failed</td>\n<td>Invalid API key / token</td>\n<td>Refresh credentials or provide valid token</td>\n</tr>\n<tr>\n<td>403</td>\n<td><code>Forbidden</code></td>\n<td>Access denied</td>\n<td>Insufficient permissions</td>\n<td>Check user roles/permissions</td>\n</tr>\n<tr>\n<td>404</td>\n<td><code>NotFound</code></td>\n<td>Resource not found</td>\n<td>ID does not exist</td>\n<td>Verify resource ID</td>\n</tr>\n<tr>\n<td>429</td>\n<td><code>TooManyRequests</code></td>\n<td>Rate limit exceeded</td>\n<td>Too many requests in a short period</td>\n<td>Retry after backoff / respect rate limits</td>\n</tr>\n<tr>\n<td>500</td>\n<td><code>InternalServerError</code></td>\n<td>Server encountered an error</td>\n<td>Unexpected server condition</td>\n<td>Retry or contact support</td>\n</tr>\n<tr>\n<td>503</td>\n<td><code>ServiceUnavailable</code></td>\n<td>Service temporarily unavailable</td>\n<td>Maintenance or server overload</td>\n<td>Retry later</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","vehicleOdo"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"4ac2edc9-9eec-4fc7-b348-9273af9f30b8","name":"/driver/vehicleOdo","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"vehicleID\": 111,\r\n    \"odoReading\": 12345,\r\n    \"calibrationTime\": \"2020-01-01 13:45\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/vehicleOdo"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Thu, 03 Dec 2020 09:29:35 GMT"},{"key":"Server","value":"Apache/2.4.39 (Unix)"},{"key":"X-Powered-By","value":"PHP/7.3.24"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"02dcd28b-9e3f-4189-9e5f-8dcdf5b6b325"},{"name":"/driver/league","id":"68525dc7-7a5d-4876-acd9-9934565b656c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":\"league\",\n\t\"groupName\": \"Raiding, ploughing, looting League\"\n}"},"url":"{{url}}/v1/driver/league","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Update league settings and metadata.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>leagueID</code>.</li>\n<li>Optional fields include name, descriptions, settings, and flags. Any omitted fields are passed as empty strings to the stored procedure.</li>\n<li>Calls <code>LeagueHelper-&gt;updateLeague(...)</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>PUT</code><br /><strong>URL:</strong> <code>/v1/driver/league</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League identifier to update.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>groupName</code></td>\n<td>string (ASCII)</td>\n<td>New league name.</td>\n</tr>\n<tr>\n<td><code>emailSetting</code></td>\n<td>integer</td>\n<td>League email setting.</td>\n</tr>\n<tr>\n<td><code>adminEmailSetting</code></td>\n<td>integer</td>\n<td>Admin email setting.</td>\n</tr>\n<tr>\n<td><code>groupDescription</code></td>\n<td>string (ASCII)</td>\n<td>Description text.</td>\n</tr>\n<tr>\n<td><code>privacySetting</code></td>\n<td>integer</td>\n<td>Privacy setting (e.g., public/private).</td>\n</tr>\n<tr>\n<td><code>fleetLeague</code></td>\n<td>integer</td>\n<td>Whether this is a fleet league.</td>\n</tr>\n<tr>\n<td><code>imageURL</code></td>\n<td>string (ASCII)</td>\n<td>URL for league image.</td>\n</tr>\n<tr>\n<td><code>sponsoredLeague</code></td>\n<td>integer</td>\n<td>Sponsorship flag.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"Result\": \"Sucessfully Updated.\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"These rules must pass for { \\\"leagueID\\\": \\\"league\\\", \\\"groupName\\\": \\\"Raiding, ploughing, looting League\\\" }\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>League updated</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","league"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"5e08f861-7d6a-44bc-84a2-d2e681435c91","name":"/driver/league","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":4652,\n\t\"groupName\": \"Raiding League\"\n}"},"url":"{{url}}/v1/driver/league"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 08 May 2019 14:16:44 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"Result\": \"Sucessfully Updated.\"\n    }\n}"}],"_postman_id":"68525dc7-7a5d-4876-acd9-9934565b656c"},{"name":"/driver/primaryLeague","id":"076577ca-7d02-489c-bd33-403b75aa332f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\":4018\n}"},"url":"{{url}}/v1/driver/primaryLeague","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Set the user's primary league.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>leagueID</code>. Calls <code>AccountHelper-&gt;updateUserDetails(userID, params)</code>.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>PUT</code><br /><strong>URL:</strong> <code>/v1/driver/primaryLeague</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League identifier to set as primary.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"leagueID\": 101, \"isPrimary\": true }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\"&lt;error details&gt;\"]\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Primary league updated</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","primaryLeague"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"18a6e86b-5ebe-4e1f-b628-ae0dda4071c7","name":"/driver/league","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userID\":1234,\n\t\"groupID\":1\n}"},"url":"192.168.33.10/v1/driver/league"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 14 Feb 2019 14:17:59 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"226"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"groupUserID\": 296765,\n        \"groupID\": 1,\n        \"userID\": 29117,\n        \"emailSetting\": 0,\n        \"inviteStatus\": 1,\n        \"inLeagueFrom\": 201907,\n        \"inLeagueTo\": null,\n        \"added\": \"2019-02-14 14:18:56\",\n        \"addedBy\": \"1234\",\n        \"lastUpdate\": null,\n        \"updatedBy\": \"\",\n        \"isDeleted\": 0\n    }\n}"}],"_postman_id":"076577ca-7d02-489c-bd33-403b75aa332f"},{"name":"/driver/prizeViewed","id":"7d2637fa-69eb-4f70-8dc4-5721ce8ac906","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"lotteryID\":1234\n}"},"url":"{{url}}/v1/driver/prizeViewed","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Mark a lottery result as viewed by the user.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>lotteryID</code>.</li>\n<li>If the user did not enter the lottery, a 400 error is returned with message \"User did not enter this lottery\".</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>PUT</code><br /><strong>URL:</strong> <code>/v1/driver/prizeViewed</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>lotteryID</code></td>\n<td>integer</td>\n<td>Lottery identifier.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns the DB update outcome from CompetitionHelper-&gt;viewLottery(...), typically including an updated timestamp/flags.</li>\n</ul>\n<h3 id=\"fields-representative\">Fields (representative)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.prizeCompetitionEntrantID</code></td>\n<td>integer</td>\n<td>Entrant identifier</td>\n</tr>\n<tr>\n<td><code>data.viewedResult</code></td>\n<td>string (datetime)</td>\n<td>Timestamp when the result was viewed</td>\n</tr>\n<tr>\n<td><code>data.status</code></td>\n<td>string</td>\n<td>Status text (e.g., <code>viewed</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"prizeCompetitionEntrantID\": 98765,\n    \"viewedResult\": \"2025-09-09 12:34:56\",\n    \"status\": \"viewed\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-not-an-entrant\">Example Error (not an entrant)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"User did not enter this lottery\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Marked as viewed</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed or user not an entrant</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","prizeViewed"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"11fdd47f-f4bb-443c-9ae3-ac26492d0ea7","name":"/driver/prizeViewed","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"lotteryID\":1234\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/prizeViewed"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 11 Nov 2019 10:10:00 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.39 ()"},{"key":"X-Powered-By","value":"PHP/7.2.19"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"Result\": \"Sucessfully Updated.\"\n    }\n}"}],"_postman_id":"7d2637fa-69eb-4f70-8dc4-5721ce8ac906"},{"name":"/driver/journeyNote","id":"a9698ffc-fb4f-42c6-9296-22119ef799e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\": 123456789,\n\t\"note\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit.\"\n}"},"url":"{{url}}/v1/driver/journeyNote","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Update the note for a specific journey.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<p>None.</p>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>PUT</code><br /><strong>URL:</strong> <code>/v1/driver/journeyNote</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyID</code></td>\n<td>integer</td>\n<td>Journey id for the note.</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>string</td>\n<td>Updated note content.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<p>Not applicable.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns a success message on update.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Operation result message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"message\": \"Journey note updated successfully.\" }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Validation failed: journeyID is required\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Note updated</td>\n<td>Valid input</td>\n<td>Inform user</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","journeyNote"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"321f8a9a-130f-4eac-9366-d14f655190a8","name":"/driver/journeyNote","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\": 12345978,\n\t\"note\": \"Lorem ipsum dolor sit amet, consectetur adipisicing elit.\"\n}"},"url":{"raw":"{{url}}/v1/driver/journeyNote","host":["{{url}}"],"path":["v1","driver","journeyNote"],"query":[{"key":"journeyID","value":null,"type":"text","disabled":true},{"key":"note","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Note updated successfully\"\n    }\n}"}],"_postman_id":"a9698ffc-fb4f-42c6-9296-22119ef799e9"},{"name":"/driver/league","id":"18581071-f88f-48ad-87e1-e7b8dd5452ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\" : 4651\n}"},"url":"{{url}}/v1/driver/league","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Delete a league (admin-only).</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Requires <code>leagueID</code>. Calls <code>LeagueHelper-&gt;deleteLeague(leagueID, userID)</code>.</li>\n<li>If the user is not an admin, returns 401 with <code>You are not an admin.</code></li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>DELETE</code><br /><strong>URL:</strong> <code>/v1/driver/league</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body-or-query\">Required (Body or Query)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>leagueID</code></td>\n<td>integer</td>\n<td>League ID to delete.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response-success\">Example Response (success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"leagueID\": 101, \"status\": \"deleted\" }\n</code></pre>\n<h3 id=\"example-error-responses\">Example Error Responses</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"error\": \"You are not an admin.\" }\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\"&lt;error details&gt;\"]\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>League deleted</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or runtime error</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not an admin</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","league"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"af15334f-7b0f-4a4f-b706-2c7b469061f6","name":"/driver/league","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"leagueID\" : 4651\n}"},"url":"{{url}}/v1/driver/league"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 09 May 2019 09:23:02 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Group deleted\"\n    }\n}"}],"_postman_id":"18581071-f88f-48ad-87e1-e7b8dd5452ea"},{"name":"/driver/journeyNote","id":"e4d96739-c747-4149-8f9f-0def10181219","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\": 123456789\n}"},"url":"{{url}}/v1/driver/journeyNote","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Soft-delete the note for a specific journey (marks note as deleted).</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Internally sets the note's <code>isDelete</code> flag to true; the note content may be retained for audit.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>DELETE</code><br /><strong>URL:</strong> <code>/v1/driver/journeyNote</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>journeyID</code></td>\n<td>integer</td>\n<td>Journey id whose note should be deleted.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional\">Optional</h3>\n<p>Not applicable.</p>\n<h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns a success message on deletion.</li>\n</ul>\n<h3 id=\"fields\">Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>message</code></td>\n<td>string</td>\n<td>Operation result message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{ \"message\": \"Journey note deleted successfully.\" }\n</code></pre>\n<h3 id=\"example-error\">Example Error</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Validation failed: journeyID is required\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n<th>Possible Causes</th>\n<th>Suggested Handling</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Note deleted</td>\n<td>Valid input</td>\n<td>Inform user</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n<td>Missing/invalid fields</td>\n<td>Correct input</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n<td>Missing/invalid token</td>\n<td>Authenticate</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n<td>Unexpected exception</td>\n<td>Retry or contact support</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","journeyNote"],"host":["{{url}}"],"query":[{"disabled":true,"key":"journeyID","value":""},{"disabled":true,"key":"note","value":""}],"variable":[]}},"response":[{"id":"0c17e7e8-62d7-43da-8732-1e19f52a3bb6","name":"/driver/journeyNote","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"journeyID\": 12345978\n}"},"url":{"raw":"{{url}}/v1/driver/journeyNote","host":["{{url}}"],"path":["v1","driver","journeyNote"],"query":[{"key":"journeyID","value":null,"type":"text","disabled":true},{"key":"note","value":null,"type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 25 Apr 2019 10:04:06 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"Apache/2.4.37 ()"},{"key":"X-Powered-By","value":"PHP/7.2.16"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Upgrade","value":"h2,h2c"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"message\": \"Note deleted successfully\"\n    }\n}"}],"_postman_id":"e4d96739-c747-4149-8f9f-0def10181219"},{"name":"/driver/fleetRegister","id":"f08c47fd-a13e-4c19-b66e-d44a40cdb248","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"firstName\" : \"Test\",\n  \"lastName\" : \"Tester\",\n  \"email\" : \"test.tester@gmail.com\",\n  \"fleetName\" : \"Demo Fleet\"\n}\n","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/fleetRegister","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Validate VRN and device serial, optionally an installation code, and either return a confirmation payload or complete installation and send confirmation emails.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Validates:<ul>\n<li><code>vrn</code> (required, alphanumeric after sanitization),</li>\n<li><code>serialNumber</code> (required, integer),</li>\n<li><code>installationCode</code> (optional string),</li>\n<li><code>confirmation</code> (optional boolean).</li>\n</ul>\n</li>\n<li>VRN is uppercased and stripped of non A-Z/0-9 before lookup.</li>\n<li>If VRN is already in use or serial invalid/in use, returns 400 with appropriate message.</li>\n<li>Without <code>confirmation</code>, returns details for confirmation (vehicle data, and <code>installation</code> if coupon code found), with sensitive vehicle fields removed.</li>\n<li>With <code>confirmation=true</code>, will:<ul>\n<li>create/link driver(s) as needed (lightfoot drivers and/or assigned fleets),</li>\n<li>install and link coupon code and contract line if present,</li>\n<li>send a device registration confirmation email.</li>\n</ul>\n</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/deviceRegister</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>vrn</code></td>\n<td>string</td>\n<td>Vehicle registration (alphanumeric; spaces and symbols removed).</td>\n</tr>\n<tr>\n<td><code>serialNumber</code></td>\n<td>integer</td>\n<td>Hub/Device serial number.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>installationCode</code></td>\n<td>string</td>\n<td>Installation/coupon code if provided externally.</td>\n</tr>\n<tr>\n<td><code>confirmation</code></td>\n<td>boolean</td>\n<td>If true, proceeds to install and send confirmation email; otherwise returns confirmation payload.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"fields-confirmation-required\">Fields (confirmation required)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.vehicle</code></td>\n<td>object</td>\n<td>Vehicle lookup details for confirmation</td>\n</tr>\n<tr>\n<td><code>data.vehicle.VRM</code></td>\n<td>string</td>\n<td>Vehicle registration</td>\n</tr>\n<tr>\n<td><code>data.vehicle.make</code></td>\n<td>string</td>\n<td>Vehicle make</td>\n</tr>\n<tr>\n<td><code>data.vehicle.model</code></td>\n<td>string</td>\n<td>Vehicle model</td>\n</tr>\n<tr>\n<td><code>data.message</code></td>\n<td>string</td>\n<td>\"Confirmation required\"</td>\n</tr>\n<tr>\n<td><code>data.installation</code></td>\n<td>object</td>\n<td>Installation/coupon details when available</td>\n</tr>\n<tr>\n<td><code>data.installation.installationCode</code></td>\n<td>string</td>\n<td>Coupon/installation code</td>\n</tr>\n<tr>\n<td><code>data.installation.message</code></td>\n<td>string</td>\n<td>Message associated with coupon code</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"fields-successful-install\">Fields (successful install)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>data.Success</code></td>\n<td>boolean</td>\n<td>True when installation completed</td>\n</tr>\n<tr>\n<td><code>data.message</code></td>\n<td>string</td>\n<td>Success message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-response-confirmation-required\">Example Response (confirmation required)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"vehicle\": {\n      \"VRM\": \"AB12CDE\",\n      \"make\": \"Ford\",\n      \"model\": \"Focus\"\n    },\n    \"message\": \"Confirmation required\",\n    \"installation\": {\n      \"installationCode\": \"WELCOME123\",\n      \"message\": \"Free install\"\n    }\n  }\n}\n</code></pre>\n<h3 id=\"example-response-successful-install\">Example Response (successful install)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"Success\": true,\n    \"message\": \"Successfully added device.\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-vrn-in-use\">Example Error (VRN in use)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Vehicle Registration in use, please contact support@lightfoot.co.uk\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-invalid-serial\">Example Error (invalid serial)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Serial in use, or not valid.\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Confirmation payload or installation complete</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation/business rule failure</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":true,"source":{"_postman_id":"5592e7aa-86c1-4a46-a77a-30099519427b","id":"5592e7aa-86c1-4a46-a77a-30099519427b","name":"Lightfoot Driver API Documentation","type":"collection"}},"urlObject":{"path":["v1","driver","fleetRegister"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"7d0d9ece-610c-4479-b86d-b17475ded9ed","name":"/driver/fleetRegister","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"firstName\" : \"Test\",\n  \"lastName\" : \"Tester\",\n  \"email\" : \"test.tester@gmail.com\",\n  \"fleetName\" : \"Demo Fleet\"\n}\n","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/fleetRegister"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"f08c47fd-a13e-4c19-b66e-d44a40cdb248"},{"name":"/driver/fleetName","id":"a23ac98f-7348-454f-b377-ef39768950bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n\t\"fleetName\": \"demo\"\r\n}\r\n\t","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/fleetName","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Case-insensitive search for fleet names (and associated form fields) given a partial or full <code>fleetName</code>.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Validates <code>fleetName</code> length &gt;= 3 characters.</li>\n<li>Returns matches from AccountHelper-&gt;getFleetNameWithFormFields.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/fleetName</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fleetName</code></td>\n<td>string</td>\n<td>Fleet name query (3+ characters).</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": [\n    { \"fleetName\": \"Example Fleet\", \"requiresEmployeeId\": true },\n    { \"fleetName\": \"Example Fleet B\", \"requiresEmployeeId\": false }\n  ]\n}\n</code></pre>\n<h3 id=\"example-error-too-short\">Example Error (too short)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Fleet Name should be more than 3 characters\"\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Matches returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation failed</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n","urlObject":{"path":["v1","driver","fleetName"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"4bc6ff83-9964-4798-a065-98ac09bba4dc","name":"/driver/fleetName","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n\t\"fleetName\": \"demo\"\r\n}\r\n\t","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/fleetName"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"data\": [\n        {\n            \"fleetID\": 484,\n            \"fleetName\": \"Demo Fleet\",\n            \"formFields\": \"[{\\\"name\\\": \\\"employeeID\\\", \\\"type\\\": \\\"input\\\", \\\"label\\\": \\\"Employee ID\\\", \\\"required\\\": false, \\\"placeHolder\\\": \\\"Enter Employee ID\\\"}, {\\\"name\\\": \\\"driverCodePin\\\", \\\"type\\\": \\\"input\\\", \\\"label\\\": \\\"Driver ID\\\", \\\"required\\\": false, \\\"placeHolder\\\": \\\"Enter Driver ID Code\\\"}, {\\\"name\\\": \\\"VRM\\\", \\\"type\\\": \\\"input\\\", \\\"label\\\": \\\"Vehicle Registration\\\", \\\"required\\\": false, \\\"placeHolder\\\": \\\"Enter Vehicle Registration\\\"}]\"\n        }\n    ]\n}"}],"_postman_id":"a23ac98f-7348-454f-b377-ef39768950bd"},{"name":"/driver/onboarding","id":"e02b827a-e0ba-4df5-be69-59a27b8f5617","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"firstName\" : \"Demo\",\r\n  \"lastName\" : \"Dev Driver16\",\r\n  \"email\" : \"userdev17@company.com\",\r\n  \"fleetName\" : \"Demo Fleet\",\r\n  \"employeeID\" : \"AB206\",\r\n  \"driverCodePin\": \"1306\",\r\n  \"VRM\": \"AB17ABC\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/onboarding","description":"<h2 id=\"endpoint-summary\">Endpoint Summary</h2>\n<p><strong>Purpose:</strong> Register and/or activate a driver to a fleet in a single onboarding flow. Returns status and context; when fully activated, sends a welcome email.</p>\n<hr />\n<h2 id=\"endpoint-notes\">Endpoint Notes</h2>\n<ul>\n<li>Validates required fields: <code>firstName</code>, <code>lastName</code>, <code>email</code>, <code>fleetName</code>.</li>\n<li>Optional: <code>fleetLevelName</code>, <code>employeeID</code>, <code>driverCodePin</code>, <code>VRM</code>. If <code>STORE_NUMBER</code> is provided alongside <code>employeeID</code>, the combined format is <code>&lt;employeeID&gt;_&lt;storeNumber&gt;</code>.</li>\n<li>Uses clean architecture use case <code>CreateDriverActivation</code>; presenter maps success and duplicate outcomes, and throws for errors.</li>\n<li>On success status <code>activated</code>, sets <code>needsInstallationOrFleet</code> to 0 and triggers welcome email.</li>\n</ul>\n<hr />\n<h2 id=\"http-info\">HTTP Info</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>/v1/driver/onboarding</code><br /><strong>Status Codes:</strong> <code>200 OK</code>, <code>400 Bad Request</code>, <code>401 Unauthorized</code>, <code>500 Internal Server Error</code></p>\n<hr />\n<h2 id=\"request-fields\">Request Fields</h2>\n<h3 id=\"required-body\">Required (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>firstName</code></td>\n<td>string</td>\n<td>First name.</td>\n</tr>\n<tr>\n<td><code>lastName</code></td>\n<td>string</td>\n<td>Last name.</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>string (email)</td>\n<td>Email address.</td>\n</tr>\n<tr>\n<td><code>fleetName</code></td>\n<td>string (ASCII)</td>\n<td>Fleet name.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"optional-body\">Optional (Body)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fleetLevelName</code></td>\n<td>string (ASCII)</td>\n<td>Fleet level name.</td>\n</tr>\n<tr>\n<td><code>employeeID</code></td>\n<td>string (alphanumeric, <code>_</code> allowed)</td>\n<td>Employee identifier.</td>\n</tr>\n<tr>\n<td><code>driverCodePin</code></td>\n<td>string (alphanumeric)</td>\n<td>Driver PIN/code.</td>\n</tr>\n<tr>\n<td><code>VRM</code></td>\n<td>string (alphanumeric)</td>\n<td>Vehicle registration.</td>\n</tr>\n<tr>\n<td><code>STORE_NUMBER</code></td>\n<td>string</td>\n<td>Store number, concatenated with employeeID when present.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"includes\">Includes</h3>\n<p>Not applicable.</p>\n<h3 id=\"filter-fields\">Filter Fields</h3>\n<p>Not applicable.</p>\n<h3 id=\"entity-aliases\">Entity Aliases</h3>\n<p>Not applicable.</p>\n<hr />\n<h2 id=\"response\">Response</h2>\n<h3 id=\"response-notes\">Response Notes</h3>\n<ul>\n<li>Returns <code>{ data: &lt;object&gt; }</code> where the object includes a <code>status</code> (e.g., <code>activated</code>, <code>duplicate</code>), a message, optional <code>code</code>, and contextual data.</li>\n</ul>\n<h3 id=\"example-response-activated\">Example Response (activated)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"data\": {\n    \"status\": \"activated\",\n    \"needsInstallationOrFleet\": 0,\n    \"fleetName\": \"Acme Fleet\",\n    \"message\": \"Activation complete\"\n  }\n}\n</code></pre>\n<h3 id=\"example-error-validation\">Example Error (validation)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": {\n      \"error\": \"First Name is required, Last Name is required, Valid Email Address is required, Fleet Name is required\"\n    }\n  }\n}\n</code></pre>\n<h3 id=\"example-error-context\">Example Error (context)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"error\": {\n    \"status\": 400,\n    \"message\": {\n      \"message\": \"&lt;context error&gt;\",\n      \"code\": 400\n    }\n  }\n}\n</code></pre>\n<h2 id=\"errors--status-codes\">Errors / Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>HTTP Code</th>\n<th>Error Key / Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Onboarding completed or duplicate info returned</td>\n</tr>\n<tr>\n<td>400</td>\n<td>BadRequest</td>\n<td>Validation or context error</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Not authenticated</td>\n</tr>\n<tr>\n<td>500</td>\n<td>InternalServerError</td>\n<td>Server error</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["v1","driver","onboarding"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"a9cfe5a2-f29c-4945-a9b3-9b768c9b3cd1","name":"/driver/onboarding","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"firstName\" : \"Demo\",\r\n  \"lastName\" : \"Dev Driver16\",\r\n  \"email\" : \"userdev17@company.com\",\r\n  \"fleetName\" : \"Demo Fleet\",\r\n  \"employeeID\" : \"AB206\",\r\n  \"driverCodePin\": \"1306\",\r\n  \"VRM\": \"AB17ABC\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/onboarding"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"driverActivationRequestID\": 12345,\n        \"firstName\": \"Demo\",\n        \"lastName\": \"Dev Driver16\",\n        \"email\": \"userdev17@company.com\",\n        \"employeeID\": \"AB206\",\n        \"driverPin\": \"1306\",\n        \"VRM\": \"AB17ABC\",\n        \"fleetName\": \"Demo Fleet\",\n        \"status\": \"activated\",\n        \"needsInstallationOrFleet\": 0\n    }\n}"}],"_postman_id":"e02b827a-e0ba-4df5-be69-59a27b8f5617"},{"name":"/driver/locale","id":"177a3c17-1de1-4854-8e0b-f074e5323c40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"locale\": \"fr\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/locale","description":"<p>Update a users Locale using a 2 alpha country code e.g. en, fr, etc...</p>\n<p>The code used must to a code that is currently supported and will not error if its not.</p>\n<p>This api uses the current logged in users ID to update the locale.</p>\n","urlObject":{"path":["v1","driver","locale"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"df1757d9-4544-4f24-bd4a-658b5b94b95d","name":"/driver/locale","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"locale\": \"en\"\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/v1/driver/locale"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Fri, 29 Aug 2025 13:42:54 GMT"},{"key":"Server","value":"Apache/2.4.38 (Debian)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Language","value":"en"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Access-Control-Allow-Headers","value":"X-Requested-With, Content-Type, Accept, Origin, Authorization"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, PATCH, OPTIONS"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"userId\": 1,\n        \"localeId\": 1,\n        \"localeCode\": \"en\",\n        \"localeDisplayName\": \"English\"\n    }\n}"}],"_postman_id":"177a3c17-1de1-4854-8e0b-f074e5323c40"}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]}},"event":[{"listen":"prerequest","script":{"id":"d4812623-59fc-4076-aa3e-23332cacf830","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e4aae841-812d-4769-a848-e2af97a92743","type":"text/javascript","exec":[""]}}]}