Skip to main content
GET
/
transactions
/
templates
import cobo_waas2
from cobo_waas2.models.approval_template import ApprovalTemplate
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.TransactionsApi(api_client)
    template_key = "withdrawal"
    template_version = "1.0.0"

    try:
        # List transaction templates
        api_response = api_instance.list_transaction_templates(
            template_key, template_version=template_version
        )
        print("The response of TransactionsApi->list_transaction_templates:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling TransactionsApi->list_transaction_templates: %s\n"
            % e
        )

[
  {
    "business_key": "transaction_withdrawal",
    "template_text": "{{user_name}} requests to withdraw {{amount}} {{currency}} from the account.",
    "template_version": "1.0.0"
  }
]
import cobo_waas2
from cobo_waas2.models.approval_template import ApprovalTemplate
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.TransactionsApi(api_client)
    template_key = "withdrawal"
    template_version = "1.0.0"

    try:
        # List transaction templates
        api_response = api_instance.list_transaction_templates(
            template_key, template_version=template_version
        )
        print("The response of TransactionsApi->list_transaction_templates:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling TransactionsApi->list_transaction_templates: %s\n"
            % e
        )

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Query Parameters

template_key
string
required

Key of the transaction template used to create an approval message.

template_version
string

Version of the template.

Response

Successfully retrieved approval templates.

business_key
string

Business key used to identify the type of approval template.

Example:

"transaction_withdrawal"

template_text
string

Text content defined in the approval template used to generate approval messages shown to users

Example:

"{{user_name}} requests to withdraw {{amount}} {{currency}} from the account."

template_version
string

Version of the approval template.

Example:

"1.0.0"