API - Planyo Web Services - add_additional_product

Jesteś tutaj: Planyo » Pomoc » API » add_additional_product

add_additional_product

Description:

Use this function to add a new additional product to your Planyo site.

Input:

name string required
Name of the new product
site_id int optional
ID of the site to which the product should be added (use only for metasite API keys
price float required
Product price (0 if free)
max_quantity int required
Max. quantity of the product (either absolutely or for each person -- depending on the value of is_per_person)
description string optional
Product description
is_per_person string optional
Set to true or person if the product should be reservable for each person, adult if it's reserved for each adult in the party, child if for each child in the party, or false (or skip the parameter) if the product is reserved for the entire party (per reservation)
is_recurring bool optional
Set to true if this is a daily recurring product
is_reserved_by_customer bool optional
Set to true if the product should be reservable by the customer in the second step of the reservation form. Set to false if the customer cannot decide whether the product is added to their reservation or not
is_default bool optional
Set to true if the product should be selected by default
priority int optional
Priority group (0-20). Products are grouped by priority group and then sorted by name. Priority groups can have labels.
currency string optional
3-letter (ISO 4217) currency code e.g. EUR, USD, CHF, GBP etc. If not specified, the currency of the site will be used.
tax_rate float optional
Tax rate (in percent)
extra_field string optional
Label for the UI option 'Ask customer for extra information regarding this item'. Skip this parameter if you don't want to ask the customer for extra info regarding the product
compatible_resource_ids string optional
This optional argument lets you specify a comma-separated resource IDs the product is compatible with. By default (if not specified), the product will be compatible with all resources.
method string required
must be set to add_additional_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:

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

API playground:

Click here to test this function in the API playground.