Category:API V2: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (16 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:API]] | [[Category:API]] | ||
This page explains the capabilities of API V2 and explains how to use it. | This page explains the capabilities of API V2 and explains how to use it. | ||
| Line 11: | Line 8: | ||
API V1 is | API V1 is deprecated, we do not recommend using it for new projects. Information about API V1 can be found here https://wiki.beds24.com/index.php/Category:API | ||
= Authentication = | = Authentication = | ||
| Line 269: | Line 266: | ||
Create or update bookings. | Create or update bookings. | ||
==== How to Add/remove bookings from a group booking ==== | |||
How to Add/remove bookings from a group booking | |||
You can add or remove a booking from a group booking by using the parameter "masterId" without having to use the action "makeGroup" | You can add or remove a booking from a group booking by using the parameter "masterId" without having to use the action "makeGroup" | ||
| Line 276: | Line 272: | ||
To add a booking to a group booking, you set the master id of the group booking in the "masterId" parameter so it would look like this in your request: "masterId": 1234567, that will modify the booking to add it to the group. | To add a booking to a group booking, you set the master id of the group booking in the "masterId" parameter so it would look like this in your request: "masterId": 1234567, that will modify the booking to add it to the group. | ||
To remove a booking from a group booking, you set the "masterId" parameter to null so it will look like this in your request: "masterId": null, | To remove a booking from a group booking, you set the "masterId" parameter to null so it will look like this in your request: "masterId": null. | ||
==== Using the stripeToken Field to Enable Stripe Payment Actions ==== | |||
For direct bookings where payment is processed via Stripe, the stripeToken field must be set. This token is typically generated when collecting card details securely through Stripe, ensuring that sensitive information is not handled or stored by Beds24. | |||
If the stripeToken is present in a booking, a Stripe button will appear in the Charges and Payments tab. Clicking this button allows you to view Stripe transactions and access all saved cards associated with the booking. | |||
For bookings paid through other methods, this field remains empty unless card details are later collected via Stripe. | |||
=== DELETE /bookings === | === DELETE /bookings === | ||
| Line 299: | Line 305: | ||
== Inventory == | == Inventory == | ||
These endpoints will only work if a price is set for the property or room. To set up a Daily Price, follow the instructions here: [https://wiki.beds24.com/index.php/Category:Daily_Prices Daily Prices Guide]. For Fixed Prices, you can find the setup guide here: [https://wiki.beds24.com/index.php/Category:Fixed_Prices Fixed Prices Guide]. | |||
=== GET /inventory/rooms/offers === | === GET /inventory/rooms/offers === | ||
| Line 350: | Line 358: | ||
Create or modify properties. | Create or modify properties. | ||
Note: To update room-level settings, you must include the property id in your request. If it is missing, the system may return an error or incorrectly report success without applying any changes. | |||
==== Price rules ==== | |||
It's currently not possible to create new price rules, however, you can modify the price rules with this request. | |||
'''''Example: Modify the name of the price rule:''''' | |||
{ | |||
"id": propertyid, | |||
"roomTypes": [ | |||
{ | |||
"id": roomid, | |||
"priceRules": [ | |||
{ | |||
"priceruleid": 1, | |||
"name": "-INSERT NAME HERE-" | |||
} | |||
] | |||
} | |||
] | |||
} | |||
=== DELETE /properties === | === DELETE /properties === | ||
| Line 506: | Line 537: | ||
=FAQ= | =FAQ= | ||
==How do I access API V2?== | ==How do I access API V2?== | ||
Create an invite code under {{#fas:cog}} (SETTINGS) | Create an invite code under {{#fas:cog}} (SETTINGS) MARKETPLACE > API. | ||
Exchange this invite code for a refresh token and token using the POST /authentication/setup endpoint. | Exchange this invite code for a refresh token and token using the POST /authentication/setup endpoint. | ||
| Line 537: | Line 568: | ||
==What is the API credit limit?== | ==What is the API credit limit?== | ||
The API credit limit restricts how much you can use the API in a 5 minute window. | The API credit limit restricts how much you can use the API in a 5 minute window, it's by default 100 credits per 5 minutes. | ||
Each API request has a cost, this cost is calculated dynamically and depends on how complex the request is. | Each API request has a cost, this cost is calculated dynamically and depends on how complex the request is. | ||
If you go over this limit you will not be able to make additional API calls until the 5 minute period is over. | If you go over this limit you will not be able to make additional API calls until the 5 minute period is over. | ||
You can increase this limit by contacting the support team through our ticketing system and it will cost 10€ per month to get the limit increased to 200 credits per 5 minutes, this limit can be changed/increased as much as you need. | |||
==Where can I see my API credit limit?== | ==Where can I see my API credit limit?== | ||
| Line 601: | Line 634: | ||
In addition, there is a limit of 10000 top level JSON array item per POST request. | In addition, there is a limit of 10000 top level JSON array item per POST request. | ||
==Channel management only through the API== | |||
Please contact the Beds24 support team and open a ticket with your questions about using only the channel management through the API. | |||
==Where can I see the possible values for a booking's apiSourceId (API Source ID)== | ==Where can I see the possible values for a booking's apiSourceId (API Source ID)== | ||
| Line 606: | Line 642: | ||
[[API_V2.0_apisourceids | apiSourceId values can be found here.]] | [[API_V2.0_apisourceids | apiSourceId values can be found here.]] | ||
== What does "coming soon", " | == What does "coming soon", "alpha" or "beta" mean? == | ||
Coming soon - The endpoint has not been developed yet and is not usable, the schema is indicative of how the endpoint will eventually work but there may be changes in the final version. | Coming soon - The endpoint has not been developed yet and is not usable, the schema is indicative of how the endpoint will eventually work but there may be changes in the final version. | ||
Alpha - The endpoint is usable but still being developed, not all features are implemented yet, breaking changes are unlikely but may occur if necessary. | |||
Beta - The endpoint is mostly finished and is being tested, most features are implemented, breaking changes are not planned. | Beta - The endpoint is mostly finished and is being tested, most features are implemented, breaking changes are not planned. | ||