# Loyalty

## Loyalty

## GET /loyalty/customers

> Retrieve basic details about a Loyalty Customer

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/customers":{"get":{"tags":["loyalty"],"summary":"Retrieve basic details about a Loyalty Customer","parameters":[{"name":"loyaltyCustomerId","description":"The ID of the Loyalty Customer. Note: May not be used in combination with the `email` parameter","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"email","description":"The email address of the Loyalty Customer. Note: May not be used in combination with the `loyaltyCustomerId` parameter","in":"query","schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"An object containing basic details about a Loyalty Customer.","content":{"application/json":{"schema":{"type":"object","properties":{"loyaltyCustomer":{"type":"object","properties":{"loyaltyCustomerId":{"type":"string","format":"uuid"},"minimumVipTierName":{"type":"string"},"points":{"type":"object","properties":{"balance":{"type":"number"}},"required":["balance"]},"status":{"type":"string","enum":["pending","enrolled","blocked"]},"vipTierName":{"type":"string"}},"required":["loyaltyCustomerId","points","status"]}},"required":["loyaltyCustomer"]}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## List ways to earn loyalty points

> Lists the available ways to earn loyalty points. If a Loyalty Customer is specified, this returns ways of earning and amounts tailored to that customer.

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/earning_rules":{"get":{"tags":["loyalty"],"summary":"List ways to earn loyalty points","description":"Lists the available ways to earn loyalty points. If a Loyalty Customer is specified, this returns ways of earning and amounts tailored to that customer.","parameters":[{"name":"loyaltyCustomerId","description":"The ID of the Loyalty Customer. Note: May not be used in combination with the `email` parameter","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"email","description":"The email address of the Loyalty Customer. Note: May not be used in combination with the `loyaltyCustomerId` parameter","in":"query","schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"An object containing a list of earning rules.","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fixed-amount"]},"amount":{"type":"number"}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["points-per"]},"amount":{"type":"number"}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["points-per-spend"]},"amount":{"type":"number"},"waitTimeDays":{"type":"number"}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["submit-review"]},"amountForReview":{"type":"number"},"amountForSocialLogin":{"type":"number"},"amountForImage":{"type":"number"},"amountForVideo":{"type":"number"},"capPerOrder":{"type":"number"},"earnEachAmountOncePer":{"type":"string","enum":["order","review"]}},"required":["type","amountForReview","amountForSocialLogin","amountForImage","amountForVideo","earnEachAmountOncePer"]}]}}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## List ways to redeem loyalty points for rewards

