Skip to content
Navigation

Switch the active agency

POST
https://api.nicer.travel/identity/company/{companyName}/switch

Makes an agency the one the caller acts for: checks they are an active member with portal access (Nicer staff enter any agency, a suspended one included), writes it as their active company and role on their account and publishes the switch. The portal refreshes its token afterwards. Any signed-in person, for themself. Errors: 400 COMPANY_NOT_AVAILABLE for an agency there is not or one that is suspended, 400 ERROR_UNAUTHORIZED for an agency the caller is not an active member of or whose portal is closed to them.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Path parameters

  • companyName
    string
    required

Returns

200

OK

JSON
  • companyName
    string
    required
  • message
    string
    required

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close