Create Feedback

Creates feedback in the system based on the message and/or rating provided by a user

Headers
  • Authorization
    Type: string
    required

    Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE.

  • x-pch-digest
    Type: string
    required

    The signature for the API call

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • Accept-Language
    Type: string

    Preferred language

  • Content-Type
    Type: string
    required

    Set this header to application/json.

  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

Body
application/json
  • checkin_id
    Type: integer

    ID of the check-in for which a user provides feedback

  • client
    Type: string

    OAuth client ID provided by the business

  • facebook_post_id
    Type: integer

    ID of the feedback posted by a user to the user's Facebook account

  • message
    Type: string

    Text feedback that a user provides. At least one of 'message', 'rating', 'photo_url', or 'video_url' must be provided.

  • rating
    Type: integerFormat: int32

    Rating that a user provides. The maximum rating is indicated in themaximum_rating_in_feedback response parameter in the Program Meta API. At least one of 'message', 'rating', 'photo_url', or 'video_url' must be provided.

  • redemption_id
    Type: integer

    ID of the redemption for which a user provides feedback

  • republishable
    Type: boolean

    Whether the feedback message can be republished on a social media platform or not. The default value is "true", so the user must explicitly specify not to allow it.

  • requires_response
    Type: boolean

    Whether the user wants to be contacted by the business for this feedback or not

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api2/mobile/feedbacks
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/feedbacks \
  --request POST \
  --header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
  --header 'x-pch-digest: {{$$.env.signature}}' \
  --header 'Accept: application/json' \
  --header 'Accept-Language: en' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
  --data '{
  "client": "CLIENT_GOES_HERE",
  "message": "Good Coffee.",
  "rating": 5,
  "checkin_id": "8393395",
  "redemption_id": "925805",
  "facebook_post_id": "1496981783892853",
  "republishable": false,
  "requires_response": false
}'
{
  "feedback_id": 267383
}