Create Journal Entry | Build with Bookkeep
Create Journal Entry
POST https://api.bookkeep.com/v1/journal_entries
Create a sales summary journal entry to record daily sales activity.
Notes:
- Partners can request a source system name with associated Logo just email dev@bookkeep.com
- The date of the journal entry should be the date of the sales summary
- All monetary amounts should be floats representing dollar amounts (or equivalent currency) rather than cents. $1.00 is 1.00, not a value in cents.
- Any blank/null floats should be sent as 0.00. Empty string fields should be empty strings.
- All _credits should equal _debits.
- Optional memo and document number for reference
- Object type fields allow you to add drop down subcategories with labels. Each of which will be added as a new line for mapping.
- Not all fields are required. Only the top level fields are required.
Request
- application/json
Body
template stringrequired
Must be set to 'bookkeep_sales_summary'
Default value: bookkeep_sales_summary
entity_id stringrequired
Unique identifier for the entity which you get from the URL when logged in to bookkeep or if you query for entity list. Usually an entity connected to one accounting platform in the case of QuickBooks or Xero.
external_id stringrequired
An immutable identifier for this sales channel from your system. Note that each location will create a separate mapping template. If this changes it will create a new mapping template. This will be used in the summary line to indicate the location name.
Default value: Location Name
source_system stringrequired
Identifier for the source system use 'bookkeep' for testing then request your own from dev@bookkeep.com
Default value: bookkeep
date string
The date of the journal entry should be the date of the sales summary using the format YYYY-MM-DD
currency stringrequired
Currency code (e.g. USD) 3 character currency code
summarized_net_sales number
Net sales calculated from the gross sales, discounts, and refunds etc.
transactions_summarized_count integer
Number of transactions included in this summary
docnumber string
Document number for the journal entry which will override the default document number in QuickBooks
memo string
Optional memo for the journal entry that will pass through to the accounting platform so details can be added here regarding the summary information.
gross_sales_credit object
Breakdown of gross sales by category
property name* number
discounts_debit object
Total discounts amount
property name* number
refunds_debit object
Total refunds amount
property name* number
sales_tax_collected_credit object
Sales tax collected
property name* number
sales_tax_withheld_debit object
Sales tax withheld
property name* number
payments_debit object
Breakdown of payments by type
property name* number
payments_cash_debit number
Cash payments amount
gift_card_sales_credit number
Gift card sales amount
gift_tender_total_debit number
Gift card tender amount
gratuity_collected_credit number
Gratuity collected
fees_debit number
Total fees
ar_credits_posted_credit object
AR credits posted
property name* number
ar_charges_posted_debit object
AR charges posted
property name* number
misc_credits_credit object
Miscellaneous credits
property name* number
misc_debits_debit object
Miscellaneous debits
property name* number
Responses
- 200
- 401
- 422
- 500
- 4XX
Journal entry created successfully
- application/json
Schema
message string
Example: Success! Debits (1000.00) equal credits (1000.00)
{
"message": "Success! Debits (1000.00) equal credits (1000.00)",
"validation_summary": {
"debit": 1000,
"credit": 1000,
"difference": 0
}
}
Authentication or authorization error
- application/json
Schema
errors string
Example: Unauthorized
{
"errors": "Unauthorized"
}
Validation error
- application/json
Schema
errors string
Error message(s)
Example: Invalid date format
{
"errors": "Invalid date format"
}
Internal server error
- application/json
Schema
errors string
Error message from the server
Example: An unexpected error occurred
{
"errors": "An unexpected error occurred"
}
Gateway error
- application/json
Schema
errors object
Error response from the gateway
validation_summary object
debit number
credit number
difference number
{
"errors": {},
"validation_summary": {
"debit": 0,
"credit": 0,
"difference": 0
}
}
Authorization: http
name: basic
authtype: http
description: The Bookkeep API uses API keys to authenticate requests. You can view and manage your API keys in the [Bookkeep Developer Dashboard](https://app.bookkeep.com/developers/api_keys).
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Authentication to the API is performed via HTTP Basic Auth. Provide your Publishable key as the basic auth username value and your Secret key as the basic auth password value.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
curl -L -X GET 'https://api.bookkeep.com/v1/entities' \
-H 'Authorization: Basic ZGlsaXAuYmFpcmFnaUBib29ra2VlcC5jbzpXLlM4NVZGbkJyeEY2QmI='
curl
nodejs
python
ruby
csharp
php
CURL
curl -L 'https://api.bookkeep.com/v1/journal_entries' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic PHVzZXJuYW1lPjo8cGFzc3dvcmQ+' \
-d '{
"template": "bookkeep_sales_summary",
"entity_id": "string",
"external_id": "Location Name",
"source_system": "bookkeep",
"date": "2024-07-29",
"currency": "string",
"summarized_net_sales": 0,
"transactions_summarized_count": 0,
"docnumber": "string",
"memo": "string",
"gross_sales_credit": {},
"discounts_debit": {},
"refunds_debit": {},
"sales_tax_collected_credit": {},
"sales_tax_withheld_debit": {},
"payments_debit": {},
"payments_cash_debit": 0,
"gift_card_sales_credit": 0,
"gift_tender_total_debit": 0,
"gratuity_collected_credit": 0,
"fees_debit": 0,
"ar_credits_posted_credit": {},
"ar_charges_posted_debit": {},
"misc_credits_credit": {},
"misc_debits_debit": {}
}'
Request Collapse all
Base URL
Edit
Auth
Username
Password
Body
- Example (from schema)
- example
{
"template": "bookkeep_sales_summary",
"entity_id": "string",
"external_id": "Location Name",
"source_system": "bookkeep",
"date": "2024-07-29",
"currency": "string",
"summarized_net_sales": 0,
"transactions_summarized_count": 0,
"docnumber": "string",
"memo": "string",
"gross_sales_credit": {},
"discounts_debit": {},
"refunds_debit": {},
"sales_tax_collected_credit": {},
"sales_tax_withheld_debit": {},
"payments_debit": {},
"payments_cash_debit": 0,
"gift_card_sales_credit": 0,
"gift_tender_total_debit": 0,
"gratuity_collected_credit": 0,
"fees_debit": 0,
"ar_credits_posted_credit": {},
"ar_charges_posted_debit": {},
"misc_credits_credit": {},
"misc_debits_debit": {}
}
Send API Request
ResponseClear
Click the Send API Request button above and see the response here!