API Playground - set_custom_property

set_custom_property


Sets a new value for the property. Properties can be of different types -- Planyo allows assigning custom properties to users, sites, resources and reservations. Please note that custom properties will be visible in the backend UI (for site administrators) unless the property name starts with 'hidden'. In such case the property will be usable only by the API and hidden everywhere in the UI.

Note that normally for resource properties the language parameter should not be passed unless you're translating a property such as description to another language. In order to translate a resource name to a different language, use the special parameter 'hidden_name': type=resource&name=hidden_name (click for full documentation)

type

Property type (one of: site, resource, reservation, user)

id

Related ID whose property is being queried (depending on type one of: site ID, resource ID, reservation ID, user ID)

name

Property name. You can use the hidden_ prefix if you want the property to be completely hidden from the UI, meaning that neither the admin nor the customer will see its value. For reservation properties (reservation form items) only: use the fixed_ prefix (e.g. fixed_abc) if your reservation form does not define given item (in this case abc), otherwise the value will be erased if you modify the reservation (use hidden_fixed_ to make the item invisible to the end customers)

value

Property value

language

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

* - campo requerido