Enhance API to allow custom accounting integration

We are currently investigating whether to move to Breww as our brewery management package.

We use a local accounting package that Breww has no intention of integrating with right now, so we are investigating how to build our own using the API. Unfortunately, right now the API seems to be read-only.

We would like to update a few fields in orders to simplify synchronisation, such as the uploaded_to_accountancy_provider, order_status and payment_status fields.

A bonus would be if we could also show payments in Breww, e.g. be able to create payments using the API.

1 Like

Thanks for the suggestion, Kees.

We certainly could look into making these options available via the API.

  • It would be possible to allow you to set the uploaded_to_accountancy_provider field (and store an external ID too, if needed).
  • The order_status is a little more complicated, to be honest, but it would be an option (as not all orders can be updated to all statuses at all times).
  • The payment_status cannot be updated manually, but if we allowed you to add payments via the API, then this would automatically recalculate the payment status for you.

We’ve had many requests for different accounting integrations, but often, very few customers looking for the same platforms, which is likely why we’re not able to build the integration that you are looking for right now. We have been considering building a generic CSV/Excel accounting “integration” which would allow you to export transactions from Breww in a format configured by you (to match the format required by your accounting platform). It would be able to track which invoices (for example) have been exported already, so it would be easy to not pull duplicates from Breww. There would also be some import options (e.g. for payments).

We think this might be a better option for us to choose as it would help out lots of customers, as it should be able to work for the platform you use, as well as many others that we don’t yet have “full” support for. Is this something that would work for you? And would you prefer this to Breww API changes, where you have to build the integration yourself?

Hi Luke,

I totally get why you can’t work with every accountancy package, there are so many out there.

Although CSV/Excel style exports would be useful to those customers that don’t know any better, don’t underestimate how many brewers have access to (some) development skills :smile:

Our Master Brewer is an ex-developer so he hates doing manual work that can be automated. I’m a retired developer helping him out.

For us, we’d really appreciate it if Breww had a few “update/insert” APIs. The uploaded_to_accountancy_provider field update is our immediate concern, as otherwise we need to use some artificial filter method like date ranges, and we would have to reconcile invoices in the accounting package, making the code more complicated.

When you do build the CSV export, I suggest adding it to the API as well. This would allow for a simple “shell script style” download/upload, so that there is at least some automation.

PS when we do build something, we will open source it so this is useful for others as well. We will likely start with GitHub - php-twinfield/twinfield: PHP 7.3+ Library for using the Twinfield API. as a base block to talk to our accounting package.


Thanks Kees.

This is really useful to know and we really appreciate the idea to open source what you build :pray:

We’ll see what we can do regarding these fields in the API. Although uploaded_to_accountancy_provider is exposed as readable in the API, this was never intended to be writable by others, and works in conjuction with other fields on our side - such as the external ID and also which accounting integration made the upload (as you can enabled multiple accounting integrations at the same time in Breww) - so we’ll need to make sure that we don’t cause any problems here.

We’ve an idea for how best to go about this and so we’ll look to expose this functionality for you and will get back to you soon with an update :+1:

I’ve now finished my first take at sending Breww invoices to Twinfield using the Breww read-only API and the Twinfield API.

See GitHub - keesverruijt/breww_twinfield_php: Synchronisation of sales transactions from Breww to Twinfield

In the mean time I heard that you are now considering doing Twinfield integration, which would be great as it means we don’t have to maintain this ourselves. I hope what I wrote helps you bootstrap your own code, even if you’re not using PHP…

1 Like

Thanks Kees, I appreciate you sending this over. It looks like you’ve already found neat solutions to some quirks, so should be really handy.

We’ll update you when we know more :+1: