{ "opencollection": "1.0.0", "info": { "name": "Optibus Operations Driver Absences Driver Employment Periods API", "version": "2.8.17" }, "items": [ { "info": { "name": "Driver Employment Periods", "type": "folder" }, "items": [ { "info": { "name": "List driver employment periods", "type": "http" }, "http": { "method": "GET", "url": "https://YOUR-OPTIBUS-ACCOUNT.api.ops.optibus.co/v2/drivers/employment-periods", "params": [ { "name": "driverIds", "value": "", "type": "query", "description": "- Comma-separated list of driver IDs to filter for" }, { "name": "fromDate", "value": "", "type": "query", "description": "- Date string formatted as `YYYY-MM-dd`. Only employment periods that end on or after this date are returned." }, { "name": "toDate", "value": "", "type": "query", "description": "- Date string formatted as `YYYY-MM-dd`. Only employment periods that start on or before this date are returned." }, { "name": "page", "value": "", "type": "query", "description": "- 1-indexed integer indicating which page of results to pull" } ], "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "List existing driver employment periods in the system, with optional filtering capability.\n\nNotes:\n- The result is paginated. Check the `pagination` property in the response to see the total number of pages and the current page number.\n- Information about the modelling of date periods for each entry:\n - `startDate` is mandatory\n - `endDate` is optional - if omitted, the employment period will be ongoing indefinitely" }, { "info": { "name": "Create driver employment period", "type": "http" }, "http": { "method": "POST", "url": "https://YOUR-OPTIBUS-ACCOUNT.api.ops.optibus.co/v1/drivers/employment-periods", "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Creates a single driver employment period.\n\nNotes:\n- Behaviour of the `periodId` field:\n - If a `periodId` is specified that already exists, you will receive an error (this endpoint does not support updating existing employment\n periods - use the `PUT /v1/drivers/employment-periods/{periodId}` endpoint instead)\n - If a `periodId` is specified that does not already exist, a new employment period will be created with the specified ID.\n - If a `periodId` is not specified, a new employment per" }, { "info": { "name": "Update driver employment period", "type": "http" }, "http": { "method": "PUT", "url": "https://YOUR-OPTIBUS-ACCOUNT.api.ops.optibus.co/v1/drivers/employment-periods/:periodId", "params": [ { "name": "periodId", "value": "", "type": "path", "description": "- The employment period ID to update" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "Authorization", "value": "{{Authorization}}", "placement": "header" } }, "docs": "Updates a single driver employment period by ID.\n\nNotes:\n- You can only update the `startDate` and `endDate` fields of an employment period, not the `driverId`.\n- If you set `shouldAutoUnassignFromEndDate` to `true`, the system will auto-unassign duties from the day after the `endDate` if\n this is the last employment period chronologically for the driver.\n - If auto-unassignment fails for any of the regions which the driver has work in, a warning will be returned in the response to allow for m" } ] } ], "bundled": true }