API - Planyo Web Services - add_custom_product

Sie sind hier: Planyo » Hilfe » API » add_custom_product

add_custom_product

Description:

Use this function to add a new custom product to a reservation. Note that custom products are different from regular additional products in that they have no fixed definition. Each time they are added the name and price must be specified. As with the additional products, these custom products will also be listed in the invoice.

Input:

name string required
Name of the new custom product
price float required
Product price (0 if free)
reservation_id int required
Reservation ID to which the product is being added
tax_rate float required
Tax rate (in percent)
time_added DateTime optional
Optionally you can set the time when the product was added to the reservation
recalculate_price bool optional
Set to true (this is the default value) if you'd like to update the total price of the reservation. If set to false, then the total price won't change after the product is added.
method string required
must be set to add_custom_product
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp.

Output:

custom_product_id int
ID of the newly created custom product (in case of success).

API playground:

Click here to test this function in the API playground.