Skip to content

Latest commit

 

History

History
176 lines (125 loc) · 6.66 KB

PayeeLocationsApi.md

File metadata and controls

176 lines (125 loc) · 6.66 KB

ynab_api.PayeeLocationsApi

All URIs are relative to https://api.youneedabudget.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

get_payee_location_by_id

PayeeLocationResponse get_payee_location_by_id(budget_id, payee_location_id)

Single payee location

Returns a single payee location

Example

from __future__ import print_function
import time
import ynab_api
from ynab_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = ynab_api.PayeeLocationsApi(ynab_api.ApiClient(configuration))
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.youneedabudget.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)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeeLocationsApi->get_payee_location_by_id: %s\n" % e)

Parameters

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.youneedabudget.com/#oauth-default-budget)
payee_location_id str id of payee location

Return type

PayeeLocationResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_payee_locations

PayeeLocationsResponse get_payee_locations(budget_id)

List payee locations

Returns all payee locations

Example

from __future__ import print_function
import time
import ynab_api
from ynab_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = ynab_api.PayeeLocationsApi(ynab_api.ApiClient(configuration))
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.youneedabudget.com/#oauth-default-budget)

try:
    # List payee locations
    api_response = api_instance.get_payee_locations(budget_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeeLocationsApi->get_payee_locations: %s\n" % e)

Parameters

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.youneedabudget.com/#oauth-default-budget)

Return type

PayeeLocationsResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_payee_locations_by_payee

PayeeLocationsResponse get_payee_locations_by_payee(budget_id, payee_id)

List locations for a payee

Returns all payee locations for the specified payee

Example

from __future__ import print_function
import time
import ynab_api
from ynab_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: bearer
configuration = ynab_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = ynab_api.PayeeLocationsApi(ynab_api.ApiClient(configuration))
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.youneedabudget.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)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PayeeLocationsApi->get_payee_locations_by_payee: %s\n" % e)

Parameters

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.youneedabudget.com/#oauth-default-budget)
payee_id str id of payee

Return type

PayeeLocationsResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]