Posts Tagged ‘api’

29 April, 2014 — Development

Debitoor API Helper Class Version 2.0

Last year I published a PHP API Helper class for the ever-growing Debitoor accounting software. The API is a RESTful API meaning it responds to JSON and HTTPS requests.

As I have got to use this class in projects of mine, I have built upon this class adding improvements and a new Debitoor class that will process your requests for you returning a clean PHP array ready for you to use.

So what has changed?

You can find a list below of what I changed in this release and some newly added files.

Example.php

//Debitoor API Class
// Code by Daniel Roizer - http://thatblogger.co
// v2.0

define(req_code, "REQUEST_CODE");
define(clientID, "CLIENT_ID");
define(clientSecret, "SECRET_KEY");
define(token, "TOKEN_FROM_API");
define(apiURL, "https://app.debitoor.com/api/v1.0/");

require_once("debitoorapi.class.php");
require_once("debitoor.class.php");

$debitoor = new Debitoor();

// Get list of clients as an array()
print_r($debitoor->GetCustomers());

// Get list of products as an array()
print_r($debitoor->GetProducts());

// Add a client
print_r($debitoor->AddClient($name, $address, $phone, $email, $homepage, $cinumber, $vatnumber, $countrycode));

Download Now

You can download version 2.0 of the helper class over at GitHub!
– OR –
View on GitHub

This is not part of Debitoor and is code written by myself. If you wish to have something added or have any questions please comment below or submit a ticket over a GitHub.

16 October, 2013 — Development

Debitoor API Helper Class

As you may know if you read my review of Debitoor a few weeks ago, I am a big fan of their service. When I first found Debitoor, they didn’t have an OpenAPI for people to use. I wanted to send data from my website right into Debitoor without the need to enter the information twice. This was when I went over to there feedback forum and requested the public API. They accepted my request and yesterday Debitoor released some exciting news.

There API is now ready to use. I jumped right into it and started developing my application. The API is a RESTful API meaning it responsed to JSON and HTTPS requests. I decided to write a quick PHP helper class to allow quick sending and receiving of data to the Debitoor API.

You can download version 1.0 of the helper class here!

This is not part of Debitoor and is code written by myself. If you wish to have something added or have any questions please comment below.

UPDATE: Please also find this on GitHub