zaepho.zohobooks.zohobooks_vendor_info module – Retrieve ZohoBooks vendor 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_vendor_info.
New in zaepho.zohobooks 0.3.0
Synopsis
Retrieve information about vendors in ZohoBooks
Can retrieve a specific vendor by name or ID, or list all vendors
Optionally filter vendors by status (active, inactive, or all)
Parameters
Parameter |
Comments |
|---|---|
ZohoBooks API access token Can also be set via ZOHO_ACCESS_TOKEN environment variable |
|
ZohoBooks API domain Can also be set via ZOHO_API_DOMAIN environment variable Default: |
|
ID of the vendor to retrieve Mutually exclusive with contact_name |
|
Name of the vendor to retrieve Mutually exclusive with contact_id |
|
Filter vendors by status Choices:
|
|
ZohoBooks organization ID Can also be set via ZOHO_ORGANIZATION_ID environment variable |
Examples
- name: Get all vendors
zaepho.zohobooks.zohobooks_vendor_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
register: all_vendors
- name: Get vendor by name
zaepho.zohobooks.zohobooks_vendor_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Acme Suppliers"
register: vendor
- name: Get vendor by ID
zaepho.zohobooks.zohobooks_vendor_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_id: "987654321"
register: vendor
- name: Get all active vendors
zaepho.zohobooks.zohobooks_vendor_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
filter_by: "Status.Active"
register: active_vendors
- name: Get all inactive vendors
zaepho.zohobooks.zohobooks_vendor_info:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
filter_by: "Status.Inactive"
register: inactive_vendors
- name: Get vendors using environment variables
zaepho.zohobooks.zohobooks_vendor_info:
contact_name: "Office Depot"
environment:
ZOHO_ORGANIZATION_ID: "123456789"
ZOHO_ACCESS_TOKEN: "your_access_token"
ZOHO_API_DOMAIN: "https://www.zohoapis.com"
register: vendor
- name: Display vendor information
debug:
var: vendor.vendors
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Number of vendors returned Returned: always Sample: |
|
List of vendors matching the criteria Returned: always Sample: |