All URIs are relative to https://api.brevo.com/v3
| Method | HTTP request | Description |
|---|---|---|
| add_subscription_to_tier | POST /loyalty/tier/programs/{pid}/contacts/{cid}/tiers/{tid} | Assign a tier |
| create_tier_for_tier_group | POST /loyalty/tier/programs/{pid}/tier-groups/{gid}/tiers | Create a tier |
| create_tier_group | POST /loyalty/tier/programs/{pid}/tier-groups | Create a tier group |
| delete_tier | DELETE /loyalty/tier/programs/{pid}/tiers/{tid} | Delete tier |
| delete_tier_group | DELETE /loyalty/tier/programs/{pid}/tier-groups/{gid} | Delete tier group |
| get_list_of_tier_groups | GET /loyalty/tier/programs/{pid}/tier-groups | List tier groups |
| get_loyalty_program_tier | GET /loyalty/tier/programs/{pid}/tiers | List tiers |
| get_tier_group | GET /loyalty/tier/programs/{pid}/tier-groups/{gid} | Get tier group |
| update_tier | PUT /loyalty/tier/programs/{pid}/tiers/{tid} | Update tier |
| update_tier_group | PUT /loyalty/tier/programs/{pid}/tier-groups/{gid} | Update tier group |
TierForContact add_subscription_to_tier(pid, cid, tid)
Assign a tier
Manually assigns a tier to a specific membership.
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
cid = 'cid_example' # str | Contact ID
tid = 'tid_example' # str | Tier ID
try:
# Assign a tier
api_response = api_instance.add_subscription_to_tier(pid, cid, tid)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->add_subscription_to_tier: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| cid | str | Contact ID | |
| tid | str | Tier ID |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tier create_tier_for_tier_group(pid, gid, payload)
Create a tier
Creates a new tier in a loyalty program tier group. (The changes will take effect with the next publication of the loyalty program)
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
gid = 'gid_example' # str | Tier group ID
payload = brevo_python.TierRequest() # TierRequest |
try:
# Create a tier
api_response = api_instance.create_tier_for_tier_group(pid, gid, payload)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->create_tier_for_tier_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| gid | str | Tier group ID | |
| payload | TierRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TierGroup create_tier_group(pid, payload)
Create a tier group
Creates a new tier group in a loyalty program. (The changes will take effect with the next publication of the loyalty program)
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
payload = brevo_python.CreateTierGroupRequest() # CreateTierGroupRequest | Tier group creation payload
try:
# Create a tier group
api_response = api_instance.create_tier_group(pid, payload)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->create_tier_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| payload | CreateTierGroupRequest | Tier group creation payload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_tier(pid, tid)
Delete tier
Deletes a tier from a loyalty program tier group. (The changes will take effect with the next publication of the loyalty program)
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
tid = 'tid_example' # str | Tier ID
try:
# Delete tier
api_response = api_instance.delete_tier(pid, tid)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->delete_tier: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| tid | str | Tier ID |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_tier_group(pid, gid)
Delete tier group
Deletes a tier group from a loyalty program. (The changes will take effect with the next publication of the loyalty program)
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
gid = 'gid_example' # str | Tier group ID
try:
# Delete tier group
api_response = api_instance.delete_tier_group(pid, gid)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->delete_tier_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| gid | str | Tier group ID |
str
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TierGroupPage get_list_of_tier_groups(pid, version=version)
List tier groups
Returns the list of tier groups defined within the loyalty program.
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
version = 'draft' # str | Select 'active' to retrieve list of all tier groups which are live for clients. Select draft to retrieve list of all non deleted tier groups. (optional) (default to draft)
try:
# List tier groups
api_response = api_instance.get_list_of_tier_groups(pid, version=version)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->get_list_of_tier_groups: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| version | str | Select 'active' to retrieve list of all tier groups which are live for clients. Select draft to retrieve list of all non deleted tier groups. | [optional] [default to draft] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoyaltyTierPage get_loyalty_program_tier(pid, version=version)
List tiers
Returns the list of tiers defined within the loyalty program.
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
version = 'draft' # str | Select 'active' to retrieve list of all tiers which are live for clients. Select draft to retrieve list of all non deleted tiers. (optional) (default to draft)
try:
# List tiers
api_response = api_instance.get_loyalty_program_tier(pid, version=version)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->get_loyalty_program_tier: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| version | str | Select 'active' to retrieve list of all tiers which are live for clients. Select draft to retrieve list of all non deleted tiers. | [optional] [default to draft] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TierGroup get_tier_group(pid, gid, version=version)
Get tier group
Returns tier group information.
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
gid = 'gid_example' # str | Tier group ID
version = 'draft' # str | Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group. (optional) (default to draft)
try:
# Get tier group
api_response = api_instance.get_tier_group(pid, gid, version=version)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->get_tier_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| gid | str | Tier group ID | |
| version | str | Select active to retrieve active version of tier group. Select draft to retrieve latest changes in tier group. | [optional] [default to draft] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tier update_tier(pid, tid, payload)
Update tier
Modifies an existing tier for the specified tier group (The changes will take effect with the next publication of the loyalty program)
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
tid = 'tid_example' # str | Tier ID
payload = brevo_python.TierRequestPutPayload() # TierRequestPutPayload |
try:
# Update tier
api_response = api_instance.update_tier(pid, tid, payload)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->update_tier: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| tid | str | Tier ID | |
| payload | TierRequestPutPayload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TierGroup update_tier_group(pid, gid, payload)
Update tier group
Updates a tier group from a loyalty program. (The changes will take effect with the next publication of the loyalty program)
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.TierApi(brevo_python.ApiClient(configuration))
pid = 'pid_example' # str | Loyalty Program ID
gid = 'gid_example' # str | Tier group ID
payload = brevo_python.UpdateTierGroupRequest() # UpdateTierGroupRequest | Tier group update payload
try:
# Update tier group
api_response = api_instance.update_tier_group(pid, gid, payload)
pprint(api_response)
except ApiException as e:
print("Exception when calling TierApi->update_tier_group: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pid | str | Loyalty Program ID | |
| gid | str | Tier group ID | |
| payload | UpdateTierGroupRequest | Tier group update payload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]