zaepho.zohobooks.zohobooks_account_info module – Retrieve ZohoBooks chart of accounts information
Note
This module is part of the zaepho.zohobooks collection (version 0.3.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install zaepho.zohobooks.
To use it in a playbook, specify: zaepho.zohobooks.zohobooks_account_info.
New in zaepho.zohobooks 0.2.0
Synopsis
Retrieve information about accounts in ZohoBooks chart of accounts
Can retrieve a specific account by name or ID, or list all accounts
Parameters
Parameter |
Comments |
|---|---|
ZohoBooks API access token Can also be set via ZOHO_ACCESS_TOKEN environment variable |
|
ID of the account to retrieve Mutually exclusive with account_name |
|
Name of the account to retrieve Mutually exclusive with account_id |
|
ZohoBooks API domain Can also be set via ZOHO_API_DOMAIN environment variable Default: |
|
ZohoBooks organization ID Can also be set via ZOHO_ORGANIZATION_ID environment variable |
Examples
- name: Get all accounts
zaepho.zohobooks.zohobooks_account_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
register: all_accounts
- name: Get account by name
zaepho.zohobooks.zohobooks_account_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
account_name: "Business Checking"
register: account
- name: Get account by ID
zaepho.zohobooks.zohobooks_account_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
account_id: "987654321"
register: account
- name: Get accounts using environment variables
zaepho.zohobooks.zohobooks_account_info:
account_name: "Business Savings"
environment:
ZOHO_ORGANIZATION_ID: "123456789"
ZOHO_ACCESS_TOKEN: "your_access_token"
ZOHO_API_DOMAIN: "https://www.zohoapis.com"
register: account
- name: Display account information
debug:
var: account.accounts
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
List of accounts matching the criteria Returned: always Sample: |
|
Number of accounts returned Returned: always Sample: |