{ "opencollection": "1.0.0", "info": { "name": "When I Work API Documentation Accounts API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Accounts", "type": "folder" }, "items": [ { "info": { "name": "Get Account", "type": "http" }, "http": { "method": "GET", "url": "https://api.wheniwork.com/2/account" }, "docs": "This endpoint returns the first account associated with the current login token. To get information about a different account, set the W-UserId header to the user id associated with the other account. (See the Authentication section for details.)\n > If the account being queried for is a parent account, the response provides an object with two members: an `account` object, which specifies the parent account for a given user, and an array, `accounts`, containing all child accounts of the parent ac" }, { "info": { "name": "Create Account", "type": "http" }, "http": { "method": "POST", "url": "https://api.wheniwork.com/2/account", "body": { "type": "json", "data": "{}" } }, "docs": "Used to create an account" }, { "info": { "name": "Update Account", "type": "http" }, "http": { "method": "PUT", "url": "https://api.wheniwork.com/2/account/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID of the account" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates an account" }, { "info": { "name": "Update Account Settings", "type": "http" }, "http": { "method": "POST", "url": "https://api.wheniwork.com/2/account/settings", "body": { "type": "json", "data": "{}" } }, "docs": "Admins and Managers can update certain account settings using this endpoint." }, { "info": { "name": "List Admins", "type": "http" }, "http": { "method": "GET", "url": "https://api.wheniwork.com/2/account/:id/admins", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID of the account" } ] }, "docs": "List all the admins for the given account" } ] } ], "bundled": true }