Creates a friend code for the currently authenticated Loyalty member

A friend code can be redeemed by another member to create a member friend

Licenses Required

  • Vista.Ocapi
  • Vista.Loyalty.Friends
Request
header Parameters
loyaltySessionToken
string

Current Loyalty session token, represents a 'signed-in' member

Connect-Region-Code
string

Region Code

Request Body schema:
required

The values needed to create the member friend code

friendCanUseMemberSubscription
required
boolean

Gets a value indicating whether the created member friend can use the member entity's member subscription

Responses
200

Success

400

Request property is invalid or missing, or member cannot create a friend code.

401

No member authenticated.

429

Too many requests. Try again later.

post/ocapi/v1/members/current/friend-code
Request samples
{
  • "friendCanUseMemberSubscription": true
}
Response samples
application/json
{
  • "friendCode": "string",
  • "expiresAt": "2019-08-24T14:15:22Z"
}