Transfer a Gift Card Using Invitation Claim Token
Transfers a gift card to a user using the corresponding claim token
Headers
- Type: stringx
-pch -digest requiredThe signature for the API call
- Type: stringAuthorizationrequired
Used to authorize the request with access_token. It should be supplied as
Bearer ACCESS_TOKEN_GOES_HERE. - Type: stringContent
- Type requiredSet this header to application/json.
- Type: stringAcceptrequired
Advertises which content types the client is able to understand
- 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: stringclaim
_token requiredThe claim token generated by the Create Gift Card Claim Token API
- Type: stringclientrequired
OAuth client ID provided by the business
Responses
- application/json
- application/json
Request Example for patch/api2/mobile/invitations/transfer
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/invitations/transfer \
--request PATCH \
--header 'x-pch-digest: {{$$.env.signature}}' \
--header 'Authorization: Bearer ACCESS_TOKEN_GOES_HERE' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--data '{
"client": "CLIENT_GOES_HERE",
"claim_token": "CLAIM_TOKEN_GOES_HERE"
}'
{
"card_background_image": "IMAGE_URL_GOES_HERE",
"design_id": 4,
"name": null,
"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": null,
"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"
}