Accounting (only available for accounting add-on users)

Get all journal entries

Changed on

Retrieves all journal entries matching the specified parameters

get/accounting-api/journal-entries/all

Request

  • Base URL
    https://open-api.guesty.com/v1
  • URL
    https://open-api.guesty.com/v1/accounting-api/journal-entries/all
  • Auth
    API key in header authorization

Query parameters

operator'@in_future' | '@in_past' | '@in_next_days' | '@is_after_days' | '@in_past_days' | '@is_before_days' | '@on' | '@between' | '@lt' | '@today' required

Comparison operator

DO NOT use the format provided in the coding playground output. Fields in this query param must be transformed according to the rules explained below. For example, in order to fetch the information for past 7 days:

  1. Form your object first
{
  "operator": "@in_past_days",
  "value": 7
}
  1. Then encode it to sanitized URL (see the code example written in JS below)
encodeURIComponent(JSON.stringify({"operator": "@in_past_days", "value": 7}))
  1. The final query param structure should be looked like
transactionDate=%7B%22operator%22%3A%22%40in_past_days%22%2C%22value%22%3A7%7D
{
  "operator": "@in_past_days",
  "value": "2024-07-03"
}
namestring
Example:LOCAL_TAX

Filter list by journal entries name, it will search by matching strings from filter input

descriptionstring
Example:Deducted commission

Filter list by journal entries description, it will search by matching strings from filter input

reservationConfirmationCodesstring[]

Filter by reservation confirmation codes

[
  "GY-pzNAXYcq",
  "GY-ndGzwrgF"
]
ledgerstring[]

Filter by ledger type. Available ledgers:

  • AD (Advanced deposit)
  • AP (Accounts payable)
  • C (Cash)
  • O (Owners)
  • WC (Working capital)
[
  "C"
]
guestsstring[]

Show journal entries for selected guests ID

[
  "5cfe6449b03278001ee67e03",
  "5f6b5faa6d5ccd28943d0408"
]
vendorsstring[]

Show journal entries for selected vendors ID

[
  "62a764a2cecc57003492db6a",
  "airbnb",
  "airbnb2"
]
ownersstring[]

Show journal entries for selected owners ID

[
  "62c57651f2e43e00397ca67f",
  "62c2eb8d999ea20033fdac1b"
]
listingsstring[]

Show journal entries for selected listings ID

[
  "62c57651f2e43e00397ca67f",
  "62c2eb8d999ea20033fdac1b"
]
chargeCodestring[]

Show journal entries for selected transaction codes

[
  "PCM",
  "COT"
]
triggersstring[]

Show journal entries for selected triggers. Available triggers:

  • PAYMENT
  • MANUAL
  • PERIODIC
  • RESERVATION_CANCELLED
  • RESERVATION_CREATED
  • RESERVATION_UPDATED
  • DISBURSEMENT
  • RECONCILIATION_CASH_ADJUSTMENT
[
  "PAYMENT",
  "MANUAL"
]
skipnumber
Example:5

Pagination skip value

limitnumber
Example:10

Pagination limit value

sortByDate'ASC' | 'DESC'
Example:ASC

Sort by date. For ascending order use 'ASC' value, for descending - 'DESC'

recognizedstring

Filter by recognition status of the transaction

Response

Journal entries response

skipnumber required
limitnumber required
currentnumber required
totalnumber required

Example response

{
  "limit": 25,
  "current": 25,
  "total": 478,
  "data": [
    {
      "id": 149304,
      "transactionId": 74691,
      "date": "2022-07-13",
      "description": "Payment - CASH",
      "ledger": "Advanced deposit",
      "guest": {
        "id": "62ce5bd737f7d900320e4a47",
        "name": "Guest Xxx"
      },
      "vendor": {
        "id": "62ce5bd737f7d900320e4a47",
        "name": "Vendor Xxx"
      },
      "owner": {
        "id": "62ce5bd737f7d900320e4a47",
        "name": "Owner Xxx"
      },
      "amount": {
        "value": -95,
        "currency": "USD"
      },
      "name": "Payment - CASH",
      "listing": {
        "href": "/properties/6259630d9e23bc0034c86238",
        "title": "Dmytro's fancy house",
        "target": "_blank"
      },
      "chargeType": "Payment Recording",
      "reservationConfirmationCode": {
        "href": "/reservations/62ce5bdb37f7d900320e4a69/summary",
        "title": "Y7MB8NGmA",
        "target": "_blank"
      },
      "paymentConfirmationCode": "SAS432",
      "chargeCode": "PR",
      "trigger": "Payment",
      "attachments": [
        {
          "id": 392,
          "url": "https://res.cloudinary.com/guesty/image/upload/v1664382837/folder/5213a2d206112710005d96ff/accounting/axcrdnwz7ermpaox1eun.pdf",
          "urlThumbnail": "https://res.cloudinary.com/guesty/image/upload/h_300/v1664382837/folder/5213a2d206112710005d96ff/accounting/axcrdnwz7ermpaox1eun.jpg",
          "uploadedBy": "5d64dbdbfc4aae0021bffc1c",
          "uploadedAt": 1664382837000,
          "originalFilename": "simple",
          "originalExtension": "pdf"
        }
      ],
      "recognized": true
    }
  ]
}

Changes