Py Zoho Books API
Project description
PyZohoBooksAPI
Usage:
-
Authentication:
from PyZohoBooksAPI import ZohoAuth auth = ZohoAuth( client_id='your_client_id', client_secret='your_client_secret' ) # generating token status, token = auth.generate_token(code='your_code') print(status) # >>> 200 print(token) # >>> {'access_token': '1000.60062cb11995ad4c5395a31ae680fa09.d3438f753f4e64021aad100323e9cbb1', 'api_domain': 'https://www.zohoapis.com', 'token_type': 'Bearer', 'expires_in': 3600} # refreshing token status, refreshed_token = auth.refresh_token(refresh_token='1000.455b2011ed031afa48df852cfcfe7f9b.0aeb72a01ad1841ccbf5df8e548f9445')) print(status) # >>> 200 print(refreshed_token) # >>> {'access_token': '1000.ce1d8d22982db8d5c80ea8c8903ca458.b53a0d99b4b0325f4ff554a8a452a92b', 'api_domain': 'https://www.zohoapis.com', 'token_type': 'Bearer', 'expires_in': 3600}
-
Contacts
from PyZohoBooksAPI import Contacts contacts = Contacts(token='your_token', organization_id='your_organization_id') # getting all contacts status, all_contacts = contacts.contacts_list() print(status) # >>> 200 print(all_contacts) # >>> list_of_your_contacts # get contacts by id: status, contact = contacts.get_contact(contact_id='3168296000000075177') print(contact) # >>> your_contact # check contacts by email: status, contact = contacts.check_by_email(email='marawan6569@gmail.com') print(contact) # >>> your_contact # creating new contact status, contact = contacts.create_contact(contact_data={}) print(contact) # >>> your_contact
-
Invoices
from PyZohoBooksAPI import Invoices invoices = Invoices(token='your_token', organization_id='your_organization_id') invoice = invoices.create_invoice(invoice_data={}) invoice = invoices.email_an_invoice(invoice_id='your_invoice_id', email_data={})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyZohoBooksAPI-0.0.0.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for PyZohoBooksAPI-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7661c4ae688b146b1b3ee867f7c4d9f3af7b490477160a9da24e0d7d46c263d |
|
MD5 | 86ad7e6a066a66a4328066b233fb61f8 |
|
BLAKE2b-256 | 6e020ed7524ef0e07d76266fbddc86b456481c0be99863179f162c5e0b6fc0ad |