VRPlatformVRPlatform
Bank rules

/bank-rules/preview

Preview an unsaved bank rule against unmatched bank records it would affect

POST
/bank-rules/preview
X-API-Key<token>

API key provided in dashboard

In: header

Request Body

application/json

name*string
Length1 <= length
status?string|null
priority?integer|null
transactionType*string
Value in"deposit" | "expense"
mode?string|null
matchMode?string|null
conditions?|null
descriptionOverride?string|null
usePriorMonthEnd?boolean|null

Accrual date override for expense bank rules: post on the prior month end instead of the bank record date

vendorContactId?string|null
accountIds?|null
lines*
Items1 <= items

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.vrplatform.app/bank-rules/preview" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "transactionType": "deposit",    "lines": [      {        "splitMode": "fixed"      }    ]  }'
{
  "data": [
    {
      "matches": true,
      "isAutoApplicable": true,
      "bankRecord": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "date": "string",
        "description": "string",
        "amount": -9007199254740991,
        "bankAccountId": "5b26b598-a880-4e32-8c41-126aa0206857",
        "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9"
      },
      "transaction": {
        "description": "string",
        "status": "active",
        "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
        "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d",
        "uniqueRef": "string",
        "isOpeningBalance": true,
        "type": "deposit",
        "date": "string",
        "currency": "string",
        "lines": [
          {
            "recurringTemplateId": "string",
            "uniqueRef": "string",
            "description": "string",
            "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
            "assignment": "accountsPayable",
            "amount": -9007199254740991,
            "appliedAmount": {
              "taxRateId": "88399542-51a6-40f6-9447-2208069d3c34",
              "taxBehavior": "excluded"
            },
            "markup": {
              "amount": -9007199254740991,
              "taxRateId": "88399542-51a6-40f6-9447-2208069d3c34",
              "taxBehavior": "excluded"
            },
            "listingId": "8c73d933-f7ed-437e-9da1-caac95adc1ae",
            "reservationId": "string",
            "ownerStatementId": "string",
            "party": "owners",
            "contactId": "string",
            "matchReservationConfirmationCode": "string",
            "matchReservationStripeGuestRef": "string",
            "matchLineTypeClassification": "string"
          }
        ],
        "attachmentIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ],
        "payment": {
          "bankRecordIds": [
            "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          ],
          "status": "unpaid",
          "date": "string",
          "lock": null
        },
        "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",
        "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2",
        "recurringTemplateId": "d73afa31-bf14-4baf-aede-be5f4b4ff489",
        "matchBankAccountLast4": "string"
      }
    }
  ]
}
{
  "code": "string",
  "message": "string",
  "issues": [
    {
      "message": "string"
    }
  ],
  "context": null
}
{
  "code": "string",
  "message": "string",
  "issues": [
    {
      "message": "string"
    }
  ],
  "context": null
}
{
  "code": "string",
  "message": "string",
  "issues": [
    {
      "message": "string"
    }
  ],
  "context": null
}
{
  "code": "string",
  "message": "string",
  "issues": [
    {
      "message": "string"
    }
  ],
  "context": null
}
{
  "code": "string",
  "message": "string",
  "issues": [
    {
      "message": "string"
    }
  ],
  "context": null
}