Remove a member from an agency
Removes a person from an agency's staff. The membership is kept with status removed, so the person's next token, when it is issued or refreshed, no longer carries the agency, and app.CompanyMember.removed is published, which tells the CRM to leave the travelers they served for an admin to reassign. The person's account, and their memberships in other agencies, are untouched. Only an admin of the agency, or Nicer staff, may call it; staff must name the agency, and companyName in the path must be the agency the request acts for (x-nicer-company). The legacy company-level superadmin membership is Nicer staff's, and only staff remove it. An admin may remove themself unless they are the agency's last admin. Errors: 404 ERROR_ITEM_NOT_FOUND (the person is not an active member of this agency's staff, or the path names another agency), 403 ERROR_DO_NOT_HAVE_PERMISSION (the caller is neither an admin of the agency nor Nicer staff, or an agency admin removing the legacy superadmin membership), 409 ERROR_LAST_ADMIN (the agency would be left without an admin), 409 ERROR_CONDITIONAL_CHECK_FAILED (the membership kept changing while it was removed: read it again).
Authorization
Path parameters
Header parameters
Returns
200
OK
- removedAtstringrequired
When the membership was removed.
format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$