Talemo Docs

Account tools

On this page

Most tools take business_id: the business the call is for. talemo_list_businesses names the businesses this connection works in. A tool that changes something also takes dry_run; with it nothing changes, and the answer shows what the change would be, or the refusal it would get.

All topics of Account

talemo_close_branch

Close a branch

Close a branch: it leaves the list of open branches and can be opened again at any time with talemo_reopen_branch; nothing of it is deleted. The last open branch of a business is refused with status 409, code branch.last. Closing a closed branch returns it as it is.

Guide: account/organisation-business-branch.

  • Changes data
  • The same call twice gives the same result
  • Reaches outside Talemo

Parameters

ParameterTypeRequiredMeaning
branch_idstringrequiredBranch ID: talemo_get_business lists the branches of a business.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
dry_runbooleanoptionalTrue — change nothing and answer the branch as it would be; what the change would be refused with is refused the same way.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.

Described in: Organization, business and branch

talemo_create_branch

Add a branch

Add a branch to a business: another location with its own time zone, address and currency of prices. Without a currency the branch takes no prices: ask the person which one, and offer the usual one of the time zone. A time zone that is not an IANA name, like an offset such as +03:00, is refused with time_zone.invalid; a currency that is not an ISO 4217 code in use, with request.body_invalid.

Guide: account/organisation-business-branch.

  • Changes data

Parameters

ParameterTypeRequiredMeaning
addressstringoptionalStreet address as people write it, up to 300 characters.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
currencystringoptionalCurrency of the prices of the branch, an ISO 4217 code like RUB or EUR. Left out — chosen later; the branch has no prices until then. Ask the person before passing it; the usual one of its time zone is the likely answer.
dry_runbooleanoptionalTrue — add nothing and answer the branch as it would be.
namestringrequiredName of the branch, 1 to 120 characters: usually its street or area.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
time_zonestringrequiredIANA time zone of the branch, for example Europe/Berlin; never an offset. The times of the branch are read and said in this zone.

Described in: Organization, business and branch

talemo_create_role

Make a role

Make a new role of the organization: a name and what it may do. The role works in all the businesses of the organization and is given to nobody yet — people get it from a person in Talemo, through an invitation or in the team list. Put in only what the person asked for, and only what the person holds themselves: a capability they do not hold, or one wider than they hold, is refused with role.ceiling and params.capability; a capability only the owner holds is refused with request.body_invalid. A name already taken in the organization is refused with record.duplicate. Look first with talemo_list_roles: a role that fits may exist, or can be changed with talemo_update_role, or a ready role of Talemo (ready) fits — then send its rights as they are (grants, closed_fields, only_fields) under the name the person calls it in their words; a copy does not follow the pattern afterwards. The role is made only after the person approves it. With dry_run nothing is made and the answer is the role as it would be.

Guide: account/team-and-roles.

  • Changes data

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
closed_fieldsarray of stringoptionalFields closed one by one, as <entity>.<field>.view or .edit, like party.phone.view. Left out — none.
dry_runbooleanoptionalTrue — make nothing and answer the role as it would be.
grantsarray of objectrequiredWhat the role may do, one entry per capability. May be empty: a role that grants nothing yet. A long list is cut off by the length of your answer: make the role with the main rights, then add the rest with add of talemo_update_role.
grants[].capabilitystringrequiredThe capability, a name from the capabilities of talemo_list_roles, like visit.view. A capability that only the owner holds (owner_only) is refused with request.body_invalid.
grants[].reachstringrequiredall — the whole subject; own — only the person's own records, and only for a capability whose own is true.
namestringrequiredThe name of the role in the words of the person, 1 to 60 characters, one per organization whatever the letter case.
only_fieldsobject with array of string valuesoptionalEntities whose fields are an open list: entity → the open fields, like {"party": ["party.family_name.view"]}; the other fields of the entity are closed. Left out — none.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.

Described in: Team and roles

talemo_delete_role

Delete a role

