Git Product home page Git Product logo

zoho-books's Introduction

Zoho Books API

IMPORTANT This doesn't support the latest version of ZOHO api

Zoho Books API requests limit

At the time of writing, the API requests limit is 150 requests per minute per organization

Init

$zb = new ZohoBooks('your authentication token', 'your organization id');

The above code will set the API start time

How to get authtoken and organizationId?

Please refer to the official Zoho Books Documentation https://www.zoho.com/books/api/v3/

==========

Contacts

Get all contacts

$contacts = $zb->allContacts();

Get contact by ID

$contact = $zb->getContact(contact_id);

These functions will return a json string if success, false in case of failure

==========

Invoices

Get all invoices

$invoices = $zb->allInvoices();

You can also set a data range

$invoices = $zb->allInvoices('2014-10-07', '2014-10-08');

Get invoice by ID

$invoice = $zb->getInvoice(invoice_id);

These functions will return a json string if success, false in case of failure

Create an invoice

$zb->postInvoice('invoice_json', true);

This function will return true if success, false in case of failure The second parameter is optional, the default value is false, if set to true will send the invoice to the customer

==========

Credit notes

Get all credit notes

$creditNotes = $zb->allCreditNotes();

You can also set a data range

$creditNotes = $zb->allCreditNotes('2014-10-07', '2014-10-08');

Get credit note by ID

$creditNote = $zb->getCreditNote(creditNote_id);

These functions will return a json string if success, false in case of failure

Create a credit note

$zb->postCreditNote('creditNote_json');

This function will return true if success, false in case of failure

==========

Response HTTP Code

$httpCode = $zb->getHttpCode();

This function will return the response HTTP code after an API call.

==========

API requests limit

After each call to one of the methods above, a private method check that we haven't reached the Zoho Books limit. If we've sent 150 requests, the script is sleeped until the end of the minute from the first request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.