# Bookkeeping Entry Sets
> Entry Sets are accounting entries that are transactionally applied. Your compliance setup might require annotating money movements using this API. Learn more in our [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping).

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `bookkeeping_entry_set.updated`.

## The Bookkeeping Entry Set object
### Example
```json
{
  "created_at": "2023-02-11T02:11:59Z",
  "date": "2020-01-31T23:59:59Z",
  "entries": [
    {
      "account_id": "bookkeeping_account_e37p1f1iuocw5intf35v",
      "amount": 1750,
      "id": "bookkeeping_entry_ctjpajsj3ks2blx10375"
    },
    {
      "account_id": "bookkeeping_account_e37p1f1iuocw5intf35v",
      "amount": -1750,
      "id": "bookkeeping_entry_ctjpajsj3ks2blx10375"
    }
  ],
  "id": "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf",
  "idempotency_key": null,
  "transaction_id": null,
  "type": "bookkeeping_entry_set"
}
```
### Attributes
- `created_at` (string)
  When the entry set was created.

- `date` (string)
  The timestamp of the entry set.

- `entries` (array of objects)
  The entries.

  - `entries.account_id` (string)
    The bookkeeping account impacted by the entry.

  - `entries.amount` (integer)
    The amount of the entry in minor units.

  - `entries.id` (string)
    The entry identifier.

- `id` (string)
  The entry set identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `transaction_id` (string, nullable)
  The transaction identifier, if any.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `bookkeeping_entry_set`.

## List Bookkeeping Entry Sets
GET /bookkeeping_entry_sets

### Example
```curl
curl \
  --url "${INCREASE_URL}/bookkeeping_entry_sets" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `transaction_id` (string, optional)
  Filter to the Bookkeeping Entry Set that maps to this Transaction.

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

### Returns a Bookkeeping Entry Set List object:
```json
{
  "data": [
    {
      "created_at": "2023-02-11T02:11:59Z",
      "date": "2020-01-31T23:59:59Z",
      "entries": [
        {
          "account_id": "bookkeeping_account_e37p1f1iuocw5intf35v",
          "amount": 1750,
          "id": "bookkeeping_entry_ctjpajsj3ks2blx10375"
        },
        {
          "account_id": "bookkeeping_account_e37p1f1iuocw5intf35v",
          "amount": -1750,
          "id": "bookkeeping_entry_ctjpajsj3ks2blx10375"
        }
      ],
      "id": "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf",
      "idempotency_key": null,
      "transaction_id": null,
      "type": "bookkeeping_entry_set"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Bookkeeping Entry Set
POST /bookkeeping_entry_sets

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/bookkeeping_entry_sets" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "date": "2020-01-31T23:59:59Z",
    "entries": [
      {
        "account_id": "bookkeeping_account_9husfpw68pzmve9dvvc7",
        "amount": 100
      },
      {
        "account_id": "bookkeeping_account_t2obldz1rcu15zr54umg",
        "amount": -100
      }
    ],
    "transaction_id": "transaction_uyrp7fld2ium70oa7oi"
  }'
```

### Body Parameters
- `date` (string, optional)
  The date of the transaction. Optional if `transaction_id` is provided, in which case we use the `date` of that transaction. Required otherwise.

- `entries` (array of objects, required)
  The bookkeeping entries.

  - `entries.account_id` (string, required)
    The identifier for the Bookkeeping Account impacted by this entry.

  - `entries.amount` (integer, required)
    The entry amount in the minor unit of the account currency. For dollars, for example, this is cents. Debit entries have positive amounts; credit entries have negative amounts.

- `transaction_id` (string, optional)
  The identifier of the Transaction related to this entry set, if any.

## Retrieve a Bookkeeping Entry Set
GET /bookkeeping_entry_sets/{bookkeeping_entry_set_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/bookkeeping_entry_sets/bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `bookkeeping_entry_set_id` (string, required)
  The identifier of the Bookkeeping Entry Set.