Shyft Customer > Users > user_role API

The Customer > Users > user_role API from Shyft — 7 operation(s) for customer > users > user_role.

OpenAPI Specification

shyft-customer-users-user-role-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Shyft Customer Authentication > Email Customer > Users > user_role API
  description: "Welcome to the Shyft Customer App API.\n\nShyft customer App API is designed to support the function of Shyft Mobile App(iOS, Android), Web App and Manager Dashboard.\n\nNOTES:\n\n- In parameters section, the letter `R` stands for `Required`.\n    \n- All API examples show only essential data set.\n    \n\n## Authentication\n\n---\n\nInclude as headers for API calls after authentication token.\n\n| Name | Values | R | Description |\n| --- | --- | --- | --- |\n| Session-Uukey |  | \\* | The value got from authentication API call (SignIn/Confirm) |\n\n## Global Information\n\n---\n\n#### Query Parameters\n\n###### For All API:\n\n| Name | Values | R | Description |\n| --- | --- | --- | --- |\n| api_version | String |  | Ex. 6_0_0 |\n| response\\[nested\\] | Integer |  | Ex. 1 |\n| response\\[keep\\] | String |  | Ex. location\\[current_user_privilege\\],name,id |\n| response\\[only\\] | String |  | Ex. id,location\\[id,location_name,current_user_privilege\\] |\n| response\\[except\\] | String |  | Ex. name,location\\[id,location_name,swift_code\\],owner\\[id\\] |\n\n- The query parameter `response[only]` is needed to help API performance by limiting the size of returned data.\n    \n- On test server, `response[only]` support wildcard, you can supply `response[only]=\\*` to get everything.\n    \n- Production server does not support wildcard, you need to figure out and supply your `response[only]` for each API call.\n    \n\n###### For Index API:\n\n- Pagination Option 1)\n    \n\n| Name | Values | R | Description |\n| --- | --- | --- | --- |\n| page | Integer |  | Ex. 1 |\n| per_page | Integer |  | Ex. 5 |\n| total | boolean |  | true/false |\n| order | String |  | Ex. start_at_desc, start_at_asc |\n\n- Pagination Option 2)\n    \n\n| Name | Values | R | Description |\n| --- | --- | --- | --- |\n| limit | Integer |  | Ex. 10 |\n| offset | Integer |  | Ex. 5 |\n| order | String |  | Ex. start_at_desc, start_at_asc |\n| last_id | Integer |  | Ex. 101 |\n\n###### For Update API:\n\n| Name | Values | R | Description |\n| --- | --- | --- | --- |\n| response\\[put_return_resource\\] | String |  | Ex. true |\n\n#### Headers\n\n| Name | Values | R | Description |\n| --- | --- | --- | --- |\n| Platform | ios|android|web | \\* |  |\n| Api-Version | 6_0_0 | \\* | Ex: 6_0_0 |\n| Build-Number |  | \\* |  |\n| Push-Id |  |  |  |\n| X-Method |  |  | Deprecated |\n| Content-Type | application/json | \\* |  |\n\n#### Success Codes\n\n| SUCCESS Code | Meaning |\n| --- | --- |\n| 200 | Created -- Objet created. |\n| 201 | Unauthorized -- Your API key is wrong. |\n| 204 | No Content -- Success without returning resource. |\n\n#### Error Codes\n\n| Error Code | Meaning |\n| --- | --- |\n| 400 | Bad Request -- Your request is invalid. |\n| 401 | Unauthorized -- Your API key is wrong. |\n| 403 | Forbidden -- The records requested is hidden for administrators only. |\n| 404 | Not Found -- The specified record could not be found. |\n| 405 | Method Not Allowed -- You tried to access a record with an invalid method. |\n| 406 | Not Acceptable -- You requested a format that isn't json. |\n| 410 | Gone -- The record requested has been removed from our servers. |\n| 422 | Unprocessable Entity -- Invalid input data. |\n| 429 | Too Many Requests -- You're requesting too many requests! Slow down! |\n| 500 | Internal Server Error -- We had a problem with our server. Try again later. |\n| 502 | Bad Gateway -- |\n| 504 | Gateway Timeout -- |\n| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |\n\n#### Error Response Formats\n\n422\n\n``` json\n{\n    \"errors\": {\n        \"base\": [\n            \"a private session for same two users already exists: 3034\"\n        ]\n    }\n}\n\n ```\n\n422\n\n```\n{\n    \"errors\": {\n        \"google_map_id\": [\n            \"can't be blank\"\n        ],\n        \"time_zone\": [\n            \"can't be blank\"\n        ],\n        \"longitude\": [\n            \"can't be blank\"\n        ]\n    }\n}\n{\n    \"errors\": {\n        \"record_invalid\": [\n            \"Validation failed: User has already been taken\"\n        ]\n    }\n}\n\n ```\n\n404\n\n``` json\n{\n    \"errors\": {\n        \"not_found\": [\n            \"Couldn't find Post\"\n        ]\n    }\n}\n\n ```\n\n500\n\n``` json\n{\n    \"errors\": {\n        \"internal_server_error\": [\n            \"Invalid nil value\"\n        ]\n    }\n}\n\n ```"
  version: 1.0.0
