Get Invitations
Returns the list of pending invitations of a user
Headers
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringUser
- Agent requiredUsed 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
- Type: stringclientrequired
OAuth client ID provided by the business
Responses
- application/json
Request Example for get/api2/mobile/invitations
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/invitations \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE"
}'
[
{
"invitation_id": 221,
"invitation_type": "claim_token",
"invitation_date": "2017-03-29T23:48:00+05:30",
"status": "pending",
"amount": 25,
"gift_card": {
"card_background_image": "IMAGE_URL_GOES_HERE",
"design_id": 4,
"name": "My First Card",
"preferred": false,
"usb_scannable_card_number": "CARD_NUMBER_GOES_HERE",
"users": [
{
"state": "owner",
"email": "test@example.com",
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"avatar_remote_url": null,
"fb_uid": "FB_UID_GOES_HERE",
"user_id": 111111111
}
],
"gift_card_id": "ID_GOES_HERE",
"card_number": "CARD_NUMBER_GOES_HERE",
"created_at": "2016-12-08T20:18:41+05:30",
"epin": "EPIN_GOES_HERE",
"last_fetched_amount": 25,
"last_fetched_at": "2016-12-20T01:00:19+05:30",
"status": "active",
"updated_at": "2016-12-20T01:00:19+05:30",
"uuid": "ID_GOES_HERE"
}
}
]