{ "opencollection": "1.0.0", "info": { "name": "When I Work API Documentation Accounts Shift Requests API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Shift Requests", "type": "folder" }, "items": [ { "info": { "name": "Gets a collection of all shift requests.", "type": "http" }, "http": { "method": "GET", "url": "https://api.wheniwork.com/2/swaps", "params": [ { "name": "end", "value": "2017-07-21T17:32:28Z", "type": "query", "description": "End time for the shift search window. Must be included if start is defined.\n" }, { "name": "limit", "value": "", "type": "query", "description": "The number of shift requests to include per page." }, { "name": "open_only", "value": "", "type": "query", "description": "Whether only open swaps should be included in the results." }, { "name": "page", "value": "", "type": "query", "description": "The page of results to fetch." }, { "name": "shift_id", "value": "1,5,3", "type": "query", "description": "The ID of the shift to get swaps for. For multiple shifts, enter a list of shift IDs separated by commas.\n" }, { "name": "start", "value": "2017-07-21T17:32:28Z", "type": "query", "description": "Start time for the shift search window. Must be included if end is defined.\n" }, { "name": "status", "value": "4,5", "type": "query", "description": "The status or statuses of shift request that should be included in the\nresults. For multiple statuses, enter a list separated by commas.\n\nStatuses available are:\n* `0` - Pending\n* `1` - Approved\n* `2` - Declined\n* `3` - Completed\n* `4` - Canceled\n* `5` - Expired\n" }, { "name": "type", "value": "2,3", "type": "query", "description": "The type or types of shift requests that should be included in the results.\nFor multiple types, enter a list separated by commas.\n\nTypes available are:\n* `1` - Swap\n* `2` - Drop\n* `3` - Alert\n" }, { "name": "user_id", "value": "1,3,5", "type": "query", "description": "The ID of the user to get shift requests for. For multiple users, enter a list of user IDs separated by commas.\n" } ] }, "docs": "Get a collection of shift request objects. Swaps let users swap shifts with each\nother or drop shifts for other users to pick up.\n" }, { "info": { "name": "Create a new shift request.", "type": "http" }, "http": { "method": "POST", "url": "https://api.wheniwork.com/2/swaps", "body": { "type": "json", "data": "{}" } }, "docs": "Create a new shift request." }, { "info": { "name": "Get the details of a specific shift request.", "type": "http" }, "http": { "method": "GET", "url": "https://api.wheniwork.com/2/swaps/:swap_id", "params": [ { "name": "swap_id", "value": "", "type": "path", "description": "ID of the swap being requests." } ] }, "docs": "Get a single shift request object. Shift requests let users swap shifts with each other or\ndrop shifts for other users to pick up.\n" }, { "info": { "name": "Update a shift request.", "type": "http" }, "http": { "method": "PUT", "url": "https://api.wheniwork.com/2/swaps/:swap_id", "params": [ { "name": "swap_id", "value": "", "type": "path", "description": "ID of the swap being requests." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update a shift request." }, { "info": { "name": "Delete the given shift request.", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.wheniwork.com/2/swaps/:swap_id", "params": [ { "name": "swap_id", "value": "", "type": "path", "description": "ID of the swap being requests." } ] }, "docs": "Delete the given shift request." } ] } ], "bundled": true }