PHPackages                             altmind/bill-dot-com-php-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. altmind/bill-dot-com-php-api

ActiveLibrary[API Development](/categories/api)

altmind/bill-dot-com-php-api
============================

Wrapper to Bill.com API

v0.0.4(11y ago)423.5k—0%5[1 PRs](https://github.com/altmind/bill-dot-com-php-api/pulls)Apache 2.0 LicensePHP

Since Jan 19Pushed 10y ago1 watchersCompare

[ Source](https://github.com/altmind/bill-dot-com-php-api)[ Packagist](https://packagist.org/packages/altmind/bill-dot-com-php-api)[ RSS](/packages/altmind-bill-dot-com-php-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

bill-dot-com-php-api
====================

[](#bill-dot-com-php-api)

PHP Bill.com API from  nicely packaged.

Bill.com is software product that allows to manage your company financial flows, organize interaction with suppliers and clients and track your expenses and payables .

This package is heavily influenced by official code samples, but is not limited to code in official sample.

\##Installation This package is "composer"-ed. To use it, just add "altmind/bill-dot-com-php-api": "dev-master" in composer.json deps.

Packagist page:

\##Usage Examples

```
// see APIDoc http://developer.bill.com/api-documentation/api/chart-accounts/

$api = new \BillComApi\BillCom("YOUR_DEV_KEY","YOUR_PASS","YOUR_USERNAME"/*, "HOSTNAME" */);
try{

  // login is optional, it will be performed automatically
  $api->login();

  // list organizations associated with account, also optional. by default, we'll query for orgs and use first.
  echo json_encode($api->list_orgs()).PHP_EOL;
  //Response: [{"orgId":"00123ABCDEFGHIGK4abc","orgName":"ThreadMeUp"}]

  /* Listable eneitties:
  - ApprovalPolicy
  - ApprovalPolicyApprover
  - BankAccount
  - Bill
  - SentPay
  - ChartOfAccount
  - ActgClass
  - Customer
  - CustomerBankAccount
  - CustomerContact
  - Department
  - Employee
  - Invoice
  - ReceivedPay
  - Item
  - Job
  - Location
  - MoneyMovement
  - Organization
  - RecurringBill
  - User
  - Vendor
  - VendorBankAccount
  - VendorCredit
  */
  echo json_encode($api->get_list('Bill')).PHP_EOL;
  //Response: [{"entity":"Bill","id":"00n01JAZAYGWIGY16abc","isActive":"1","vendorId":"00901MRFYEUWEUMIm7gt","invoiceNumber":"1","approvalStatus":"0","invoiceDate":"2015-01-19","dueDate":"2015-02-18","glPostingDate":"2015-01-19","amount":66.67,"scheduledAmount":0,"paidAmount":null,"paymentStatus":"1","description":null,"createdTime":"2015-01-19T11:35:57.000+0000","updatedTime":"2015-01-19T11:35:57.000+0000","payFromBankAccountId":"00000000000000000000","payFromChartOfAccountId":"00000000000000000000","billLineItems":[{"entity":"BillLineItem","id":"bli01PKBRTDWZAN19xm6","billId":"00n01JAZAYGWIGY17x3y","amount":66.67,"chartOfAccountId":"00000000000000000000","departmentId":"00000000000000000000","locationId":"00000000000000000000","jobId":"00000000000000000000","customerId":"00000000000000000000","jobBillable":false,"description":null,"createdTime":"2015-01-19T11:35:58.000+0000","updatedTime":"2015-01-19T11:35:58.000+0000","lineType":"1","itemId":"00000000000000000000","quantity":null,"unitPrice":null,"employeeId":"00000000000000000000","actgClassId":"00000000000000000000"}]}]

  // List specific entity with ID
  echo json_encode($api->read('Bill','00n01JAZAYGWIGY17x3y')).PHP_EOL;
  //Response: {"entity":"Bill","id":"00n01JAZAYGWIGY17x3y","isActive":"1","vendorId":"00901MRFYEUWEUMIm7gt","invoiceNumber":"1","approvalStatus":"0","invoiceDate":"2015-01-19","dueDate":"2015-02-18","glPostingDate":"2015-01-19","amount":66.67,"scheduledAmount":0,"paidAmount":null,"paymentStatus":"1","description":null,"createdTime":"2015-01-19T11:35:57.000+0000","updatedTime":"2015-01-19T11:35:57.000+0000","payFromBankAccountId":"00000000000000000000","payFromChartOfAccountId":"00000000000000000000","billLineItems":[{"entity":"BillLineItem","id":"bli01PKBRTDWZAN19xm6","billId":"00n01JAZAYGWIGY17x3y","amount":66.67,"chartOfAccountId":"00000000000000000000","departmentId":"00000000000000000000","locationId":"00000000000000000000","jobId":"00000000000000000000","customerId":"00000000000000000000","jobBillable":false,"description":null,"createdTime":"2015-01-19T11:35:58.000+0000","updatedTime":"2015-01-19T11:35:58.000+0000","lineType":"1","itemId":"00000000000000000000","quantity":null,"unitPrice":null,"employeeId":"00000000000000000000","actgClassId":"00000000000000000000"}]}

  // List specific entity with filter, limit and sort
  echo json_encode($api->get_list('Vendor', array(
      "start" => 0,
      "max" => 999,
      "filters" => array(
          array(
              "field" => "createdTime",
              "op" => "
