Create Gift Card Claim Token
Creates a claim token for a gift card that has to be transferred
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: 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.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
Body
application/json
- Type: stringclientrequired
OAuth client ID provided by the business
- Type: stringuuidrequired
UUID of the gift card for which the claim token needs to be created
Responses
- application/json
Request Example for post/api2/mobile/invitations
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/invitations \
--request POST \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Content-Type: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--header 'Accept: application/json' \
--data '{
"uuid": "ID_GOES_HERE",
"client": "CLIENT_GOES_HERE"
}'
{
"invitation_id": 222,
"invitation_type": "claim_token",
"invitation_date": "2017-03-30T00:08:49+05:30",
"claim_token": "TOKEN_GOES_HERE",
"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"
}
}