Delete a role of the organization. A role that people hold or that waiting invitations name is refused with role.in_use and params.people and params.invitations — unless reassign_to names another role of the organization that they all move to at once, and then their rights change at their next request. A deleted role is not brought back, only made again. The role the person holds themselves is refused with team.self; a role wider than the person holds, or one to move people to that is wider, with role.ceiling. The role is deleted only after the person approves it. The answer names the role and how many people and waiting invitations moved to reassign_to. With dry_run nothing is deleted and the answer says what would move, or the refusal it would get.

Guide: account/team-and-roles.

  • Changes data
  • May overwrite or remove existing data

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
dry_runbooleanoptionalTrue — delete nothing and answer what would move, or the refusal it would get.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
reassign_tostringoptionalAnother role of the organization that the people and waiting invitations of this one move to at once. Needed when the role is held by someone.
role_idstringrequiredRole ID: talemo_list_roles lists the roles of the organization.

Described in: Team and roles

talemo_get_agent_grant

See what the online admin may do

Show what the online admin of the business may do: what its template declares, which of it the business granted and where, what it always asks a person about first, its daily spending limit — daily_usd in dollars, beside daily_credits, a credit being one cent —, and who granted it and when. Without a grant it answers nobody. Granting is done by a person in Talemo.

Guide: account/team-and-roles.

  • Reads only, changes nothing

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
keystringrequiredThe agent: online_admin, the participant that answers clients in the business channels by itself.

Described in: Built-in agents, Explaining the online admin to a salon owner, Onboarding a new business, Team and roles

talemo_get_business

See the business

Show a business: its name, the organization that pays for it, the languages it serves clients in (service_languages, the first is the language its texts are written in) and its branches with their IDs, time zones and addresses. A closed branch has closed_at; every business keeps at least one open branch.

Guide: account/organisation-business-branch.

  • Reads only, changes nothing

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.

Described in: Organization, business and branch, Service languages

talemo_list_roles

See the roles of the organization

List the roles of the organization of the business: the built-in Owner and the roles the organization made. Each role has its rights (the capabilities with their reach, the closed fields and the open lists of fields), people who hold it in the businesses of the organization and invitations waiting with it. Also the dictionary of capabilities — class, level, whether it has an own reach (own), whether only the owner holds it (owner_only) — and the ready roles of Talemo (ready): the Administrator and the Accountant, and the roles that the kits installed in the business bring, like the Specialist of the booking kit. A ready role is a pattern, not a role of the organization: nobody holds it until it is made with talemo_create_role. A role belongs to the whole organization, not to one business. Giving a role to a person is done by a person in Talemo.

Guide: account/team-and-roles.

  • Reads only, changes nothing

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.

Described in: Team and roles

talemo_reopen_branch

Reopen a branch

Open a closed branch again. Opening an open branch returns it as it is. An unknown branch is refused with not_found.

Guide: account/organisation-business-branch.

  • Changes data
  • The same call twice gives the same result
  • Reaches outside Talemo

Parameters

ParameterTypeRequiredMeaning
branch_idstringrequiredBranch ID: talemo_get_business lists the branches of a business.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
dry_runbooleanoptionalTrue — change nothing and answer the branch as it would be; what the change would be refused with is refused the same way.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.

Described in: Organization, business and branch

talemo_update_branch

Change a branch

Change the name, time zone, address or currency of prices of a branch. Fields left out stay as they are. A new currency keeps the numbers of the prices — 2600 RUB becomes 2600 EUR, nothing is converted — so tell the person first. A new time zone moves the schedules of the resources from today on: the same wall-clock hours in the new zone; if bookings would fall outside them, status 409, code schedule.has_bookings — dry_run shows them first. An unknown branch is refused with not_found.

Guide: account/organisation-business-branch.

  • Changes data
  • May overwrite or remove existing data
  • The same call twice gives the same result
  • Reaches outside Talemo

Parameters

