# 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](mailto: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](mailto:dev@bookkeep.com)

**Default value:** `bookkeep`

**date** string<date>required

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<float>

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<float>

**discounts\_debit** object<float>

Total discounts amount

**property name\*** number<float>

**refunds\_debit** object<float>

Total refunds amount

**property name\*** number<float>

**sales\_tax\_collected\_credit** object<float>

Sales tax collected

**property name\*** number<float>

**sales\_tax\_withheld\_debit** object<float>

Sales tax withheld

**property name\*** number<float>

**payments\_debit** object

Breakdown of payments by type

**property name\*** number<float>

**payments\_cash\_debit** number<float>

Cash payments amount

**gift\_card\_sales\_credit** number<float>

Gift card sales amount

**gift\_tender\_total\_debit** number<float>

Gift card tender amount

**gratuity\_collected\_credit** number<float>

Gratuity collected

**fees\_debit** number<float>

Total fees

**ar\_credits\_posted\_credit** object<float>

AR credits posted

**property name\*** number<float>

**ar\_charges\_posted\_debit** object<float>

AR charges posted

**property name\*** number<float>

**misc\_credits\_credit** object<float>

Miscellaneous credits

**property name\*** number<float>

**misc\_debits\_debit** object<float>

Miscellaneous debits

**property name\*** number<float>

## Responses

- 200
- 401
- 422
- 500
- 4XX

Journal entry created successfully

- application/json

**Schema**

**message** string

**Example:** `Success! Debits (1000.00) equal credits (1000.00)`

```json
{
  "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`

```json
{
  "errors": "Unauthorized"
}
```

Validation error

- application/json

**Schema**

**errors** string

Error message(s)

**Example:** `Invalid date format`

```json
{
  "errors": "Invalid date format"
}
```

Internal server error

- application/json

**Schema**

**errors** string

Error message from the server

**Example:** `An unexpected error occurred`

```json
{
  "errors": "An unexpected error occurred"
}
```

Gateway error

- application/json

**Schema**

**errors** object

Error response from the gateway

**validation\_summary** object

**debit** number<float>

**credit** number<float>

**difference** number<float>

```json
{
  "errors": {},
  "validation_summary": {
    "debit": 0,
    "credit": 0,
    "difference": 0
  }
}
```

#### Authorization: http

```text
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
curl -L -X GET 'https://api.bookkeep.com/v1/entities' \
  -H 'Authorization: Basic ZGlsaXAuYmFpcmFnaUBib29ra2VlcC5jbzpXLlM4NVZGbkJyeEY2QmI='
```

- curl
- nodejs
- python
- ruby
- csharp
- php

- CURL

```bash
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

https://api.bookkeep.com

Auth

Username

Password

Body

- Example (from schema)
- example

```json
{
  "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!
