in reference to:
https://www.beds24.com/api/json/setBooking
and
https://www.beds24.com/api/json/getBookings
I am also looking for information on this exact same subject. It appears this invoice array holds a number of invoice structures, one for each charge and payment item on the bookings "Charges & Payments" tab page.
By throwing things at the API / test booking in Beds24 and watching what it returns, I have been able to figure out a few things. However throwing things at the API and observing the returns is a less then ideal approach to interacting / understanding the API. Any sort of
documentation on this invoice structure and specifically the
fields of type, type2, and qty would be extremely helpful.
edit: (note my post below this one about not using type2!)
edit2: (note my other post below about the meanings of type)
the small text below probably should be ignored in light of my additional posts about type2, type, and qty
What I have found so far:
Room rate: type=1, type2=0
{
"invoiceId": "01234567",
"description": "Aspen Cottage Wednesday, 1 July, 2020 - Friday, 3 July, 2020",
"status": "",
"qty": "1",
"price": "420.00",
"vatRate": "0.00",
"type": "1",
"type2": "0",
"invoiceeId": ""
}
Upsell* items: type=3, type2=1
*it seems in Beds24 upsell items are how additional sales tax & room tax are added
{
"invoiceId": "7654321",
"description": "WI sales tax + Door county room tax 11%",
"status": "",
"qty": "1",
"price": "46.20",
"vatRate": "0.00",
"type": "3",
"type2": "1",
"invoiceeId": ""
}
Payment: type=200, type2=0
{
"invoiceId": "01230123",
"description": "test payment",
"status": "test",
"qty": "-1",
"price": "10.00",
"vatRate": "0.00",
"type": "200",
"type2": "0",
"invoiceeId": ""
}
note the rather odd return of "-1" for the field qty. That has left me baffled.
also, in the setBooking / getBooking structure, there are fields like custom1, custom2, and etc that appear ideal for sticking an extra tag or id in to assist with syncing bookings between systems. Is there the same sort of field or fields in the invoice structure that can be used for that?