All URIs are relative to https://api.ynab.com/v1
| Method | HTTP request | Description |
|---|---|---|
| get_payee_by_id | GET /budgets/{plan_id}/payees/{payee_id} | Get a payee |
| get_payees | GET /budgets/{plan_id}/payees | Get all payees |
| update_payee | PATCH /budgets/{plan_id}/payees/{payee_id} | Update a payee |
PayeeResponse get_payee_by_id(plan_id, payee_id)
Get a payee
Returns a single payee
- Bearer Authentication (bearer):
import ynab
from ynab.models.payee_response import PayeeResponse
from ynab.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.ynab.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = ynab.Configuration(
host = "https://api.ynab.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearer
configuration = ynab.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ynab.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ynab.PayeesApi(api_client)
plan_id = 'plan_id_example' # str | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
payee_id = 'payee_id_example' # str | The id of the payee
try:
# Get a payee
api_response = api_instance.get_payee_by_id(plan_id, payee_id)
print("The response of PayeesApi->get_payee_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PayeesApi->get_payee_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| plan_id | str | The id of the plan. "last-used" can be used to specify the last used plan and "default" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
| payee_id | str | The id of the payee |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The requested payee | - |
| 404 | The payee was not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PayeesResponse get_payees(plan_id, last_knowledge_of_server=last_knowledge_of_server)
Get all payees
Returns all payees
- Bearer Authentication (bearer):
import ynab
from ynab.models.payees_response import PayeesResponse
from ynab.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.ynab.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = ynab.Configuration(
host = "https://api.ynab.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearer
configuration = ynab.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ynab.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ynab.PayeesApi(api_client)
plan_id = 'plan_id_example' # str | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
last_knowledge_of_server = 56 # int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. (optional)
try:
# Get all payees
api_response = api_instance.get_payees(plan_id, last_knowledge_of_server=last_knowledge_of_server)
print("The response of PayeesApi->get_payees:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PayeesApi->get_payees: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| plan_id | str | The id of the plan. "last-used" can be used to specify the last used plan and "default" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
| last_knowledge_of_server | int | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The requested list of payees | - |
| 404 | No payees were found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SavePayeeResponse update_payee(plan_id, payee_id, data)
Update a payee
Update a payee
- Bearer Authentication (bearer):
import ynab
from ynab.models.patch_payee_wrapper import PatchPayeeWrapper
from ynab.models.save_payee_response import SavePayeeResponse
from ynab.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.ynab.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = ynab.Configuration(
host = "https://api.ynab.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: bearer
configuration = ynab.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ynab.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ynab.PayeesApi(api_client)
plan_id = 'plan_id_example' # str | The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
payee_id = 'payee_id_example' # str | The id of the payee
data = ynab.PatchPayeeWrapper() # PatchPayeeWrapper | The payee to update
try:
# Update a payee
api_response = api_instance.update_payee(plan_id, payee_id, data)
print("The response of PayeesApi->update_payee:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PayeesApi->update_payee: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| plan_id | str | The id of the plan. "last-used" can be used to specify the last used plan and "default" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan). | |
| payee_id | str | The id of the payee | |
| data | PatchPayeeWrapper | The payee to update |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The payee was successfully updated | - |
| 400 | The request could not be understood due to malformed syntax or validation error(s) | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]