Loyalty

Endpoints related to Okendo Loyalty

Loyalty

Retrieve basic details about a Loyalty Customer

get
Authorizations
Query parameters
loyaltyCustomerIdstring · uuidOptional

The ID of the Loyalty Customer. Note: May not be used in combination with the email parameter

emailstring · emailOptional

The email address of the Loyalty Customer. Note: May not be used in combination with the loyaltyCustomerId parameter

Example: [email protected]
Responses
200

An object containing basic details about a Loyalty Customer.

application/json
get
GET /enterprise/loyalty/customers HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Accept: */*
{
  "loyaltyCustomer": {
    "loyaltyCustomerId": "123e4567-e89b-12d3-a456-426614174000",
    "minimumVipTierName": "text",
    "points": {
      "balance": 1
    },
    "status": "pending",
    "vipTierName": "text"
  }
}

List ways to earn loyalty points

get

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.

Authorizations
Query parameters
loyaltyCustomerIdstring · uuidOptional

The ID of the Loyalty Customer. Note: May not be used in combination with the email parameter

emailstring · emailOptional

The email address of the Loyalty Customer. Note: May not be used in combination with the loyaltyCustomerId parameter

Example: [email protected]
Responses
200

An object containing a list of earning rules.

application/json
get
GET /enterprise/loyalty/earning_rules HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Accept: */*
{
  "rules": [
    {
      "type": "fixed-amount",
      "amount": 1
    }
  ]
}

List ways to redeem loyalty points for rewards

get

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.

Authorizations
Query parameters
loyaltyCustomerIdstring · uuidOptional

The ID of the Loyalty Customer. Note: May not be used in combination with the email parameter

emailstring · emailOptional

The email address of the Loyalty Customer. Note: May not be used in combination with the loyaltyCustomerId parameter

Example: [email protected]
Responses
200

An object containing a list of redemption rules.

application/json
get
GET /enterprise/loyalty/redemption_rules HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Accept: */*
{
  "rules": [
    {
      "redemptionRuleId": "123e4567-e89b-12d3-a456-426614174000",
      "appliesToCollections": {
        "collectionId": 388918313199,
        "title": "Clothing",
        "url": "https://example.myshopify.com/collections/clothing"
      },
      "expiresAfterDays": 1,
      "minimumPurchase": 1,
      "purchaseType": "single",
      "recurringCycleLimit": 1,
      "type": "fixed-value",
      "reward": {
        "awardVia": "coupon",
        "points": 1,
        "value": 1
      }
    }
  ]
}

List active coupons for a loyalty customer

get

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.

Authorizations
Query parameters
limitinteger · int32Optional

A limit on the number of items returned. Between 1 and 100. Default 25.

Example: 25
lastEvaluatedstringOptional

The URL-encoded JSON object representing the cursor for the next page of results.

loyaltyCustomerIdstring · uuidOptional

The ID of the Loyalty Customer. Note: May not be used in combination with the email parameter

emailstring · emailOptional

The email address of the Loyalty Customer. Note: May not be used in combination with the loyaltyCustomerId parameter

Example: [email protected]
Responses
200

An object containing a list of coupons.

application/json
get
GET /enterprise/loyalty/coupons HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Accept: */*
{
  "coupons": [
    {
      "code": "OKRX-XXXXX-XXXX",
      "description": "$10 off",
      "appliesToCollectionIds": [
        "shopify-123456789"
      ],
      "appliesToProductIds": [
        "shopify-123456789"
      ],
      "displayType": "discount",
      "expiryDate": "2025-09-12T16:30:25.334Z",
      "maximumShipping": 1,
      "minimumPurchase": 1,
      "purchaseType": "single",
      "recurringCycleLimit": 1,
      "value": 10,
      "valueType": "fixed_amount"
    }
  ],
  "nextUrl": "https://example.com"
}

Adjust the points balance of a Loyalty Customer

post
Authorizations
Body
customerIdentifierone ofRequired

An object identifying the Loyalty Customer by email or loyaltyCustomerId.

or
amountinteger · int32Required

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.

Example: 10
internalReasonstringOptional

Description of the transaction which is displayed to the store owner.

Example: Gifted points due to bad shipping experience
notificationTextstringOptional

Description of the transaction which is displayed to the Customer.

Example: Gifted Points
Responses
200

The transaction was successfully created and the Loyalty Customer's points balance was updated.

application/json
post
POST /enterprise/loyalty/adjustment_transactions HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 194

{
  "customerIdentifier": {
    "loyaltyCustomerId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "amount": 10,
  "internalReason": "Gifted points due to bad shipping experience",
  "notificationText": "Gifted Points"
}
{
  "loyaltyCustomer": {
    "points": {
      "balance": 1
    }
  }
}

Trigger a custom earning rule for a Loyalty Customer

post
Authorizations
Body
actionIdstringRequired

The action ID of the custom earning rule.

Example: k2d6ne
customerIdentifierone ofRequired

An object identifying the Loyalty Customer by email or loyaltyCustomerId.

or
valuenumberOptional

The value to be multiplied with the 'points per' value. Required for Custom Points Per Value Rules.

Example: 10
Responses
200

The transaction was successfully created and the Customer was awarded points based on the configured earning rule.

application/json
post
POST /enterprise/loyalty/earning_transactions HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 114

{
  "actionId": "k2d6ne",
  "customerIdentifier": {
    "loyaltyCustomerId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "value": 10
}
{
  "pointsEarned": 1,
  "loyaltyCustomer": {
    "loyaltyCustomerId": "123e4567-e89b-12d3-a456-426614174000",
    "points": {
      "balance": 1
    }
  }
}

Redeem a redemption reward for a Loyalty Customer

post
Authorizations
Body
customerIdentifierone ofRequired

An object identifying the Loyalty Customer by email or loyaltyCustomerId.

or
redemptionRuleIdstring · uuidRequired

The unique identifier for the redemption rule.

Responses
200

The redemption transaction was successfully created and the Loyalty Customer's points balance was updated.

application/json
post
POST /enterprise/loyalty/redemption_transactions HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 183

{
  "customerIdentifier": {
    "loyaltyCustomerId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "redemptionRuleId": "123e4567-e89b-12d3-a456-426614174000",
  "variableValue": {
    "points": 100,
    "value": 10
  }
}
{
  "loyaltyCustomer": {
    "points": {
      "balance": 1000
    }
  },
  "transactionDetails": {
    "amount": 100
  },
  "reward": {
    "status": "completed",
    "storeCredit": {
      "balanceAmount": "100",
      "transactionAmount": "10"
    },
    "type": "store-credit"
  }
}

Set a Loyalty Customer's minimum VIP Tier

post
Authorizations
Body
customerIdentifierone ofRequired

An object identifying the Loyalty Customer by email or loyaltyCustomerId.

or
minimumVipTierNamestring | nullableRequired

The name of the VIP Tier, or null to remove a previously configured minimum VIP Tier.

Example: Silver
Responses
200

The Loyalty Customer's minimum VIP Tier was updated, in addition to any resultant change to the current VIP Tier.

application/json
post
POST /enterprise/loyalty/customer_minimum_vip_tiers HTTP/1.1
Host: api.okendo.io
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "customerIdentifier": {
    "loyaltyCustomerId": "123e4567-e89b-12d3-a456-426614174000"
  },
  "minimumVipTierName": "Silver"
}
{
  "minimumVipTierName": "text",
  "vipTierName": "text"
}

Last updated