zaepho.zohobooks.zohobooks_vendor module – Manage ZohoBooks vendors
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.
New in zaepho.zohobooks 0.3.0
Synopsis
Create, update, or delete vendors in ZohoBooks
Manage vendor status (active/inactive)
Idempotent operations based on vendor name
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: |
|
Billing address details |
|
Street address |
|
Attention line |
|
City name |
|
Country name |
|
Fax number |
|
State or province |
|
Second line of address |
|
ZIP or postal code |
|
Legal company name |
|
Display name for the vendor Used for searching and displaying vendors |
|
Currency code for the vendor (e.g., USD, EUR) |
|
Custom field values as a dictionary |
|
Email address of the vendor |
|
Mobile phone number of the vendor |
|
Additional notes about the vendor |
|
ZohoBooks organization ID Can also be set via ZOHO_ORGANIZATION_ID environment variable |
|
Default payment terms in days |
|
Label for the payment terms |
|
Phone number of the vendor |
|
Desired state of the vendor Choices:
|
|
Tax ID or VAT registration number |
|
Type of vendor Choices:
|
|
Website URL of the vendor |
Examples
- name: Create a vendor (using explicit parameters)
zohobooks_vendor:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Acme Suppliers"
company_name: "Acme Suppliers Inc."
vendor_sub_type: "business"
email: "contact@acmesuppliers.com"
phone: "555-1234"
payment_terms: 30
payment_terms_label: "Net 30"
state: present
- name: Create vendor using environment variables
zohobooks_vendor:
contact_name: "Office Depot"
company_name: "Office Depot Inc."
vendor_sub_type: "business"
email: "vendor@officedepot.com"
state: present
environment:
ZOHO_ORGANIZATION_ID: "123456789"
ZOHO_ACCESS_TOKEN: "your_access_token"
ZOHO_API_DOMAIN: "https://www.zohoapis.com"
- name: Create vendor with billing address
zohobooks_vendor:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Tech Solutions"
company_name: "Tech Solutions LLC"
vendor_sub_type: "business"
email: "billing@techsolutions.com"
billing_address:
address: "123 Main Street"
city: "New York"
state: "NY"
zip: "10001"
country: "USA"
state: present
- name: Update an existing vendor
zohobooks_vendor:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Acme Suppliers"
email: "newemail@acmesuppliers.com"
payment_terms: 45
state: present
- name: Mark vendor as inactive
zohobooks_vendor:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Old Supplier"
state: inactive
- name: Mark vendor as active
zohobooks_vendor:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Acme Suppliers"
state: active
- name: Delete a vendor
zohobooks_vendor:
organization_id: "123456789"
access_token: "{{ zoho_access_token }}"
contact_name: "Obsolete Vendor"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the vendor was changed Returned: always |
|
Information about the operation Returned: always |
|
Vendor details Returned: when state is present, active, or inactive Sample: |