ParameterTypeRequiredMeaning
addressstringoptionalNew street address; an empty string removes it. Left out — stays.
branch_idstringrequiredBranch ID: talemo_get_business lists the branches of a business.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
currencystringoptionalCurrency of the prices of the branch, an ISO 4217 code like RUB or EUR. It can be changed but not removed; the numbers of the prices stay the same, nothing is converted. Left out — stays.
dry_runbooleanoptionalTrue — change nothing and tell what a new time zone would do to the schedules of the resources and which bookings would fall outside them.
namestringoptionalNew name, 1 to 120 characters. Left out — stays as it is.
phonestringoptionalPhone of the branch that clients call. With + the country code decides the country; without it pass phone_country. An empty string removes it. Left out — stays.
phone_countrystringoptionalCountry of a phone written without +, an ISO 3166-1 code like RU or DE.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
time_zonestringoptionalNew IANA time zone, for example Europe/Lisbon. Left out — stays.

Described in: Onboarding a new business, Organization, business and branch, Services, prices and currency

talemo_update_business

Rename the business

Rename a business. Returns the business as it is now.

Guide: account/organisation-business-branch.

  • Changes data
  • May overwrite or remove existing data
  • The same call twice gives the same result
  • Reaches outside Talemo

Parameters

ParameterTypeRequiredMeaning
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
dry_runbooleanoptionalTrue — change nothing and answer the business as it would be.
namestringrequiredThe new name of the business, 1 to 120 characters.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.

Described in: Organization, business and branch

talemo_update_role

Change a role

Change the name or the rights of a role of the organization. To add or take away a few capabilities send add and remove: the other rights of the role stay, and this is the way for a big role. grants sends the capabilities whole and replaces the current ones — only for a short role. The closed fields and the open lists of fields you send replace the current ones whole; what you leave out stays. The change reaches everyone who holds the role, in every business of the organization, at their next request: say how many people hold it (people in talemo_list_roles) before you ask. Rights are narrowed or widened only within what the person holds themselves (role.ceiling); the role the person holds themselves is refused with team.self; an unknown role with not_found. The change is saved only after the person approves it, with what the role is now and what it will be shown. With dry_run nothing changes and the answer is the role as it would be.

Guide: account/team-and-roles.

  • Changes data
  • May overwrite or remove existing data
  • The same call twice gives the same result

Parameters

ParameterTypeRequiredMeaning
addarray of objectoptionalRights to add to the current ones, or whose reach to change; the other rights of the role stay. Not together with grants. Left out — none.
add[].capabilitystringrequiredThe capability, a name from the capabilities of talemo_list_roles, like visit.view. A capability that only the owner holds (owner_only) is refused with request.body_invalid.
add[].reachstringrequiredall — the whole subject; own — only the person's own records, and only for a capability whose own is true.
business_idstringrequiredBusiness ID: one of the businesses this connection may work in — talemo_list_businesses names them. Another business is refused with door.business_forbidden.
closed_fieldsarray of stringoptionalClosed fields as they will be, whole. Left out — stay.
dry_runbooleanoptionalTrue — change nothing and answer the role as it would be.
grantsarray of objectoptionalThe rights of the role as they will be, whole: the list replaces the current one. Send it only for a short role: a long list is cut off by the length of your answer, so change a big role with add and remove. Not together with add or remove. Left out — stay as they are.
grants[].capabilitystringrequiredThe capability, a name from the capabilities of talemo_list_roles, like visit.view. A capability that only the owner holds (owner_only) is refused with request.body_invalid.
grants[].reachstringrequiredall — the whole subject; own — only the person's own records, and only for a capability whose own is true.
namestringoptionalThe new name, 1 to 60 characters. Left out — stays.
only_fieldsobject with array of string valuesoptionalEntities with an open list of fields as they will be, whole. Left out — stay.
preview_idstringoptionalThe preview_id from the answer of the dry_run of this same call, once the person has seen that answer. A change Talemo would ask a person about is made only with it; it is fresh for ten minutes and is used once. Leave it out on the dry_run itself.
removearray of stringoptionalCapabilities to take away from the role, names like visit.view; one the role does not have is already away. Not together with grants, and not the same capability as in add. Left out — none.
role_idstringrequiredRole ID: talemo_list_roles lists the roles of the organization.

Described in: Team and roles