This endpoint is used to send an invoice to PMS so that the invoice details are added to corresponding folio.

Request

POST https://app.hotelrunner.com/api/v1/apps/pos/postings

Query Parameters

Key Description
TOKEN Token generated for this integration on integration setup page
HR ID Hotel ID provided on integration setup page

Example: POST https://app.hotelrunner.com/api/v1/apps/pos/postings?token=12345&hr_id=67890

Example Query Body

{
  "pos_id": 745,
  "invoice_number": "in1234",
  "reservation_id_customer_id": "41749:25238942",
  "note": "Invoice Note",
  "posts": [
    {
      "post_type": "expense",
      "department_id": "HR:37",
      "revenue_account_id": "pos_code_for_f-b",
      "product_id": null,
      "product_name": "Tost",
      "quantity": 1,
      "amount": 1,
      "currency": "USD",
      "exchange_rate": "15.40"
    },
    {
      "post_type": "expense",
      "department_id": null,
      "revenue_account_id": null,
      "product_id": "peynir",
      "product_name": "Peynir",
      "quantity": 1,
      "amount": 15,
      "currency": null,
      "exchange_rate": null
    }
  ]
}

Body Parameters

Parameter Required Description
pos_id Yes Provided integration ID during setup
invoice_number Yes Invioce identifier used in POS
reservation_id_customer_id Yes Identifier of guest who is charged for the invoice. For posting as a direct sale, enter "-1".
note No Invoice note as a string
post.post_type Yes Type of the invoice item. Accepted values: "Expense", "Payment", "Refund", "Discount"
post.department_id Yes* Sales department ID. Mapped IDs used in POS can be entered directly. HotelRunner IDs should be entered with "HR:" prefix.
post.revenue_account_id Yes* Revenue account ID. Mapped IDs used in POS can be entered directly. HotelRunner IDs should be entered with "HR:" prefix.
post.product_id Yes* Extra/Product ID. Mapped IDs used in POS can be entered directly. HotelRunner IDs should be entered with "HR:" prefix.
post.product_name No Product name as a string
post.quantity Yes Quantity of sold product
post.amount Yes Total price
post.currency No Used currency as a string. Base currency is used if left blank
post.exchange_rate No** Exchange rate of given currency to the base currency. **Mandatory if different currency is used

*: Either product_id should be given, or both department_id and revenue_account_id should be given.

Guidelines

  • For department_id, revenue_account_id and product_id:
    • Each item in a posting should have its sales department and revenue account information. Since products (defined as extras on HotelRunner) have their own sales department and revenue account info, there is no need to provide department and revenue account if product info is given.
    • The system checks product_id first. If it is null, then it looks at department_id and revenue_account_id.
    • If a POS ID is entered and the mapping cannot be found, the default selection for the mapping is used.
    • For an item, specified sales department and revenue account should have the same type_code.
  • reservation_id_customer_id: This is provided with In-House API. The system finds the correct folio for the posting with this information. If "-1" entered, posting is added under the direct sales folio.