# Claim Loyalty Card v2.0Beta
The Claim Loyalty Card endpoint adds a physical loyalty card to a customers profile at our loyalty provider. The card will immediately reflect on the customers Loyalty Membership.
# Request
POST /v2.0/customers/{profileKey}/loyalty/cards
# Authorization
An OAuth 2.0 Bearer token with the Loyalty.Write
scope is required. For more information, see Authentication.
# Path Parameters
A list of the supported path parameters is described below.
Name | Required | Type | Description |
---|---|---|---|
profileKey | true | guid | The profile key for the customer. This value can be retrieved from the profileKey claim in the token returned from our SSO solution. |
# Request Body
The request body takes an ClaimCard object which is described below.
# ClaimCard
Name | Required | Type | Description |
---|---|---|---|
cardNumber | true | string(16) | The card number for the physical loyalty card that the customer wishes to claim. |
# Sample
{
"cardNumber": "1234567890123456"
}
# Response
200
OK
Returns an ApiResponse envelope.
# Response Body
The endpoint returns our ApiResponse envelope.
# Sample
{
"message": "The request succeeded!",
"notifications": [
{
"severity": "Success",
"text": "The loyalty card was added.",
"code": null,
"additionalData": null
}
]
}
# Errors
The standard error responses apply.
400
Bad Request
When the request fails validation.
401
Unauthorized
When authentication fails.
403
Forbidden
When authorisation fails.
404
Not Found
When the customer profile cannot be found.