servers:
- url: http://{{host}}
- url: http://{{local-host}}
- url: http://{{sp3-host}}
- url: http://test-service.myshyft.com
- url: http://localhost:4001
- url: http://localhost:3000
- url: http://{{local-host}}api
- url: https://test-unfurl.myshyft.com
tags:
- name: Customer > Users > user_role
paths:
  /api/customer/user_role/locations/{location_id}/users:
    get:
      tags:
      - Customer > Users > user_role
      summary: '[users] get coworkers  of specific location'
      parameters:
      - name: Session-Uukey
        in: header
        schema:
          type: string
        example: '{{session_uukey}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      - name: response[keep]
        in: query
        schema:
          type: string
        example: skill_ids
      - name: location_id
        in: path
        schema:
          type: string
        required: true
      responses:
        '200':
          description: 'OK '
          headers:
            Platform:
              schema:
                type: string
                example: '{{platform}}'
            Version:
              schema:
                type: string
                example: '{{version}}'
            Build-Number:
              schema:
                type: string
                example: '{{build_number}}'
            Push-Id:
              schema:
                type: string
                example: '{{push_id}}'
            X-Method:
              schema:
                type: string
                example: '{{x_method}}'
            Session-Token:
              schema:
                type: string
                example: '{{session_token}}'
            Session-Uukey:
              schema:
                type: string
                example: '{{session_uukey}}'
            Authorization:
              schema:
                type: string
                example: Token token={{api_key_access_token}}
            Uid:
              schema:
                type: string
                example: '{{uid}}'
            Auth-Category:
              schema:
                type: string
                example: '{{auth_category}}'
            Auth-Target:
              schema:
                type: string
                example: '{{auth_target}}'
            Token-Type:
              schema:
                type: string
                example: Bearer
            Client:
              schema:
                type: string
                example: '{{client}}'
            Access-Token:
              schema:
                type: string
                example: '{{access_token}}'
            Expiry:
              schema:
                type: string
                example: '{{expiry}}'
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: '[users] get coworkers  of specific location'
                  value:
                    users:
                    - id: 4257
                      active_org: 1
                      first_name: Maria
                      last_name: Jacinto
                      email: 15599941826@coffeemobile.com
                      gender: 0
                      chat_handle: 78000cb25f74aa4496a734c57274d7ef
                      user_group: 0
                      status: ''
                      current_open_availability_request_submit_status: not_submitted
                      profile_image: null
                      current_open_availability_request:
                        id: 15
                        user_id: 9046
                        location_id: 2159
                        notes: please submit your new availability
                      current_submitted_availability_for_current_open_request: null
                      current_user_privilege:
                        id: 4588
                        email: 15599941826@coffeemobile.com
                        wage: 15
                        position: F&F
                        is_approved: true
                        owner_id: 4257
                        location_id: 2159
                        org_id: 1
                        is_admin: false
                        read_only: false
                        first_name: Maria
                        last_name: Jacinto
                        phone_number: '15599941826'
                        profile_image_thumb_url: https://s3.amazonaws.com/shyftassets/avatar1.png
                        current_availability: null
                      current_availability: null
                    - id: 8193
                      active_org: 1
                      first_name: Deepak7210
                      last_name: Yyhh
                      email: 18888887210@coffeemobile.com
                      gender: 0
                      chat_handle: dc503f6993ed30223bb2b622c2ad3086
                      user_group: 0
                      status: ''
                      current_open_availability_request_submit_status: not_submitted
                      profile_image: null
                      current_open_availability_request:
                        id: 15
                        user_id: 9046
                        location_id: 2159
                        notes: please submit your new availability
                      current_submitted_availability_for_current_open_request: null
                      current_user_privilege:
                        id: 10465
                        email: 18888887210@coffeemobile.com
                        wage: 15
                        position: null
                        is_approved: true
                        owner_id: 8193
                        location_id: 2159
                        org_id: 1
                        is_admin: false
                        read_only: false
                        first_name: Deepak7210
                        last_name: Yyhh
                        phone_number: '18888887210'
                        profile_image_thumb_url: https://s3.amazonaws.com/shyftassets/avatar1.png
                        current_availability: null
                      current_availability: null
                    - id: 8195
                      active_org: 0
                      first_name: Deepak7211
                      last_name: Ghh
                      email: 18888887212@coffeemobile.com
                      gender: 0
                      chat_handle: f92ee5f1f3a51a6d3ce2e9f5962b5405
                      user_group: 0
                      status: ''
                      current_open_availability_request_submit_status: not_submitted
                      profile_image: null
                      current_open_availability_request:
                        id: 15
                        user_id: 9046
                        location_id: 2159
                        notes: please submit your new availability
                      current_submitted_availability_for_current_open_request: null
                      current_user_privilege:
                        id: 10466
                        email: 18888887212@coffeemobile.com
                        wage: 15
                        position: null
                        is_approved: true
                        owner_id: 8195
                        location_id: 2159
                        org_id: 1
                        is_admin: false
                        read_only: false
                        first_name: Deepak7211
                        last_name: Ghh
                        phone_number: '18888887212'
                        profile_image_thumb_url: https://s3.amazonaws.com/shyftassets/avatar1.png
                        current_availability: null
                      current_availability: null
                    - id: 8645
                      active_org: 0
                      first_name: Deepak0003
                      last_name: Haha
                      email: deepak@myshyft.com
                      gender: 0
                      chat_handle: 8ce1efceaa0226ab3656ba2f32cebc83
                      user_group: 0
                      status: ''
                      current_open_availability_request_submit_status: not_submitted
                      profile_image: null
                      current_open_availability_request:
                        id: 15
                        user_id: 9046
                        location_id: 2159
                        notes: please submit your new availability
                      current_submitted_availability_for_current_open_request: null
                      current_user_privilege:
                        id: 10148
                        email: deepak@myshyft.com
                        wage: 15
                        position: null
                        is_approved: true
                        owner_id: 8645
                        location_id: 2159
                        org_id: 1
                        is_admin: true
                        read_only: false
                        first_name: Deepak0003
                        last_name: Haha
                        phone_number: '18882790003'
                        profile_image_thumb_url: https://s3.amazonaws.com/shyftassets/avatar1.png
                        current_availability: null
                      current_availability: null
                    - id: 9046
                      active_org: 1
                      first_name: BIN
                      last_name: null
                      email: libin0120@gmail.com
                      gender: 0
                      chat_handle: 3704ed17fd20978c115c87aa554d2565
                      user_group: 0
                      status: ''
                      current_open_availability_request_submit_status: not_submitted
                      profile_image: null
                      current_open_availability_request:
                        id: 15
                        user_id: 9046
                        location_id: 2159
                        notes: please submit your new availability
                      current_submitted_availability_for_current_open_request: null
                      current_user_privilege:
                        id: 10547
                        email: libin0120@gmail.com
                        wage: 100
                        position: engineer
                        is_approved: true
                        owner_id: 9046
                        location_id: 2159
                        org_id: 1
                        is_admin: true
                        read_only: false
                        first_name: BIN
                        last_name: null
                        phone_number: null
                        profile_image_thumb_url: https://s3.amazonaws.com/shyftassets/avatar1.png
                        current_availability:
                          id: 77
                          status: pending
                          notes: null
                          user_id: 9046
                          location_id: 2159
                          availability_request_id: 12
                          sunday:
                            _associations_removed: true
                            start_at: 00:00
                            end_at: null
                          monday:
                            _associations_removed: true
                            start_at: '10:00'
                            end_at: '12:00'
                          tuesday:
                            _associations_removed: true
                            start_at: null
                            end_at: '12:00'
                          wednesday:
                            _associations_removed: true
                            start_at: null
                            end_at: null
                          thursday:
                            _associations_removed: true
                            start_at: null
                            end_at: null
                          friday:
                            _associations_removed: true
                            start_at: null
                            end_at: null
                          saturday:
                            _associations_removed: true
                            start_at: null
                            end_at: null
                          user:
                            _associations_removed: true
                            id: 9046
                            active_org: 1
                            first_name: BIN
                            last_name: null
                            email: libin0120@gmail.com
                            gender: 0
                            chat_handle: 3704ed17fd20978c115c87aa554d2565
                            user_group: 0
                            status: ''
                            current_open_availability_request_submit_status: not_submitted
                      current_availability:
                        id: 77
                        status: pending
                        notes: null
                        user_id: 9046
                        location_id: 2159
                        availability_request_id: 12
                        sunday:
                          start_at: 00:00
                          end_at: null
                        monday:
                          start_at: '10:00'
                          end_at: '12:00'
                        tuesday:
                          start_at: null
                          end_at: '12:00'
                        wednesday:
                          start_at: null
                          end_at: null
                        thursday:
                          start_at: null
                          end_at: null
                        friday:
                          start_at: null
                          end_at: null
                        saturday:
                          start_at: null
                          end_at: null
                        user:
                          id: 9046
                          active_org: 1
                          first_name: BIN
                          last_name: null
                          email: libin0120@gmail.com
                          gender: 0
                          chat_handle: 3704ed17fd20978c115c87aa554d2565
                          user_group: 0
                          status: ''
                          current_open_availability_request_submit_status: not_submitted
                          profile_image: null
                          current_open_availability_request:
                            _associations_removed: true
                            id: 15
                            user_id: 9046
                            location_id: 2159
                            notes: please submit your new availability
                          current_submitted_availability_for_current_open_request: null
                          current_user_privilege:
                            _associations_removed: true
                            id: 10547
                            email: libin0120@gmail.com
                            wage: 100
                            position: engineer
                            is_approved: true
                            owner_id: 9046
                            location_id: 2159
                            org_id: 1
                            is_admin: true
                            read_only: false
                            first_name: BIN
                            last_name: null
                            phone_number: null
                            profile_image_thumb_url: https://s3.amazonaws.com/shyftassets/avatar1.png
                          current_availability:
                            _associations_removed: true
                            id: 77
                            status: pending
                            notes: null
                            user_id: 9046
                            location_id: 2159
                            availability_request_id: 12
                example-1:
                  summary: '[users] get coworkers  of specific location - force returns `current_department_ids`'
                  value:
                    users:
                    - _parent_object_id: null
                      id: 7608
                      active_org: 0
                      first_name: Kyle0205
                      last_name: Associate
                      email: kyle@myshyft.com
                      gender: 0
                      user_group: 0
                      push_settings_list:
                        shift_push:
                          label: Shift Notifications
                          type: boolean
                        schedule_push:
                          label: Schedule Notifications
                          type: boolean
                        community_push:
                          label: Community Notifications
                          type: boolean
                      push_settings_list_array:
                      - label: Shift Notifications
                        type: boolean
                        key: shift_push
                      - label: Schedule Notifications
                        type: boolean
                        key: schedule_push
                      - label: Community Notifications
                        type: boolean
                        key: community_push
                      thumb_url: null
                      gallery_url: null
                      full_url: null
                      current_position: ''
                      current_user_privilege_id: 20490
                      current_is_approved: true
                      current_is_admin: true
                      all_push: true
                      shift_push: true
                      schedule_push: true
                      community_push: true
                      cfg_ewa_ok: true
                      cfg_lock_profile: null
                      skill_ids:
                      - 12
                      - 2
                      locale: en
                      current_department_ids: []
                      profile_image: null
                      recent_user_privilege:
                        _parent_object_id: 7608
                        id: 22021
                        email: kyle@myshyft.com
                        wage: null
                        position: ''
                        is_approved: true
                        owner_id: 7608
                        location_id: 2806
                        org_id: 1
                        is_admin: false
                        read_only: false
                        first_name: Kyle0205
                        last_name: Associate
                        phone_number: '18888888205'
                        profile_image_thumb_url: https://files.myshyft.com/shyft-app-images/avatar1.png
                        chat_handle: 383265fa6b513f511ca574646a2abe16
                        admin_claim_pending: false
                        status: active
                        allow_toggle_approve: null
                        allow_toggle_shift_approval: null
                        allow_toggle_dashboard: null
                        allow_toggle_delete_content: null
                        allow_toggle_tipping: null
                        allow_approve: null
                        allow_shift_approve: null
                        allow_delete_user: null
                        allow_delete_post: null
                        allow_delete_schedule: null
                        allow_tipping: null
                        allow_delete_shift_inventory: null
                        allow_delete_shift_posted: null
                        allow_delete_shift_covered: null
                        allow_delete_shift_pending: null
                        allow_delete_shift_approved: null
                        allow_delete_shift_rejected: null
                        department_ids: []
                        location:
                          _parent_object_id: 22021
                          id: 2806
                          swift_code: RSZPNM
                          location_name: Mysterious Red X
                          unit_number: ''
                          street_number: ''
                          address: 1111 18th Avenue
                          province: Washington
                          postal: '98122'
                          country: United States
                          lat: '47.612037'
                          lng: '-122.309243'
                          latitude: 47.6120608
                          longitude: -122.3092501
                          phone_number: +1 206-300-2056
                          created_at: '2018-01-24T21:25:21.654Z'
                          users_count: 300
                          formatted_address: 1111 18th Ave, Seattle, WA 98122, USA
                          time_zone: America/Los_Angeles
                          google_map_id: ChIJf5JaJNBqkFQRkwKIHwjwbDA
                          four_sq_id: null
                          allow_tipping: true
                          shift_require_approval: true
                          shyft_pro_active: true
                          shyft_pro_expiry_date: '2017-09-04T04:37:00.000Z'
                          fence_radius: null
                          cfg_not_dm: false
                          cfg_geofence_log: false
                          cfg_timeout: null
                          cfg_vto: true
                          cfg_call_off: true
                          tos_url: ''
                          tos_version: null
                          require_approval: true
                          documents:
                          - title: Shyft Terms of Service
                            url: https://myshyft.com/terms.en.html
                          shyft_pro_subscription_status: 0
                          admin_delete_content: true
                          ip_blocked: false
                          member_count: 136
                          location_address: null
                          location_city: Seattle, Washington, 98122
                          feed_channel_id: 4927
                          pending_users_count: 0
                          shyft_pro_trial_flag: false
                          is_sso_required: false
                          cfg_exclude_coworker_schedules: false
                          cfg_exclude_coworker_schedules_from_admins: false
                          cfg_user_signup_show_email: true
                          available_cover_modes:
                          - multi_applicants_picked_by_manager
                          - default
                          default_cover_mode: multi_applicants_picked_by_manager
                          configuration: null
                          avatar_blob:
                            _associations_removed: true
                            _parent_object_id: 2806
                            id: 2006
                            content_type: image/png
                            service_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/g94YXQ1v5YPUps3QeDCoBQ7N?sp=r&sv=2016-05-31&se=2022-10-12T18%3A34%3A10Z&rscd=inline%3B+filename%3D%22shyft.png%22%3B+filename*%3DUTF-8%27%27shyft.png&rsct=image%2Fpng&sr=b&sig=%2B%2Fs%2BXpAgjXL%2Bl9TXLGPD%2BOVITsT9HJHeK2Z2kr%2BE3Wg%3D
                            filename: shyft.png
                            byte_size: 15423
                            blob_url: http://local-service.myshyft.com/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdFlIIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f9f0d7870f25f66acb498bf4df19255daa080dfb/shyft.png
                            preview_blob_url: null
                        user:
                          _parent_object_id: 22021
                          id: 7608
                          active_org: 0
                          first_name: Kyle0205
                          last_name: Associate
                          email: kyle@myshyft.com
                          gender: 0
                          user_group: 0
                          push_settings_list:
                            shift_push:
                              label: Shift Notifications
                              type: boolean
                            schedule_push:
                              label: Schedule Notifications
                              type: boolean
                            community_push:
                              label: Community Notifications
                              type: boolean
                          push_settings_list_array:
                          - label: Shift Notifications
                            type: boolean
                            key: shift_push
                          - label: Schedule Notifications
                            type: boolean
                            key: schedule_push
                          - label: Community Notifications
                            type: boolean
                            key: community_push
                          thumb_url: null
                          gallery_url: null
                          full_url: null
                          current_position: ''
                          current_user_privilege_id: 20490
                          current_is_approved: true
                          current_is_admin: true
                          all_push: true
                          shift_push: true
                          schedule_push: true
                          community_push: true
                          cfg_ewa_ok: true
                          cfg_lock_profile: null
                          skill_ids:
                          - 12
                          - 2
                          locale: en
                          profile_image: null
                          recent_user_privilege:
                            _associations_removed: true
                            _parent_object_id: 7608
                            id: 22021
                            email: kyle@myshyft.com
                            wage: null
                            position: ''
                            is_approved: true
                            owner_id: 7608
                            location_id: 2806
                            org_id: 1
                            is_admin: false
                            read_only: false
                            first_name: Kyle0205
                            last_name: Associate
                            phone_number: '18888888205'
                            profile_image_thumb_url: https://files.myshyft.com/shyft-app-images/avatar1.png
                            chat_handle: 383265fa6b513f511ca574646a2abe16
                            admin_claim_pending: false
                            status: active
                            allow_toggle_approve: null
                            allow_toggle_shift_approval: null
                            allow_toggle_dashboard: null
                            allow_toggle_delete_content: null
                            allow_toggle_tipping: null
                            allow_approve: null
                            allow_shift_approve: null
                            allow_delete_user: null
                            allow_delete_post: null
                            allow_delete_schedule: null
                            allow_tipping: null
                            allow_delete_shift_inventory: null
                            allow_delete_shift_posted: null
                            allow_delete_shift_covered: null
                            allow_delete_shift_pending: null
                            allow_delete_shift_approved: null
                            allow_de

# --- truncated at 32 KB (308 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/shyft/refs/heads/main/openapi/shyft-customer-users-user-role-api-openapi.yml