Shyft Customer > Subscriptions API
The Customer > Subscriptions API from Shyft — 6 operation(s) for customer > subscriptions.
The Customer > Subscriptions API from Shyft — 6 operation(s) for customer > subscriptions.
openapi: 3.0.0
info:
title: Shyft Customer Authentication > Email Customer > Subscriptions 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 > Subscriptions
paths:
/api/customer/user_role/subscriptions:
get:
tags:
- Customer > Subscriptions
summary: get my subscriptions
description: Get all my subscriptions
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_is
in: query
schema:
type: string
description: filter my subscriptions by location
example: '{{location_id}}'
- name: channel_id
in: query
schema:
type: string
description: 'filter my subscriptions by channel
'
example: '{{channel_id}}'
- name: channel_type_is[]
in: query
schema:
type: string
example: custom_feed
- name: updated_after
in: query
schema:
type: string
example: '2020-01-01'
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: none
Content-Type:
schema:
type: string
example: application/json; charset=utf-8
ETag:
schema:
type: string
example: W/"f87172b41e74e7cc74ea67109b5ff8ed"
Cache-Control:
schema:
type: string
example: max-age=0, private, must-revalidate
Set-Cookie:
schema:
type: string
example: _shyft_api_server_session=OHBpbjFZUWx3TDNkdU1PdHc0Q29nZU5pSDE4NlphM3U4QzNoUnpodUxZMFNNSGl6NTlveitkZm5vYkVMZ1UxdWNobkdwSHd5Z2pyMldwVGdmYklUTkE9PS0tS2JhVjBFMXFPd3Ayd29Sc05Lallkdz09--8c78032cd9f00355216366f4c25c71afe179dddc; path=/; HttpOnly
X-Rack-Dev-Mark-Env:
schema:
type: string
example: Bin%27s+Local+Server
X-Request-Id:
schema:
type: string
example: d0281080-b5f4-4d5d-b992-2b160c4cb63d
X-Runtime:
schema:
type: number
example: '79.546928'
Vary:
schema:
type: string
example: Origin
Connection:
schema:
type: string
example: close
Server:
schema:
type: string
example: thin
content:
application/json:
schema:
type: object
examples:
example-0:
summary: get my subscriptions - specifying channel types
value:
subscriptions:
- id: 20193
user_id: 1
channel_id: 3979
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 20193
id: 3979
channel_name: New Star Seafood Restaurant
updated_at: '2018-11-14T19:23:57.810Z'
member_count: 63
channel_type: location_feed
description: null
is_admin: false
channel_latest_content: 'Deepa I''m: Hello, my name is Deepa I''m, I made it into this channel, let''s do this!'
associated_location_id: 2029
- id: 22387
user_id: 1
channel_id: 7792
is_admin: true
channel:
_associations_removed: true
_parent_object_id: 22387
id: 7792
channel_name: channelName
updated_at: '2018-12-07T04:42:59.418Z'
member_count: 3
channel_type: custom_feed
description: null
is_admin: true
channel_latest_content: 'Shyft Shyft: Welcome to the private group "channelName". Only those who were invited can see the content in this group.'
associated_location_id: 45
- id: 22363
user_id: 1
channel_id: 7786
is_admin: true
channel:
_associations_removed: true
_parent_object_id: 22363
id: 7786
channel_name: channelName
updated_at: '2018-12-04T19:29:16.184Z'
member_count: 3
channel_type: custom_feed
description: null
is_admin: true
channel_latest_content: null
associated_location_id: 2029
meta:
pagination:
previous_page: null
current_page: 1
next_page: null
per_page: 25
total_pages: 1
total_count: 3
example-1:
summary: get subscriptions
value:
subscriptions:
- _parent_object_id: null
id: 18063
user_id: 9064
channel_id: 7183
user:
_associations_removed: true
_parent_object_id: 18063
id: 9064
active_org: 0
first_name: Bin
last_name: Li
email: bin@myshyft.com
gender: 0
chat_handle: ab4693b99883e10dd5e7d17d0cf71200
user_group: 0
status: ''
post:
tags:
- Customer > Subscriptions
summary: create subscription
requestBody:
content:
'*/*':
schema:
type: string
example: '"{\n \"subscription\": {\n \t\"channel_id\": 3344,\n \"user_id\": 9067\n }\n}\t"'
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: Successful response
content:
application/json: {}
/api/customer/user_role/subscriptions/can_view:
get:
tags:
- Customer > Subscriptions
summary: get viewable subscriptions
description: Get all my subscriptions
parameters:
- name: Session-Uukey
in: header
schema:
type: string
example: '{{session_uukey}}'
- name: Content-Type
in: header
schema:
type: string
example: application/json
- name: channel_id
in: query
schema:
type: integer
description: 'filter my subscriptions by channel
'
example: '4115'
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: none
Content-Type:
schema:
type: string
example: application/json; charset=utf-8
ETag:
schema:
type: string
example: W/"93ee7568f0335ba47b70bc34c5403675"
Cache-Control:
schema:
type: string
example: max-age=0, private, must-revalidate
Set-Cookie:
schema:
type: string
example: _shyft_api_server_session=QWRVSGJ1eDFrb0o4L3FxWkpKVzMrckdUYmJKcXZVenA0a2VYRHRGOE9oOVpxOG52aVpCODlyK0FQL3lFWlpwS2pSd2FadGFkRXYxSmo3NFlpaGhaTXc9PS0tU0FlSSs5ZjJjVUkrZjdBQmNuUWNLQT09--5a3bc9f8c219f5ba7e5267e01c43a504915db137; path=/; HttpOnly
X-Rack-Dev-Mark-Env:
schema:
type: string
example: Bin%27s+Local+Server
X-Request-Id:
schema:
type: string
example: 5a816cad-7875-4776-a41c-3ea06a13c69a
X-Runtime:
schema:
type: number
example: '51.675503'
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:
subscriptions:
- id: 15717
user_id: 8843
channel_id: 4115
is_admin: true
channel:
_associations_removed: true
_parent_object_id: 15717
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15722
user_id: 8848
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15722
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 16901
user_id: 8849
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 16901
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15749
user_id: 8858
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15749
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15741
user_id: 8856
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15741
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15746
user_id: 8861
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15746
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15747
user_id: 8860
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15747
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15751
user_id: 8863
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15751
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 16902
user_id: 8899
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 16902
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 16903
user_id: 8866
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 16903
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15437
user_id: 1
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15437
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15438
user_id: 10
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15438
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15439
user_id: 5
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15439
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15440
user_id: 27
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15440
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15441
user_id: 171
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15441
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15442
user_id: 156
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15442
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15443
user_id: 342
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15443
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15444
user_id: 158
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15444
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15445
user_id: 688
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15445
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15446
user_id: 271
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15446
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15447
user_id: 1087
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15447
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15448
user_id: 3
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15448
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15449
user_id: 8
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15449
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15450
user_id: 2
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15450
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
description: null
is_admin: false
channel_latest_content: 'Shyft : Here is a link to the Old Navy Privacy Policy as it relates to the use of the Shyft mobile application: https://www.myshyft.com/old-navy-privacy.html'
- id: 15451
user_id: 14
channel_id: 4115
is_admin: false
channel:
_associations_removed: true
_parent_object_id: 15451
id: 4115
channel_name: Shyft Pilot Resources
member_count: 3
channel_type: organization_feed
# --- truncated at 32 KB (207 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/shyft/refs/heads/main/openapi/shyft-customer-subscriptions-api-openapi.yml