All URIs are relative to https://api.ynab.com/v1
Method | HTTP request | Description |
---|---|---|
get_payee_location_by_id | GET /budgets/{budget_id}/payee_locations/{payee_location_id} | Single payee location |
get_payee_locations | GET /budgets/{budget_id}/payee_locations | List payee locations |
get_payee_locations_by_payee | GET /budgets/{budget_id}/payees/{payee_id}/payee_locations | List locations for a payee |
PayeeLocationResponse get_payee_location_by_id(budget_id, payee_location_id)
Single payee location
Returns a single payee location
- Bearer Authentication (bearer):
import ynab
from ynab.models.payee_location_response import PayeeLocationResponse
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.PayeeLocationsApi(api_client)
budget_id = 'budget_id_example' # str | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
payee_location_id = 'payee_location_id_example' # str | id of payee location
try:
# Single payee location
api_response = api_instance.get_payee_location_by_id(budget_id, payee_location_id)
print("The response of PayeeLocationsApi->get_payee_location_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PayeeLocationsApi->get_payee_location_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
budget_id | str | The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
payee_location_id | str | id of payee location |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The payee location | - |
404 | The payee location was not found | - |
0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PayeeLocationsResponse get_payee_locations(budget_id)
List payee locations
Returns all payee locations
- Bearer Authentication (bearer):
import ynab
from ynab.models.payee_locations_response import PayeeLocationsResponse
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.PayeeLocationsApi(api_client)
budget_id = 'budget_id_example' # str | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
try:
# List payee locations
api_response = api_instance.get_payee_locations(budget_id)
print("The response of PayeeLocationsApi->get_payee_locations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PayeeLocationsApi->get_payee_locations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
budget_id | str | The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The list of payee locations | - |
404 | No payees locations were found | - |
0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PayeeLocationsResponse get_payee_locations_by_payee(budget_id, payee_id)
List locations for a payee
Returns all payee locations for a specified payee
- Bearer Authentication (bearer):
import ynab
from ynab.models.payee_locations_response import PayeeLocationsResponse
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.PayeeLocationsApi(api_client)
budget_id = 'budget_id_example' # str | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
payee_id = 'payee_id_example' # str | id of payee
try:
# List locations for a payee
api_response = api_instance.get_payee_locations_by_payee(budget_id, payee_id)
print("The response of PayeeLocationsApi->get_payee_locations_by_payee:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PayeeLocationsApi->get_payee_locations_by_payee: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
budget_id | str | The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
payee_id | str | id of payee |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The list of requested payee locations | - |
404 | No payees locations were found | - |
0 | An error occurred | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]