> Lists the available ways to redeem loyalty points for rewards. If a Loyalty Customer is specified, this returns ways of earning and amounts tailored to that customer.

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/redemption_rules":{"get":{"tags":["loyalty"],"summary":"List ways to redeem loyalty points for rewards","description":"Lists the available ways to redeem loyalty points for rewards. If a Loyalty Customer is specified, this returns ways of earning and amounts tailored to that customer.","parameters":[{"name":"loyaltyCustomerId","description":"The ID of the Loyalty Customer. Note: May not be used in combination with the `email` parameter","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"email","description":"The email address of the Loyalty Customer. Note: May not be used in combination with the `loyaltyCustomerId` parameter","in":"query","schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"An object containing a list of redemption rules.","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"redemptionRuleId":{"type":"string","format":"uuid","description":"The unique identifier for the redemption rule."},"appliesToCollections":{"type":"object","description":"Collections that the redeemed reward will be restricted too when applying.","properties":{"collectionId":{"type":"string","description":"The ID of the Shopify collection."},"title":{"type":"string","description":"The title of the Shopify collection."},"url":{"type":"string","description":"The URL of the Shopify collection."}},"required":["collectionId","title"]},"expiresAfterDays":{"type":"number","description":"The number of days until the redeemed reward expires."},"minimumPurchase":{"type":"number","description":"The minimum purchase amount that the reward will be restricted to."},"purchaseType":{"type":"string","enum":["single","subscription","both"],"description":"The purchase type that the reward will be restricted to. Either `single`, `subscription` or `both`."},"recurringCycleLimit":{"type":"number","description":"The number of subscription payments that the reward will be restricted to."}},"required":["redemptionRuleId"],"description":"An object containing the base parameters for a redemption rule."},{"type":"object","properties":{"type":{"type":"string","enum":["fixed-value"]},"reward":{"type":"object","properties":{"awardVia":{"type":"string","enum":["coupon","store-credit"],"description":"The way the customer is being rewarded. Either `coupon` or `store-credit`."},"points":{"type":"number","description":"The points required to redeem the reward."},"value":{"type":"number","description":"The value of the reward."}},"required":["points","value"]}},"required":["type","reward"]}]},{"allOf":[{"type":"object","properties":{"redemptionRuleId":{"type":"string","format":"uuid","description":"The unique identifier for the redemption rule."},"appliesToCollections":{"type":"object","description":"Collections that the redeemed reward will be restricted too when applying.","properties":{"collectionId":{"type":"string","description":"The ID of the Shopify collection."},"title":{"type":"string","description":"The title of the Shopify collection."},"url":{"type":"string","description":"The URL of the Shopify collection."}},"required":["collectionId","title"]},"expiresAfterDays":{"type":"number","description":"The number of days until the redeemed reward expires."},"minimumPurchase":{"type":"number","description":"The minimum purchase amount that the reward will be restricted to."},"purchaseType":{"type":"string","enum":["single","subscription","both"],"description":"The purchase type that the reward will be restricted to. Either `single`, `subscription` or `both`."},"recurringCycleLimit":{"type":"number","description":"The number of subscription payments that the reward will be restricted to."}},"required":["redemptionRuleId"],"description":"An object containing the base parameters for a redemption rule."},{"type":"object","properties":{"type":{"type":"string","enum":["percentage-coupon"]},"reward":{"type":"object","properties":{"points":{"type":"number","description":"The points required to redeem the reward."},"value":{"type":"number","description":"The value of the reward."}},"required":["points","value"]}},"required":["type","reward"]}]},{"allOf":[{"type":"object","properties":{"redemptionRuleId":{"type":"string","format":"uuid","description":"The unique identifier for the redemption rule."},"appliesToCollections":{"type":"object","description":"Collections that the redeemed reward will be restricted too when applying.","properties":{"collectionId":{"type":"string","description":"The ID of the Shopify collection."},"title":{"type":"string","description":"The title of the Shopify collection."},"url":{"type":"string","description":"The URL of the Shopify collection."}},"required":["collectionId","title"]},"expiresAfterDays":{"type":"number","description":"The number of days until the redeemed reward expires."},"minimumPurchase":{"type":"number","description":"The minimum purchase amount that the reward will be restricted to."},"purchaseType":{"type":"string","enum":["single","subscription","both"],"description":"The purchase type that the reward will be restricted to. Either `single`, `subscription` or `both`."},"recurringCycleLimit":{"type":"number","description":"The number of subscription payments that the reward will be restricted to."}},"required":["redemptionRuleId"],"description":"An object containing the base parameters for a redemption rule."},{"type":"object","properties":{"type":{"type":"string","enum":["variable-value"]},"reward":{"type":"object","properties":{"awardVia":{"type":"string","enum":["coupon","store-credit"],"description":"The way the customer is being rewarded. Either `coupon` or `store-credit`."},"points":{"type":"number","description":"The points required to redeem the reward."},"value":{"type":"number","description":"The value of the reward."},"minimumPoints":{"type":"number","description":"The minimum points that can be spent for this reward."},"maximumPoints":{"type":"number","description":"The maximum points that can be spent for this reward."}},"required":["points","value"]}},"required":["type","reward"]}]},{"allOf":[{"type":"object","properties":{"redemptionRuleId":{"type":"string","format":"uuid","description":"The unique identifier for the redemption rule."},"appliesToCollections":{"type":"object","description":"Collections that the redeemed reward will be restricted too when applying.","properties":{"collectionId":{"type":"string","description":"The ID of the Shopify collection."},"title":{"type":"string","description":"The title of the Shopify collection."},"url":{"type":"string","description":"The URL of the Shopify collection."}},"required":["collectionId","title"]},"expiresAfterDays":{"type":"number","description":"The number of days until the redeemed reward expires."},"minimumPurchase":{"type":"number","description":"The minimum purchase amount that the reward will be restricted to."},"purchaseType":{"type":"string","enum":["single","subscription","both"],"description":"The purchase type that the reward will be restricted to. Either `single`, `subscription` or `both`."},"recurringCycleLimit":{"type":"number","description":"The number of subscription payments that the reward will be restricted to."}},"required":["redemptionRuleId"],"description":"An object containing the base parameters for a redemption rule."},{"type":"object","properties":{"type":{"type":"string","enum":["free-shipping"]},"reward":{"type":"object","properties":{"points":{"type":"number","description":"The points required to redeem the reward."},"maximumShipping":{"type":"number","description":"The maximum shipping value that the reward can apply to."}},"required":["points"]}},"required":["type","reward"]}]},{"allOf":[{"type":"object","properties":{"redemptionRuleId":{"type":"string","format":"uuid","description":"The unique identifier for the redemption rule."},"appliesToCollections":{"type":"object","description":"Collections that the redeemed reward will be restricted too when applying.","properties":{"collectionId":{"type":"string","description":"The ID of the Shopify collection."},"title":{"type":"string","description":"The title of the Shopify collection."},"url":{"type":"string","description":"The URL of the Shopify collection."}},"required":["collectionId","title"]},"expiresAfterDays":{"type":"number","description":"The number of days until the redeemed reward expires."},"minimumPurchase":{"type":"number","description":"The minimum purchase amount that the reward will be restricted to."},"purchaseType":{"type":"string","enum":["single","subscription","both"],"description":"The purchase type that the reward will be restricted to. Either `single`, `subscription` or `both`."},"recurringCycleLimit":{"type":"number","description":"The number of subscription payments that the reward will be restricted to."}},"required":["redemptionRuleId"],"description":"An object containing the base parameters for a redemption rule."},{"type":"object","properties":{"type":{"type":"string","enum":["free-product"]},"reward":{"type":"object","properties":{"points":{"type":"number","description":"The points required to redeem the reward."},"productAndVariants":{"type":"object","properties":{"product":{"type":"object","properties":{"id":{"type":"string","description":"The Shopify ID of the product."},"name":{"type":"string","description":"The name of the product."},"imageUrl":{"type":"string","description":"The URL of the image of the product."},"url":{"type":"string","description":"The URL of the product."}},"required":["id","name"]},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The Shopify ID of the variant."},"title":{"type":"string","description":"The title of the product variant."}},"required":["id","title"]}}},"required":["product"]}},"required":["points","productAndVariants"]}},"required":["type","reward"]}]}]}}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## List active coupons for a loyalty customer

> Lists the active coupons for a customer. If a Loyalty Customer is specified, this returns the most recent coupons that have not been used for that customer.

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/coupons":{"get":{"tags":["loyalty"],"summary":"List active coupons for a loyalty customer","description":"Lists the active coupons for a customer. If a Loyalty Customer is specified, this returns the most recent coupons that have not been used for that customer.","parameters":[{"description":"A limit on the number of items returned. Between 1 and 100. Default 25.","in":"query","name":"limit","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"lastEvaluated","description":"The URL-encoded JSON object representing the cursor for the next page of results.","in":"query","required":false,"schema":{"type":"string"}},{"name":"loyaltyCustomerId","description":"The ID of the Loyalty Customer. Note: May not be used in combination with the `email` parameter","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"email","description":"The email address of the Loyalty Customer. Note: May not be used in combination with the `loyaltyCustomerId` parameter","in":"query","schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"An object containing a list of coupons.","content":{"application/json":{"schema":{"type":"object","properties":{"coupons":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"appliesToCollectionIds":{"type":"array","items":{"type":"string"}},"appliesToProductIds":{"type":"array","items":{"type":"string"}},"displayType":{"type":"string"},"expiryDate":{"type":"string","format":"date-time"},"maximumShipping":{"type":"number"},"minimumPurchase":{"type":"number"},"purchaseType":{"type":"string"},"recurringCycleLimit":{"type":"number"},"value":{"type":"number"},"valueType":{"type":"string"}},"required":["code","description"]}},"nextUrl":{"type":"string","format":"uri"}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## POST /loyalty/adjustment\_transactions

> Adjust the points balance of a Loyalty Customer

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/adjustment_transactions":{"post":{"tags":["loyalty"],"summary":"Adjust the points balance of a Loyalty Customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerIdentifier":{"type":"object","oneOf":[{"properties":{"loyaltyCustomerId":{"type":"string","format":"uuid"}},"required":["loyaltyCustomerId"]},{"properties":{"email":{"type":"string","format":"email"}},"required":["email"]}],"description":"An object identifying the Loyalty Customer by `email` or `loyaltyCustomerId`."},"amount":{"description":"The number of points by which the customer's points balance is to be adjusted. Specify either a positive number to add points or a negative number to remove points.","type":"integer","format":"int32"},"internalReason":{"type":"string","description":"Description of the transaction which is displayed to the store owner."},"notificationText":{"type":"string","description":"Description of the transaction which is displayed to the Customer."}},"required":["customerIdentifier","amount"]}}},"required":true},"responses":{"200":{"description":"The transaction was successfully created and the Loyalty Customer's points balance was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"loyaltyCustomer":{"type":"object","properties":{"points":{"type":"object","properties":{"balance":{"type":"number"}}}}}}}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## POST /loyalty/earning\_transactions

> Trigger a custom earning rule for a Loyalty Customer

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/earning_transactions":{"post":{"tags":["loyalty"],"summary":"Trigger a custom earning rule for a Loyalty Customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string","description":"The action ID of the custom earning rule."},"customerIdentifier":{"type":"object","oneOf":[{"properties":{"loyaltyCustomerId":{"type":"string","format":"uuid"}},"required":["loyaltyCustomerId"]},{"properties":{"email":{"type":"string","format":"email"}},"required":["email"]}],"description":"An object identifying the Loyalty Customer by `email` or `loyaltyCustomerId`."},"value":{"type":"number","description":"The value to be multiplied with the 'points per' value. Required for Custom Points Per Value Rules."}},"required":["actionId","customerIdentifier"]}}},"required":true},"responses":{"200":{"description":"The transaction was successfully created and the Customer was awarded points based on the configured earning rule.","content":{"application/json":{"schema":{"type":"object","properties":{"pointsEarned":{"format":"int64","type":"integer"},"loyaltyCustomer":{"type":"object","properties":{"loyaltyCustomerId":{"format":"uuid","type":"string"},"points":{"type":"object","properties":{"balance":{"type":"number"}}}}}}}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## POST /loyalty/redemption\_transactions

> Redeem a redemption reward for a Loyalty Customer

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/redemption_transactions":{"post":{"tags":["loyalty"],"summary":"Redeem a redemption reward for a Loyalty Customer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerIdentifier":{"type":"object","oneOf":[{"properties":{"loyaltyCustomerId":{"type":"string","format":"uuid"}},"required":["loyaltyCustomerId"]},{"properties":{"email":{"type":"string","format":"email"}},"required":["email"]}],"description":"An object identifying the Loyalty Customer by `email` or `loyaltyCustomerId`."},"redemptionRuleId":{"type":"string","format":"uuid","description":"The unique identifier for the redemption rule."},"variableValue":{"type":"object","properties":{"points":{"type":"number","description":"The number of points the customer is redeeming for a variable reward. Must be a positive integer."},"value":{"type":"number","description":"The value of the variable reward being redeemed. Must be a positive number."}},"required":["points","value"]}},"required":["customerIdentifier","redemptionRuleId"]}}},"required":true},"responses":{"200":{"description":"The redemption transaction was successfully created and the Loyalty Customer's points balance was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"loyaltyCustomer":{"type":"object","properties":{"points":{"type":"object","properties":{"balance":{"type":"number","description":"The current points balance of the loyalty customer."}},"required":["balance"]}}},"transactionDetails":{"type":"object","properties":{"amount":{"type":"number","description":"The number of points spent to redeem the reward."}},"required":["amount"]},"reward":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["completed","pending"],"description":"The status of the reward."},"storeCredit":{"type":"object","properties":{"balanceAmount":{"type":"string","description":"The value of the customer's store credit balance."},"transactionAmount":{"type":"string","description":"The value of the store credit that the customer is being rewarded with."}},"required":["balanceAmount","transactionAmount"]},"type":{"type":"string","enum":["store-credit"],"description":"The reward type."}},"required":["status","type"]},{"type":"object","properties":{"code":{"type":"string","description":"The Shopify coupon code."},"status":{"type":"string","enum":["completed","pending"],"description":"The status of the reward."},"type":{"type":"string","enum":["coupon"],"description":"The reward type."}},"required":["status","type"]}]}},"required":["loyaltyCustomer","transactionDetails"]}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"500":{"description":"Failed to redeem points.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```

## POST /loyalty/customer\_minimum\_vip\_tiers

> Set a Loyalty Customer's minimum VIP Tier

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"loyalty"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/loyalty/customer_minimum_vip_tiers":{"post":{"tags":["loyalty"],"summary":"Set a Loyalty Customer's minimum VIP Tier","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerIdentifier":{"type":"object","oneOf":[{"properties":{"loyaltyCustomerId":{"type":"string","format":"uuid"}},"required":["loyaltyCustomerId"]},{"properties":{"email":{"type":"string","format":"email"}},"required":["email"]}],"description":"An object identifying the Loyalty Customer by `email` or `loyaltyCustomerId`."},"minimumVipTierName":{"type":"string","nullable":true,"description":"The name of the VIP Tier, or null to remove a previously configured minimum VIP Tier."}},"required":["customerIdentifier","minimumVipTierName"]}}},"required":true},"responses":{"200":{"description":"The Loyalty Customer's minimum VIP Tier was updated, in addition to any resultant change to the current VIP Tier.","content":{"application/json":{"schema":{"type":"object","properties":{"minimumVipTierName":{"type":"string"},"vipTierName":{"type":"string"}}}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"403":{"description":"The requested resource is forbidden.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"422":{"description":"The request was well-formed but was unable to be followed due to semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```
