API - Planyo Web Services - set_package_contents

You are here: Planyo » Help » API » set_package_contents

set_package_contents

Description:

Use this function to make a resource into a pakcage and set package type and contents, or to make a package into a regular resource (by setting package_type=none)

Input:

resource_id int required
ID of the resource
package_type string required
One of the following values: none (resource is not a package), flexible (flexible package) or simple (simple package)
priority int required
Used only with flexible packages. This is the priority of auto-assignment within category. Possible values are: 0=chosen randomly (daily), 2=chosen randomly (each time), 3=sorted alphabetically
quantity_used_XXX int optional
Number of units of the included resource with ID XXX used by reservation of each unit of the package
quantity_blocked_XXX int optional
Number of units of resource with ID XXX blocked by reservation of each unit of the package
category_XXX int optional
Used only with flexible packages. This is the category for resource with ID XXX (valid values: 1-5)
customer_chosen_categories string optional
Used only with flexible packages. These are comma-separated categories for which the customer can manually choose the resource used.
method string required
must be set to set_package_contents
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:

none

API playground:

Click here to test this function in the API playground.