Shyft Customer > Shifts API

The Customer > Shifts API from Shyft — 25 operation(s) for customer > shifts.

OpenAPI Specification

shyft-customer-shifts-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Shyft Customer Authentication > Email Customer > Shifts 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 > Shifts
paths:
  /api/customer/user_role/schedule_elements:
    get:
      tags:
      - Customer > Shifts
      summary: '[shifts] get associated shifts'
      security:
      - bearerAuth: []
      parameters:
      - name: Session-Uukey
        in: header
        schema:
          type: string
        example: '{{session_uukey}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '200':
          description: OK
          headers:
            X-Frame-Options:
              schema:
                type: string
                example: SAMEORIGIN
            X-XSS-Protection:
              schema:
                type: string
                example: 1; mode=block
            X-Content-Type-Options:
              schema:
                type: string
                example: nosniff
            X-LS-License:
              schema:
                type: string
                example: All Rights Reserved © Coffee Enterprise
            X-LS-Application:
              schema:
                type: string
                example: Coffee Mobile
            X-Request-Method:
              schema:
                type: string
                example: '{{x_method}}'
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            ETag:
              schema:
                type: string
                example: W/"a29ec4d9760a801144e4ffc7b8e160dd"
            Cache-Control:
              schema:
                type: string
                example: max-age=0, private, must-revalidate
            Set-Cookie:
              schema:
                type: string
                example: _shyft_api_server_session=V1dtYUJLZkNWWUpOTmZSMFN6aFBIU0t3RTZvVFhKLzZsWGxtK21pWjVSdzI4QUZBL3l4VTNmeHBVRHVQbkRsVUtReGZGWjVGRHUvT2ZWYjJsRTZQVlJITDFyK2JIS3Q5UFRKNXNKSEJ2VGJVR0tnbnhJam5SVHRUaUhlL2xJU29EQVJqNDRVSTBCNHpFcGs3ajZWK1FVODl2bVU0VExRakRHaUYwSEZsYTBkeThNQjBveGRLNW93NzkyYUVmRk5OcHF1V1VCU1FXRUF1Y0RuYTdiS0VlMmRXSVdlUWl0TmFtS3duK0dHZWtFOD0tLWdwVnFJUk1wUEFha2xiZ0FKWGh4cGc9PQ%3D%3D--a4befd384395981ec382e74ae8302bba38079714; path=/; HttpOnly
            X-Rack-Dev-Mark-Env:
              schema:
                type: string
                example: Bin%27s+Local+Server
            X-Request-Id:
              schema:
                type: string
                example: b57cd8a1-2335-49ff-8ff1-c86bf6f20094
            X-Runtime:
              schema:
                type: number
                example: '0.256556'
            Vary:
              schema:
                type: string
                example: Origin
            Connection:
              schema:
                type: string
                example: close
            Server:
              schema:
                type: string
                example: thin 1.5.1 codename Straight Razor
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: '[shifts] get associated shifts'
                  value:
                    schedule_elements: []
                    meta:
                      pagination:
                        previous_page: null
                        current_page: 1
                        next_page: null
                        per_page: 5
                        total_pages: 1
                        total_count: 0
                example-1:
                  summary: '[shifts] get associated shifts - with ui-data'
                  value:
                    schedule_elements:
                    - _parent_object_id: null
                      id: 1117997
                      name: shift
                      old_name: null
                      start_at: '2018-04-01T09:00:00.000Z'
                      end_at: '2019-04-01T16:00:00.000Z'
                      trade_status: posted
                      channel_name: Northwest Work Lofts
                      channel_type: location_feed
                      tip_amount: 10
                      location_id: 2500
                      owner_id: 11284
                      coverer_id: null
                      approver_id: null
                      coverer_time: null
                      manager_time: null
                      owner_position: null
                      require_approval: false
                      can_approve: false
                      channel_id: 4620
                      post_id: 37457
                      schedule_id: 0
                      content: A Test Shift
                      created_at: '2019-06-20T05:45:22.488Z'
                      updated_at: '2019-06-20T05:45:23.856Z'
                      allow_delete: false
                      segment_count: 0
                      extra_segment_count: 0
                      published_at: '2019-06-20T05:45:22.488Z'
                      allow_cancel: true
                      configuration_id: null
                      primary_department: null
                      primary_job: null
                      badges: []
                      applicants_max_num: null
                      parent_id: null
                      child_card: null
                      parent_card: null
                      available_shifts_left: null
                      available_shifts_pending: null
                      available_shifts_covered: null
                      cover_mode: default
                      can_apply: false
                      has_applied: false
                      current_applicant_status: null
                      current_applicant_id: null
                      ui_data:
                        status_message: A Test Shift
                        status_earn: null
                        status_title_1: Associate
                        status_title_2: Team Shift
                      current_applicants_user_ids: []
                      current_applicants_pending_user_ids: []
                      current_applicants_approved_user_ids: []
                      current_applicants_denied_user_ids: []
                      owner:
                        _parent_object_id: 1117997
                        id: 11284
                        active_org: 1
                        first_name: Bin1
                        last_name: Li
                        email: bin@myshyft.com
                        phone_number: '18083836511'
                        gender: 0
                        chat_handle: 6db93a877e2b70b40d3b2e98e958b979
                        user_group: 0
                        status: ''
                        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: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                        gallery_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/gallery/10803_file.png?1574022681
                        full_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/full/10803_file.png?1574022681
                        current_position: Engineer
                        current_user_privilege_id: 13705
                        current_is_approved: true
                        current_is_admin: true
                        all_push: true
                        shift_push: true
                        schedule_push: true
                        community_push: true
                        cfg_ewa_ok: true
                        locale: en
                        profile_image:
                          thumb_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                          gallery_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/gallery/10803_file.png?1574022681
                          full_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/full/10803_file.png?1574022681
                        recent_user_privilege:
                          _parent_object_id: 11284
                          id: 13705
                          email: bin@myshyft.com
                          wage: null
                          position: Engineer
                          is_approved: true
                          owner_id: 11284
                          location_id: 5459
                          org_id: 1
                          is_admin: true
                          read_only: false
                          first_name: Bin1
                          last_name: Li
                          phone_number: '18083836511'
                          profile_image_thumb_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                          chat_handle: 6db93a877e2b70b40d3b2e98e958b979
                          admin_claim_pending: false
                          status: active
                          allow_toggle_approve: null
                          allow_toggle_shift_approval: true
                          allow_toggle_dashboard: null
                          allow_toggle_delete_content: null
                          allow_toggle_tipping: null
                          allow_approve: false
                          allow_shift_approve: null
                          allow_delete_user: false
                          allow_delete_post: false
                          allow_delete_schedule: false
                          allow_tipping: null
                          allow_delete_shift_inventory: false
                          allow_delete_shift_posted: false
                          allow_delete_shift_covered: false
                          allow_delete_shift_pending: false
                          allow_delete_shift_approved: false
                          allow_delete_shift_rejected: false
                          location:
                            _associations_removed: true
                            _parent_object_id: 13705
                            id: 5459
                            swift_code: CMSDEMO
                            location_name: CMS Demo
                            unit_number: '3131'
                            street_number: ''
                            address: 3131 Western Ave STE 515
                            province: WA
                            postal: '98121'
                            country: USA
                            lat: null
                            lng: null
                            latitude: 47.6181458
                            longitude: -122.3574266
                            phone_number: ''
                            created_at: '2018-11-30T07:39:06.912Z'
                            users_count: 132
                            formatted_address: '3131 Western Ave STE 515 #3131, Seattle, WA 98121, USA'
                            time_zone: America/Los_Angeles
                            google_map_id: ChIJE2hfuLRqkFQRxQj8zSjtks8
                            four_sq_id: null
                            allow_tipping: true
                            shift_require_approval: true
                            shyft_pro_active: false
                            shyft_pro_expiry_date: '2021-09-04T04:37:00.000Z'
                            fence_radius: null
                            cfg_not_dm: false
                            cfg_geofence_log: false
                            cfg_timeout: null
                            cfg_vto: true
                            tos_url: ''
                            tos_version: null
                            require_approval: false
                            documents: null
                            shyft_pro_subscription_status: 0
                            admin_delete_content: false
                            ip_blocked: false
                            member_count: 41
                            location_address: null
                            location_city: Seattle, WA, 98121
                            feed_channel_id: 7780
                            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:
                            - default
                            default_cover_mode: null
                          user:
                            _associations_removed: true
                            _parent_object_id: 13705
                            id: 11284
                            active_org: 1
                            first_name: Bin1
                            last_name: Li
                            email: bin@myshyft.com
                            phone_number: '18083836511'
                            gender: 0
                            chat_handle: 6db93a877e2b70b40d3b2e98e958b979
                            user_group: 0
                            status: ''
                            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: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                            gallery_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/gallery/10803_file.png?1574022681
                            full_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/full/10803_file.png?1574022681
                            current_position: Engineer
                            current_user_privilege_id: 13705
                            current_is_approved: true
                            current_is_admin: true
                            all_push: true
                            shift_push: true
                            schedule_push: true
                            community_push: true
                            cfg_ewa_ok: true
                            locale: en
                          pending_legals: []
                      coverer: null
                      approver: null
                      reposted_object: null
                      parent_schedule_element: null
                    - _parent_object_id: null
                      id: 1117996
                      name: shift
                      old_name: null
                      start_at: '2018-04-01T09:00:00.000Z'
                      end_at: '2019-04-01T16:00:00.000Z'
                      trade_status: posted
                      channel_name: Northwest Work Lofts
                      channel_type: location_feed
                      tip_amount: 10
                      location_id: 2500
                      owner_id: 11284
                      coverer_id: null
                      approver_id: null
                      coverer_time: null
                      manager_time: null
                      owner_position: null
                      require_approval: false
                      can_approve: false
                      channel_id: 4620
                      post_id: 37456
                      schedule_id: 0
                      content: A Test Shift
                      created_at: '2019-06-20T05:43:05.510Z'
                      updated_at: '2019-06-20T05:43:06.958Z'
                      allow_delete: false
                      segment_count: 0
                      extra_segment_count: 0
                      published_at: '2019-06-20T05:43:05.510Z'
                      allow_cancel: true
                      configuration_id: null
                      primary_department: null
                      primary_job: null
                      badges: []
                      applicants_max_num: null
                      parent_id: null
                      child_card: null
                      parent_card: null
                      available_shifts_left: null
                      available_shifts_pending: null
                      available_shifts_covered: null
                      cover_mode: default
                      can_apply: false
                      has_applied: false
                      current_applicant_status: null
                      current_applicant_id: null
                      ui_data:
                        status_message: A Test Shift
                        status_earn: null
                        status_title_1: Associate
                        status_title_2: Team Shift
                      current_applicants_user_ids: []
                      current_applicants_pending_user_ids: []
                      current_applicants_approved_user_ids: []
                      current_applicants_denied_user_ids: []
                      owner:
                        _parent_object_id: 1117996
                        id: 11284
                        active_org: 1
                        first_name: Bin1
                        last_name: Li
                        email: bin@myshyft.com
                        phone_number: '18083836511'
                        gender: 0
                        chat_handle: 6db93a877e2b70b40d3b2e98e958b979
                        user_group: 0
                        status: ''
                        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: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                        gallery_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/gallery/10803_file.png?1574022681
                        full_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/full/10803_file.png?1574022681
                        current_position: Engineer
                        current_user_privilege_id: 13705
                        current_is_approved: true
                        current_is_admin: true
                        all_push: true
                        shift_push: true
                        schedule_push: true
                        community_push: true
                        cfg_ewa_ok: true
                        locale: en
                        profile_image:
                          thumb_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                          gallery_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/gallery/10803_file.png?1574022681
                          full_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/full/10803_file.png?1574022681
                        recent_user_privilege:
                          _parent_object_id: 11284
                          id: 13705
                          email: bin@myshyft.com
                          wage: null
                          position: Engineer
                          is_approved: true
                          owner_id: 11284
                          location_id: 5459
                          org_id: 1
                          is_admin: true
                          read_only: false
                          first_name: Bin1
                          last_name: Li
                          phone_number: '18083836511'
                          profile_image_thumb_url: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1574022681
                          chat_handle: 6db93a877e2b70b40d3b2e98e958b979
                          admin_claim_pending: false
                          status: active
                          allow_toggle_approve: null
                          allow_toggle_shift_approval: true
                          allow_toggle_dashboard: null
                          allow_toggle_delete_content: null
                          allow_toggle_tipping: null
                          allow_approve: false
                          allow_shift_approve: null
                          allow_delete_user: false
                          allow_delete_post: false
                          allow_delete_schedule: false
                          allow_tipping: null
                          allow_delete_shift_inventory: false
                          allow_delete_shift_posted: false
                          allow_delete_shift_covered: false
                          allow_delete_shift_pending: false
                          allow_delete_shift_approved: false
                          allow_delete_shift_rejected: false
                          location:
                            _associations_removed: true
                            _parent_object_id: 13705
                            id: 5459
                            swift_code: CMSDEMO
                            location_name: CMS Demo
                            unit_number: '3131'
                            street_number: ''
                            address: 3131 Western Ave STE 515
                            province: WA
                            postal: '98121'
                            country: USA
                            lat: null
                            lng: null
                            latitude: 47.6181458
                            longitude: -122.3574266
                            phone_number: ''
                            created_at: '2018-11-30T07:39:06.912Z'
                            users_count: 132
                            formatted_address: '3131 Western Ave STE 515 #3131, Seattle, WA 98121, USA'
                            time_zone: America/Los_Angeles
                            google_map_id: ChIJE2hfuLRqkFQRxQj8zSjtks8
                            four_sq_id: null
                            allow_tipping: true
                            shift_require_approval: true
                            shyft_pro_active: false
                            shyft_pro_expiry_date: '2021-09-04T04:37:00.000Z'
                            fence_radius: null
                            cfg_not_dm: false
                            cfg_geofence_log: false
                            cfg_timeout: null
                            cfg_vto: true
                            tos_url: ''
                            tos_version: null
                            require_approval: false
                            documents: null
                            shyft_pro_subscription_status: 0
                            admin_delete_content: false
                            ip_blocked: false
                            member_count: 41
                            location_address: null
                            location_city: Seattle, WA, 98121
                            feed_channel_id: 7780
                            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:
                            - default
                            default_cover_mode: null
                          user:
                            _associations_removed: true
                            _parent_object_id: 13705
                            id: 11284
                            active_org: 1
                            first_name: Bin1
                            last_name: Li
                            email: bin@myshyft.com
                            phone_number: '18083836511'
                            gender: 0
                            chat_handle: 6db93a877e2b70b40d3b2e98e958b979
                            user_group: 0
                            status: ''
                            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: https://miniobackingstore.blob.core.windows.net/coffeemobile/images/thumb/10803_file.png?1

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