API Playground - add_agent

add_agent


Use this function to add a new agent to a site. You cannot make into an agent a user who is a moderator or resource admin of another Planyo site.
If the user has been added by an admin / API call or is already a moderator or resource admin of the site, they will be automatically assigned as agent. Otherwise, a confirmation email will be sent to the user's email address and the user will be assigned as agent once they confirm the action. Check the status output field to find out if the assignment was immediate. Note that the user should have a login and password associated with their Planyo account. If not, the warning output field will contain the appropriate info. (click for full documentation)

user_id

ID of the user to be added as agent. The user needs to have an email address associated with their account.

commission

The default agent commission expressed in percent or a number, e.g. 10% or 20.00 are both valid. Enter 0 if commission should not be calculated.

discount

Enter the default agent discount expressed in percent or a number, e.g. 10% or 20.00 are both valid. Enter 0 if no discount should be applied.

organization

You can optionally enter the name of the organization this agent belongs to. Agents from the same organization (name must match exactly) can view/manage all reservations entered also by other agents from within the same organization.

site_id

Planyo site ID for the new agent. This parameter is only required if using an API key for a meta site.

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

* - påkrevd felt