Shyft Customer > Comments API

The Customer > Comments API from Shyft — 3 operation(s) for customer > comments.

OpenAPI Specification

shyft-customer-comments-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Shyft Customer Authentication > Email Customer > Comments 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 > Comments
paths:
  /api/customer/user_role/comments:
    get:
      tags:
      - Customer > Comments
      summary: get comments
      description: please supply `post_id` for getting commeents for particular post
      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[nested]
        in: query
        schema:
          type: integer
        example: '2'
      - name: response[keep]
        in: query
        schema:
          type: string
        example: like_owners
      - name: post_id
        in: query
        schema:
          type: integer
        example: '143548'
      responses:
        '200':
          description: Successful response
          content:
            application/json: {}
    post:
      tags:
      - Customer > Comments
      summary: create comment
      requestBody:
        content:
          '*/*':
            schema:
              type: string
              example: '" {\n    \"comment\": {  \n\t    \"source_id\": \"22120\",\n\t    \"content\": \"Here is my comment!\"\n\t}\n}"'
      parameters:
      - name: Session-Uukey
        in: header
        schema:
          type: string
        example: '{{session_uukey}}'
      - name: Content-Type
        in: header
        schema:
          type: string
        example: application/json
      responses:
        '201':
          description: Created
          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/"1925589f0f845d77954b1c01320a724c"
            Cache-Control:
              schema:
                type: string
                example: max-age=0, private, must-revalidate
            Set-Cookie:
              schema:
                type: string
                example: _shyft_api_server_session=QVFUV1d5RW5TMHQycWh3eGdUL1pjQnRrSElUTHZtU0IwcmxrNGVpNEw2ODV0RUpDcVU2QnJrY3JEd2NvVlA1bFB1ZjJYSTM1OGFudkFMTE9BcnEvNkNSR3ZDMEc3TGUrZnJKbTlOdjRXOVhKS0M4aWUxb2lNVE1Zdmg3ODRDUytJNmczaXVUV3pHWHhkQ0h4ZGFxeVhBQ0htZ1BjejZjZzUwcTZVdURxdldPdGtUVHR4YlNYTjBzb3luVHNkQUdZdWVvRXhINmtyQWZ1MkFnNmRmSkFhbDlXTitiZjZ5MFRqVGFVQTY1aGNOcz0tLUlQZ0pkUXBJV29QQkxIN2RPMHdKb0E9PQ%3D%3D--236d143e2721d800baa7c371b62c123ce7feaed6; path=/; HttpOnly
            X-Rack-Dev-Mark-Env:
              schema:
                type: string
                example: Bin%27s+Local+Server
            X-Request-Id:
              schema:
                type: string
                example: d3b144b1-f5c4-4572-ad10-ef8af0f4b74a
            X-Runtime:
              schema:
                type: number
                example: '26.358253'
            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
              example:
                comment:
                  _parent_object_id: null
                  id: 6247
                  content: Here is my comment!
                  source_id: 22120
                  likes_count: 0
                  created_at: '2018-10-16T04:15:42.800Z'
                  liked: false
                  flagged: false
                  allow_delete: true
                  owner:
                    _parent_object_id: 6247
                    id: 9064
                    active_org: 0
                    first_name: Bin
                    last_name: Li
                    email: bin+104@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:
                      _parent_object_id: 9064
                      id: 11336
                      email: bin+104@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: '18880006511'
                      profile_image_thumb_url: https://coffeemobile.s3.amazonaws.com/images/thumb/8352_data.?1512600950
                      admin_claim_pending: false
                      current_availability: null
                      location:
                        _associations_removed: true
                        _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
                        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
                      user:
                        _associations_removed: true
                        _parent_object_id: 11336
                        id: 9064
                        active_org: 0
                        first_name: Bin
                        last_name: Li
                        email: bin+104@myshyft.com
                        gender: 0
                        chat_handle: ab4693b99883e10dd5e7d17d0cf71200
                        user_group: 0
                        status: ''
  /api/customer/user_role/comments/7093:
    get:
      tags:
      - Customer > Comments
      summary: get a single comment
      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/comments/6649:
    delete:
      tags:
      - Customer > Comments
      summary: delete comment
      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: {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    noauthAuth:
      type: http
      scheme: noauth