Receipts

Receipts and their files, read automatically (merchant, date, total, VAT), categories, the bin, and reprocessing.

MethodPathSummary
POST/api/companies/:companyId/categoriesAdd a category
PATCH/api/companies/:companyId/categories/:idUpdate a category
GET/api/companies/:companyId/receiptsList receipts
POST/api/companies/:companyId/receiptsAdd a receipt
GET/api/companies/:companyId/receipts/:idGet a receipt
PATCH/api/companies/:companyId/receipts/:idUpdate a receipt
DELETE/api/companies/:companyId/receipts/:idMove a receipt to the bin
POST/api/companies/:companyId/receipts/:id/restoreRestore a receipt from the bin
POST/api/companies/:companyId/receipts/:id/reprocessRead a receipt again
GET/api/companies/:companyId/receipts/:id/file/:kindDecrypted file. Only ever served from here — authenticated and checked against the user's access to this receipt

#Add a category

POST/api/companies/:companyId/categories
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/categories
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger

Request body JSON

NameTypeDescription
namestring
tax_keystring
iconany

Response 201

FieldTypeDescription
idinteger
Example response
JSON
{
  "id": 42
}

Errors

StatusMessage
400Give the category a name
400Unknown tax heading
409There is already a category with that name

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/categories', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"name":"Example name","tax_key":"…","icon":"…"}),
});
const data = await res.json();

#Update a category

PATCH/api/companies/:companyId/categories/:id
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/categories/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequirednumber

Request body JSON

NameTypeDescription
namestring
tax_keystring
archivedany

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400Give the category a name
400Unknown tax heading
404Category not found
409There is already a category with that name

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/categories/12.5', {
  method: 'PATCH',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"name":"Example name","tax_key":"…","archived":"…"}),
});
const data = await res.json();

#List receipts

GET/api/companies/:companyId/receipts
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger

Query parameters

NameTypeDescription
deletedstring1 for the bin.
tax_yearstringA tax year, e.g. 2025-26.
monthanyA month within it.
statusstringProcessing status.
category_idstringA category.
qstringText to search for.
limitnumber
offsetnumber

Response 200

FieldTypeDescription
receiptsarray of any
moreboolean
Example response
JSON
{
  "receipts": [],
  "more": false
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Add a receipt

POST/api/companies/:companyId/receipts

multipart/form-data with the photo or PDF. It's read automatically; check ocr_status.

Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger

Request body

multipart/form-data with the file, plus these fields:

NameTypeDescription
client_refanyYour own reference, so a retried upload isn't added twice.
sourceanyWhere it came from (camera, share, upload).

Response duplicateUpload ? 200 : 201

FieldTypeDescription
idinteger
duplicate_uploadany
Example response
JSON
{
  "id": 42,
  "duplicate_upload": null
}

Errors

StatusMessage
400Attach a photo or PDF of the receipt

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"client_ref":"…","source":"…"}),
});
const data = await res.json();

#Get a receipt

GET/api/companies/:companyId/receipts/:id
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequiredinteger

Response 200

FieldTypeDescription
receiptany
suggestionsarray of any
ocr_textstring
originalobject, or null
original.mimestring
original.bytesinteger
original.sha256string
original.widthinteger, or null
original.heightinteger, or null
possible_duplicatesarray of object
possible_duplicates[].idinteger
possible_duplicates[].merchantstring, or null
possible_duplicates[].totalnumber, or null
possible_duplicates[].receipt_datestring (date), or null
can_editboolean
Example response
JSON
{
  "receipt": null,
  "suggestions": [],
  "ocr_text": "string",
  "original": {
    "mime": "string",
    "bytes": 1,
    "sha256": "string",
    "width": 1,
    "height": 1
  },
  "possible_duplicates": [
    {
      "id": 42,
      "merchant": "string",
      "total": 12.5,
      "receipt_date": "2026-11-12"
    }
  ],
  "can_edit": true
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts/42', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Update a receipt

PATCH/api/companies/:companyId/receipts/:id
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequiredinteger

Request body JSON

NameTypeDescription
merchantstring
descriptionstring
notesstring
payment_methodany
receipt_datestring (date)
business_pctnumberThe business share of it, 0–100.
category_idstring
confirmany

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400A receipt needs a total and a date before it can be saved
403You can't change this receipt

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts/42', {
  method: 'PATCH',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"merchant":"string","description":"string","notes":"string","payment_method":"…","receipt_date":"2026-11-12","business_pct":12.5,"category_id":"string","confirm":"…"}),
});
const data = await res.json();

#Move a receipt to the bin

DELETE/api/companies/:companyId/receipts/:id
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
403You can't delete this receipt

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts/42', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();

#Restore a receipt from the bin

POST/api/companies/:companyId/receipts/:id/restore
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts/:id/restore
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
403You can't restore this receipt

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts/42/restore', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#Read a receipt again

POST/api/companies/:companyId/receipts/:id/reprocess
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts/:id/reprocess
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
400Text can only be read from photos
403You can't change this receipt

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts/42/reprocess', {
  method: 'POST',
  credentials: 'include',
});
const data = await res.json();

#Decrypted file. Only ever served from here — authenticated and checked against the user's access to this receipt

GET/api/companies/:companyId/receipts/:id/file/:kind
Address
https://<your-org>.brambleit.cloud/simplebooks/api/companies/:companyId/receipts/:id/file/:kind
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: SimpleBooks.

Path parameters

NameTypeDescription
companyIdrequiredinteger
idrequiredinteger
kindrequiredstring: "original" | "display" | "thumb"

Query parameters

NameTypeDescription
downloadstring

Response

An empty body, a download, a body.

Errors

StatusMessage
404No file for this receipt

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/simplebooks/api/companies/1/receipts/42/file/original', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();