Working with Cin7 Core’s API

 

Everything You Need To Know

API coding

This article is intended as a summary of some of the best practices and considerations for connecting to the Cin7 Core API – in this case, for sending sales into Cin7 Core – although the logic applies to any connection.

Obviously, there’s a ton of specific detail per client and per connection, but the information below should give a great start for anyone wanting to work with the API.

Firstly, please note that Cin7 Core has a completely open RESTful API with JSON format calls, and in a general sense, you should find that pretty much everything you need for day-to-day operations is accessible. The API is used by Amazon, Shopify, Xero, QuickBooks Online and many more, so most database information is available.

Our general suggestion for the best way to start is to review the documentation at https://dearinventory.docs.apiary.io/. This contains information on accessing, query examples, response examples and property information. It’s highly likely that after this, you may well have queries on how to perform specific tasks and for this, it’s always worth engaging an expert.

Before looking at the API itself, let’s review what’s what's in the front end of the Cin7 Core API.

The easiest way to test the API is to find a transaction which is in the state you want, or of the style that you want, and then perform a “GET” from the API to review the information, example.

https://inventory.dearsystems.com/ExternalApi/v2/sale?ID=[INSERTSALEIDHERE]

Note, this will give you a LOT of information. My example here has over 600 lines because you have an Order, Fulfilment, Invoice, Credit and more.

You don’t need all this information. For the latest field overview, including restrictions (i.e. which fields need to be specific lengths or values) as well as which are required, see the Cin7 Core API guide at https://dearinventory.docs.apiary.io/#

If you only want to send a Sales Order in (terminology is important here), then you don’t need all the fulfilment, invoice, credit etc. information. That would look something like the below.

As mentioned in the previous videos, you can send a sale, and then send various updates as you need to mark something PICKED, PACKED, INVOICED etc. Let’s start with the Order Lines, then Pick, and look at a practical example.

From that point, you can follow this call with various update calls using the same logic (i.e. making sure you have the Sales ID, and also making sure you replicate the ‘front end’ process. In other words, you cannot pack before pick, you can’t credit what you haven’t already got on an invoice, and so on.

Obviously, there are several hundred different API calls, so we suggest a 1-1 discussion with us if you have specific client needs, but hopefully this is a good overview of some of the common best practises and first steps with the Cin7 Core Inventory API.

 

More Blog Posts Like This

Dan Fairbairn

Recovering Brit, using a blend of coffee, natural intuition and years of experience to lead the team towards a more impactful future.

Previous
Previous

Pricing in Cin7 Core

Next
Next

Margin vs Mark-Up