# List journal entries

List the company's journal entries whose business event falls inside a
time window. Both ends are required: `from` is inclusive and `to` is
exclusive.

Endpoint: GET /v1/accounting-journal-entries
Security: OAuth2

## Query parameters:

  - `from` (string, required)
    Return entries whose business event occurred at or after this time.

  - `to` (string, required)
    Return entries whose business event occurred strictly before this time.

  - `kind` (array)
    Restrict the result to entries of these kinds.
Omit to return every kind.

  - `sort` (string)
    Field to define the sort order. To indicate sorting direction, fields may be prefixed
with `+` (ascending) or `-` (descending).

Ensure to URL escape the value as `+` can otherwise be interpreted as a space.

Only the field `occurred_at` is supported.

  - `cursor` (string)
    Pagination cursor for fetching the next page of results.
Omit or pass an empty string to start from the beginning of the list.

  - `limit` (integer)
    Maximum number of items to return per page.
Defaults to 100, maximum 1000.

## Response 200 fields (application/json):

  - `next` (string)
    Cursor for the next page of results.
An empty string or absent value indicates the end of the list.

  - `items` (array)
    The list of journal entries on the current page.

  - `items.id` (string, required)
    The unique identifier of the journal entry.

  - `items.kind` (string, required)
    Enum: "SALE"

  - `items.order_ids` (array, required)
    The orders this journal entry derives from. A single order for most
kinds; several for REVENUE_RECOGNITION entries that aggregate an
event's bookings into one entry.

  - `items.origin` (string)
    The system that processed the transaction that produced this journal entry
- `UNDERSTORY_PAY` - Understory's own payment offering.
- `STRIPE` - Stripe.
- `PAYPAL` - PayPal.
- `QUICKPAY` - QuickPay.
- `GIFTCARD` - payment redeemed against a gift card balance.
- `PUNCHCARD` - payment redeemed against a punch card balance.
- `EXTERNAL` - payment was received in another system and marked as paid within Understory.
    Enum: "UNDERSTORY_PAY", "STRIPE", "PAYPAL", "QUICKPAY", "GIFTCARD", "PUNCHCARD", "EXTERNAL"

  - `items.occurred_at` (string, required)
    Timestamp of when the underlying business event occurred. Drives
which accounting period this entry is booked into.

  - `items.postings` (array, required)
    The postings that make up the entry. Sum of debits equals sum of
credits.

  - `items.postings.id` (string, required)
    The unique identifier of the posting.

  - `items.postings.type` (string, required)
    Discriminator value identifying this as a booking posting.
    Enum: "BOOKING_PREPAYMENT", "BOOKING_REVENUE", "BOOKING_FEE_REVENUE"

  - `items.postings.direction` (string, required)
    The direction of the posting.
    Enum: "DEBIT", "CREDIT"

  - `items.postings.amount` (object, required)
    A monetary amount expressed in a minor currency unit so it can be represented exactly as an integer.

  - `items.postings.amount.currency` (string, required)
    The ISO 4217 currency code.
    Example: EUR

  - `items.postings.amount.value` (integer, required)
    The amount in the smallest currency unit (e.g. cents for EUR).
    Example: 2500

  - `items.postings.amount.exponent` (integer, required)
    The number of decimal places for the currency.
    Example: 2

  - `items.postings.vat_rate` (number)
    The VAT rate as a decimal (e.g. 0.25 for 25%). Omitted when not
applicable.
The rate is stated on net postings as well as gross ones, so its
presence does not mean the amount is gross. On a
`REVENUE_RECOGNITION` or `REVENUE_RECOGNITION_REVERSAL` posting
the amount is already net and the rate is there to route the
posting to the right per-rate revenue account and to report the
VAT that revenue attracts - not to be extracted from the amount.
See `amount` for which kinds are gross.
Where no VAT is due, gross and net are the same amount either way,
but the two sides state it differently: an exempt amount carries a
`0` rate on `REVENUE_RECOGNITION` and
`REVENUE_RECOGNITION_REVERSAL` postings, and omits the rate on the
corresponding `SALE` and `REFUND` postings.
    Example: 0.25

  - `items.postings.booking` (object, required)
    Booking-related context attached to a posting, identifying the
experience and locations the posting relates to.

  - `items.postings.booking.experience_id` (string, required)
    The experience this posting relates to.

  - `items.postings.booking.location_ids` (array)
    The locations this posting relates to.

  - `items.postings.booking.variant_id` (string)
    The ticket variant or add-on this posting relates to.

  - `items.postings.type` (string, required)
    Discriminator value identifying this as a non-booking posting.
    Enum: "CUSTOMER_PAYMENT", "EXPERIENCE_GIFT_CARD_LIABILITY", "MONETARY_GIFT_CARD_LIABILITY", "GIFT_CARD_BREAKAGE", "GIFT_CARD_ADJUSTMENT", "PUNCH_CARD_LIABILITY", "PUNCH_CARD_ADJUSTMENT", "PUNCH_CARD_BREAKAGE", "PLATFORM_FEE", "TRANSACTION_FEE"

  - `items.documents` (array, required)
    Supporting documents (e.g. customer receipts) referenced by URL.

  - `items.documents.id` (string, required)
    The unique identifier of the document.

  - `items.documents.url` (string, required)
    URL pointing to the document in its immutable storage location.

  - `items.documents.type` (string, required)
    The document type.
    Enum: "CUSTOMER_RECEIPT", "CREDIT_NOTE", "PLATFORM_FEE"

  - `items.documents.mime_type` (string, required)
    The IANA media type of the document.
    Example: application/pdf

  - `items.transaction_id` (string, required)
    The payment transaction that produced this sale.

  - `items.transaction_id` (string, required)
    The original payment transaction being refunded.

  - `items.refund_id` (string, required)
    The refund event that produced this entry.

  - `items.event_id` (string, required)
    The completed event whose bookings produced this revenue
recognition.

  - `items.experience_id` (string, required)
    The experience the recognised bookings are for.

  - `items.recognition_scope` (string, required)
    How the event's bookings were grouped into entries.
- `PER_EVENT` - one entry aggregating every booking on the event.
- `PER_BOOKING` - one entry per booking on the event.
    Enum: "PER_EVENT", "PER_BOOKING"

  - `items.event_id` (string, required)
    The cancelled event whose earlier revenue recognition this entry
reverses.

  - `items.experience_id` (string, required)
    The experience the reversed bookings are for.

  - `items.recognition_scope` (string, required)
    How the event's bookings were grouped into entries — the same
scope as the revenue-recognition entry being reversed.
- `PER_EVENT` - one entry aggregating every booking on the event.
- `PER_BOOKING` - one entry per booking on the event.
    Enum: "PER_EVENT", "PER_BOOKING"

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 403 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response default fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

