The Griffin Developer Hub

Welcome to the Griffin developer hub. You'll find comprehensive guides and documentation to help you start working with us as quickly as possible, as well as support if you get stuck. Let's jump right in!

Exporting your Data

Exporting via the Application

Your general ledger can be exported simply using the application. Simply log in
and navigate to the Ledger menu option.

An Export Data button is available in the top-right.

Exporting via the API

📘

The below documentation assumes you know your API key and organisation ID. These are referred to as $API_KEY and $ORGANISATION_ID in code samples. If you don't have your organisation ID available, refer to Navigating the API

You can also export via the API. Exports via the API require providing a posting date range.

curl 'https://api.griffin.sh/v0/organizations/$ORGANISATION_ID/exports' \
  -H "Authorization: GriffinAPIKey $API_KEY"
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '
{
  "export-format": "text/csv",
  "posting-from-time": "2021-01-01T00:00:00Z",
  "posting-to-time":"2121-01-01T00:00:00Z"
}'

The response will show that an export job has been received and is pending:

{
    "export-format": "text/csv",
    "export-status": "pending",
    "posting-from-time": "2021-01-01T00:00:00.000Z",
    "posting-to-time": "2121-01-01T00:00:00.000Z",
    "export-url": "/v0/exports/ex.NSaDmaC1WVulqHEbnadcPw"
}

This API is asynchronous. Rather than waiting for a response, the Griffin API responds immediately, and provides a URL for you to poll: export-url. You can poll this URL until export-status changes from pending to ready. This will look like:

{
    "export-format": "text/csv",
    "export-status": "ready",
    "posting-from-time": "2021-01-01T00:00:00.000Z",
    "posting-to-time": "2121-01-01T00:00:00.000Z",
    "export-url": "/exports/ex.NSaDmaC1WVulqHEbnadcPw",
    "temporary-download-url": "https://griffin-organization-exports.s3.eu-west-2.amazonaws.com/UNIQUE_REPORT_URL"
}

The temporary-download-url that you see will be much longer than above. The URL is pre-authorised for the file and can be downloaded directly.

Note that the URL will expire. You should download it immediately.

Format of the CSV

Below is an example of the data you will receive, showing two journal entry ID. All lines with the same journal entry ID were committed to our storage atomically.

id

code

category-name

account-id

account-name

post-date

value-date

direction

amount

je.-ssoeXctUi6KElNFaD7reA

1.13

Assets

ac.kNTfX2oAUrSfNfGz8UQ2CQ

Expenses Provider

2021-06-28T11:17:55.131Z

2021-06-25T09:00:00.000Z

credit

-69.55

je.-ssoeXctUi6KElNFaD7reA

5.23

Expenses

ac.Qpck-P1rVyu0pvGMIUlkDg

Subscriptions

2021-06-28T11:17:55.131Z

2021-06-25T09:00:00.000Z

debit

69.55

je.XbacM1ElXc2yD2JXSVwLtw

1.16

Assets

ac.MkzyQNz7WA-mjMq8cWPRpQ

Business Current Account - Debit Card

2021-06-28T11:18:09.788Z

2021-06-28T11:18:09.788Z

credit

-74.33

je.XbacM1ElXc2yD2JXSVwLtw

5.24

Expenses

ac.-GCsDRUQVXqXJ4fFgfDjVg

IT Software and Consumables

2021-06-28T11:18:09.788Z

2021-06-28T11:18:09.788Z

debit

61.94

je.XbacM1ElXc2yD2JXSVwLtw

2.9

Liabilities

ac.l8Ppq_zNVGWCqlshXIiu6

VAT

2021-06-28T11:18:09.788Z

2021-06-28T11:18:09.788Z

debit

12.39

Each column is defined as so:

  • id: The journal entry ID
  • code and category-name: These represent the account's position in the chart of accounts TODO link!
  • account-id and account-name: The account being debited/credited
  • post-date: The date the journal entry was received by the system
  • value-date: The date the journal entry applies.
  • direction and amount: The amount credited or debited to the account

Note that the first journal entry has a differing value date. From this, you can see that a subscription expense was incurred on the 25th June, but not entered in to the system until the 28th June.

Updated about a month ago

Exporting your Data


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.