Shyft Customer > Locations > user_role API
The Customer > Locations > user_role API from Shyft — 15 operation(s) for customer > locations > user_role.
The Customer > Locations > user_role API from Shyft — 15 operation(s) for customer > locations > user_role.
openapi: 3.0.0
info:
title: Shyft Customer Authentication > Email Customer > Locations > 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 > Locations > user_role
paths:
/api/customer/user_role/locations/{location_id}:
get:
tags:
- Customer > Locations > user_role
summary: '[2.0] get a location'
description: "Description\n- - - \n- Get a location object\n- `location_id` coulld be `ID` or `Swift Code`\n\n\nParams\n- - -\nParam | Values | R |Description\n--- | --- | --- | ---\n\n\nHeaders\n- - -\nHeader | Values | R |Description\n--- | --- | --- | ---\n\n\n\nInput\n- - - \nAttribute | Values | R |Description\n--- | --- | --- | ---"
parameters:
- name: Session-Uukey
in: header
schema:
type: string
example: '{{session_uukey}}'
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: location_id
in: path
schema:
type: string
required: true
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/"b62ebd303d110521a1695c61a7e25112"
Cache-Control:
schema:
type: string
example: max-age=0, private, must-revalidate
Set-Cookie:
schema:
type: string
example: _shyft_api_server_session=RHl1eEs2MTNoekNpQ3lieitqNWFRdVp1b3dWdy9wMllIak55OXBmVk9pWVlPVEhPbUluenZUL2FmSVRwUExzUXVTMDJaa3g2OFBqdHEyV256VDAzN2c9PS0tY05rZldyK1gyV3ZqODYrYS84bHBIQT09--03339b2e884b227509f16ac0e1c85cd50a37671a; path=/; HttpOnly
X-Rack-Dev-Mark-Env:
schema:
type: string
example: Bin%27s+Local+Server
X-Request-Id:
schema:
type: string
example: e105542e-2a1d-4050-abed-fba90678b907
X-Runtime:
schema:
type: number
example: '0.317701'
Vary:
schema:
type: string
example: Origin
Connection:
schema:
type: string
example: close
Server:
schema:
type: string
example: thin
content:
application/json:
schema:
type: object
example:
location:
_parent_object_id: null
id: 2324
swift_code: QO9021
location_name: Comfort Inn & Suites Bothell - Seattle North
unit_number: null
street_number: null
address: 1414 228th Street Southeast
province: Washington
postal: '98021'
country: United States
lat: '47.790475'
lng: '-122.213519'
latitude: 47.7904654
longitude: -122.2135587
phone_number: +1 425-402-0900
created_at: '2017-10-16T07:10:35.423Z'
users_count: 3
formatted_address: 1414 228th St SE, Bothell, WA 98021, USA
time_zone: null
google_map_id: ChIJA0sL1qkPkFQR43qJWFmWqvo
allow_tipping: true
shift_require_approval: true
shyft_pro_active: false
shyft_pro_expiry_date: '2018-12-04T19:10:49.425Z'
fence_radius: null
cfg_not_dm: false
cfg_geofence_log: null
cfg_timeout: null
tos_url: null
tos_version: null
ip_blocked: false
member_count: 3
location_address: null
location_city: Bothell, Washington, 98021
division_names: []
feed_channel_id: 4359
put:
tags:
- Customer > Locations > user_role
summary: update a location
description: "Description\n- - - \n- Update a location\n- `location_id` coulld be `ID` or `Swift Code`\n\n\nParams\n- - -\nParam | Values | R |Description\n--- | --- | --- | ---\n\n\nHeaders\n- - -\nHeader | Values | R |Description\n--- | --- | --- | ---\n\n\n\nInput\n- - - \nAttribute | Values | R |Description\n--- | --- | --- | ---\nshift_require_approval| true/false| | |\nrequire_approval| true/false| | |\nallow_tipping| true/false| | |\nadmin_delete_content| true/false| | |"
requestBody:
content:
'*/*':
schema:
type: string
example: '"{\n \"location\": {\n \"time_zone\": \"America/Los_Angeles\"\n }\n}"'
parameters:
- name: Session-Uukey
in: header
schema:
type: string
example: '{{session_uukey}}'
- name: Content-Type
in: header
schema:
type: string
example: application/json
- 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 a location '
value:
location:
_parent_object_id: null
id: 2324
swift_code: QO9021
location_name: Comfort Inn & Suites Bothell - Seattle North
unit_number: null
street_number: null
address: 1414 228th Street Southeast
province: Washington
postal: '98021'
country: United States
lat: '47.790475'
lng: '-122.213519'
latitude: 47.7904654
longitude: -122.2135587
phone_number: +1 425-402-0900
created_at: '2017-10-16T07:10:35.423Z'
users_count: 3
formatted_address: 1414 228th St SE, Bothell, WA 98021, USA
time_zone: null
google_map_id: ChIJA0sL1qkPkFQR43qJWFmWqvo
allow_tipping: true
shift_require_approval: false
shyft_pro_active: false
shyft_pro_expiry_date: '2018-12-04T19:10:49.425Z'
fence_radius: null
member_count: 3
location_address: null
location_city: Bothell, Washington, 98021
division_names: []
feed_channel_id: 4359
current_user_privilege:
_parent_object_id: 2324
id: 11336
email: bin+100@myshyft.com
wage: 15
position: null
is_approved: true
owner_id: 9064
location_id: 2324
org_id: 1
is_admin: true
read_only: false
first_name: Bin
last_name: Li
phone_number: '18083836511'
profile_image_thumb_url: https://coffeemobile.s3.amazonaws.com/images/thumb/8352_data.?1512600950
current_availability: null
location:
_parent_object_id: 11336
id: 2324
swift_code: QO9021
location_name: Comfort Inn & Suites Bothell - Seattle North
unit_number: null
street_number: null
address: 1414 228th Street Southeast
province: Washington
postal: '98021'
country: United States
lat: '47.790475'
lng: '-122.213519'
latitude: 47.7904654
longitude: -122.2135587
phone_number: +1 425-402-0900
created_at: '2017-10-16T07:10:35.423Z'
users_count: 3
formatted_address: 1414 228th St SE, Bothell, WA 98021, USA
time_zone: null
google_map_id: ChIJA0sL1qkPkFQR43qJWFmWqvo
allow_tipping: true
shift_require_approval: false
shyft_pro_active: false
shyft_pro_expiry_date: '2018-12-04T19:10:49.425Z'
fence_radius: null
member_count: 3
location_address: null
location_city: Bothell, Washington, 98021
division_names: []
feed_channel_id: 4359
user:
_parent_object_id: 11336
id: 9064
active_org: 0
first_name: Bin
last_name: Li
email: bin+100@myshyft.com
gender: 0
chat_handle: ab4693b99883e10dd5e7d17d0cf71200
user_group: 0
status: ''
profile_image:
thumb_url: https://coffeemobile.s3.amazonaws.com/images/thumb/8352_data.?1512600950
gallery_url: https://coffeemobile.s3.amazonaws.com/images/gallery/8352_data.?1512600950
full_url: https://coffeemobile.s3.amazonaws.com/images/full/8352_data.?1512600950
recent_user_privilege:
_associations_removed: true
_parent_object_id: 9064
id: 11336
email: bin+100@myshyft.com
wage: 15
position: null
is_approved: true
owner_id: 9064
location_id: 2324
org_id: 1
is_admin: true
read_only: false
first_name: Bin
last_name: Li
phone_number: '18083836511'
profile_image_thumb_url: https://coffeemobile.s3.amazonaws.com/images/thumb/8352_data.?1512600950
example-1:
summary: '[users] get a location - success'
value:
location:
_parent_object_id: null
id: 2104
swift_code: QFW80C
location_name: Starbucks
unit_number: null
street_number: null
address: 600 Walnut Street, Cincinnati
province: null
postal: null
country: null
lat: '39.1026554'
lng: '-84.5102923'
latitude: 39.1029633
longitude: -84.5113859
phone_number: +1 513-814-2912
created_at: '2017-06-12T20:55:05.954Z'
users_count: 8
formatted_address: 600 Walnut St, Cincinnati, OH 45202, USA
time_zone: null
google_map_id: ChIJHdSGCVqxQYgRsurL7tJZkQI
allow_tipping: true
shift_require_approval: false
shyft_pro_active: false
shyft_pro_expiry_date: '2018-12-04T19:10:49.425Z'
fence_radius: null
member_count: 5
location_address: null
location_city: ', '
division_names: []
feed_channel_id: 4073
example-2:
summary: '[users] get a location'
value:
location:
_parent_object_id: null
id: 2104
swift_code: QFW80C
location_name: Starbucks
unit_number: null
street_number: null
address: 600 Walnut Street, Cincinnati
province: null
postal: null
country: null
lat: '39.1026554'
lng: '-84.5102923'
latitude: 39.1029633
longitude: -84.5113859
phone_number: +1 513-814-2912
created_at: '2017-06-12T20:55:05.954Z'
users_count: 8
formatted_address: 600 Walnut St, Cincinnati, OH 45202, USA
time_zone: null
google_map_id: ChIJHdSGCVqxQYgRsurL7tJZkQI
allow_tipping: true
shift_require_approval: false
shyft_pro_active: false
shyft_pro_expiry_date: '2018-12-04T19:10:49.425Z'
fence_radius: null
member_count: 5
location_address: null
location_city: ', '
division_names: []
feed_channel_id: 4073
'204':
description: No Content
headers:
Server:
schema:
type: string
example: nginx/1.19.3
Date:
schema:
type: string
example: Sun, 04 Jul 2021 05:07:02 GMT
Connection:
schema:
type: string
example: keep-alive
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-Download-Options:
schema:
type: string
example: noopen
X-Permitted-Cross-Domain-Policies:
schema:
type: string
example: none
Referrer-Policy:
schema:
type: string
example: strict-origin-when-cross-origin
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: none
Cache-Control:
schema:
type: string
example: no-cache
Set-Cookie:
schema:
type: string
example: _shyft_api_server_session=czZ0NVJzUnA2bWU0ZVRYNXd1V05LZURTSzlFbDAySmk0TlpQSk5EMk9HSlBIRndRc05iR2d5NDI2aDBxeTlNaWU0OGphbFZDTXhjVFlYS3V2dTh4UkE9PS0tVDJQbFNWSXFIYUJXbFU1Q1BxYlBOQT09--5b73327d0776e9a4b6acd7e0c70252e5f54e3165; path=/; HttpOnly
X-Rack-Dev-Mark-Env:
schema:
type: string
example: BinLocalServer
X-Request-Id:
schema:
type: string
example: 102c6e21-e9dd-4676-b90b-99ccbbef675a
X-Runtime:
schema:
type: number
example: '0.508853'
Vary:
schema:
type: string
example: Origin
content:
text/plain:
schema:
type: string
examples:
example-0:
summary: update a location - with blob_id
value: null
example-1:
summary: update a location - time_zone
value: null
'401':
description: Unauthorized
headers:
WWW-Authenticate:
schema:
type: string
example: Basic realm="Application"
Content-Type:
schema:
type: string
example: application/json; charset=utf-8
Cache-Control:
schema:
type: string
example: no-cache
X-Rack-Dev-Mark-Env:
schema:
type: string
example: BinLocalServer
X-Request-Id:
schema:
type: string
example: ccb01a29-33e9-429f-b630-d52a0eb1adfb
X-Runtime:
schema:
type: number
example: '0.893943'
Vary:
schema:
type: string
example: Origin
Transfer-Encoding:
schema:
type: string
example: chunked
content:
application/json:
schema:
type: object
example:
error: You need to sign in or sign up before continuing.
'404':
description: Not Found
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
example:
errors:
not_found:
- Couldn't find Location with 'id'=99999
/api/customer/user_role/locations/{swift_code}/look_up:
get:
tags:
- Customer > Locations > user_role
summary: '[2.0] get a location by swift_code only'
description: "Description\n- - - \n- Get a location object\n- `location_id` coulld be `ID` or `Swift Code`\n\n\nParams\n- - -\nParam | Values | R |Description\n--- | --- | --- | ---\n\n\nHeaders\n- - -\nHeader | Values | R |Description\n--- | --- | --- | ---\n\n\n\nInput\n- - - \nAttribute | Values | R |Description\n--- | --- | --- | ---"
parameters:
- name: Session-Uukey
in: header
schema:
type: string
example: '{{session_uukey}}'
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: swift_code
in: path
schema:
type: string
required: true
responses:
'200':
description: OK
headers:
Server:
schema:
type: string
example: nginx/1.19.3
Date:
schema:
type: string
example: Tue, 31 Aug 2021 21:03:42 GMT
Content-Type:
schema:
type: string
example: application/json; charset=utf-8
Transfer-Encoding:
schema:
type: string
example: chunked
Connection:
schema:
type: string
example: keep-alive
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-Download-Options:
schema:
type: string
example: noopen
X-Permitted-Cross-Domain-Policies:
schema:
type: string
example: none
Referrer-Policy:
schema:
type: string
example: strict-origin-when-cross-origin
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: none
ETag:
schema:
type: string
example: W/"af62b4313ad9ce94a26162cc6e8e910f"
Cache-Control:
schema:
type: string
example: max-age=0, private, must-revalidate
Set-Cookie:
schema:
type: string
example: _shyft_api_server_session=UmFXeXlpUTRCd2pJMXpzREdzUzczMEliVjA5cEJRaFhTOEEwVkhoMkZzdFpwVzBVb3A0cVlXblpYZXREcmc4NW5ocWVWdmZ3NnpiTWxsYjRkSk0wekE9PS0tQ1dJL3JxUFc2Yy84TlIxd0tjMERNQT09--cabf8fd49f4786f239e915b051974903c1d969c1; path=/; HttpOnly
X-Rack-Dev-Mark-Env:
schema:
type: string
example: BinLocalServer
X-Request-Id:
schema:
type: string
example: 58895a6a-f7f8-4907-a740-daae048fa035
X-Runtime:
schema:
type: number
example: '5.237878'
Vary:
schema:
type: string
example: Origin
content:
application/json:
schema:
type: object
example:
location:
_parent_object_id: null
id: 8421
swift_code: GXO1015
location_name: CAON Mississga2 Mississauga Courtneypark Drive West
unit_number: null
street_number: null
address: 300 Courtneypark Drive West
province: 'ON'
postal: L5W 1Y6
country: Canada
lat: null
lng: null
latitude: 43.6288105
longitude: -79.6989678
phone_number: null
created_at: '2021-05-27T21:15:50.121Z'
users_count: 4
formatted_address: 300 Courtneypark Dr W, Mississauga, ON L5W 1Y6, Canada
time_zone: America/Toronto
google_map_id: ChIJpSvGGn9AK4gRbDoT-OfdBoU
four_sq_id: null
allow_tipping: false
shift_require_approval: true
shyft_pro_active: true
shyft_pro_expiry_date: '2031-05-27T22:16:39.655Z'
fence_radius: null
cfg_not_dm: true
cfg_geofence_log: f
# --- truncated at 32 KB (100 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/shyft/refs/heads/main/openapi/shyft-customer-locations-user-role-api-openapi.yml