2.0info: 1.4.0 account x-senior-domain: platform x-senior-domain-path: platform x-senior-service-path: account contact: name: Senior X Platform url: https://dev.senior.com.br email: seniorx-dev@senior.com.brhost: platform.senior.com.br /t/senior.com.br/bridge/1.0/rest/platformsecurityDefinitions: APIKeyHeader: type: apiKey in: header name: Authorizationsecurity: – APIKeyHeader: [] – application/json – application/jsonpaths: /account/queries/healthcheck: post: description: Query para o SRE verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Status do serviços checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Items avaliados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Query para o SRE verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/healthCheckStatus description: Status do serviços checks: type: array items: type: object allOf: – #/definitions/checkDTO minimum: 1 description: Items avaliados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/listAccount: post: description: Lista as contas existentes podendo utilizar alguns filtros tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: search: type: string maxLength: 255 description: Valor a ser buscado no nome e identificador do cliente status: type: string allOf: – #/definitions/accountStatus description: Estado da conta atual pagination: type: object allOf: – #/definitions/pagination description: As configurações de paginação da listagem. Não definido, retornará os 10 primeiros resultados. responses: 200: description: Ok schema: type: object required: – accounts – listInformation properties: accounts: type: array items: type: object allOf: – #/definitions/accountListItem minimum: 1 description: listInformation: type: object allOf: – #/definitions/listInformation description: Informações sobre os resultados da listagem 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/listTenants: post: description: Lista as tenants existentes de uma conta tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: search: type: string maxLength: 255 description: Valor a ser buscado no nome e identificador do cliente status: type: string allOf: – #/definitions/accountStatus description: Estado da conta atual pagination: type: object allOf: – #/definitions/pagination description: As configurações de paginação da listagem. Não definido, retornará os 10 primeiros resultados. responses: 200: description: Ok schema: type: object required: – tenants – listInformation properties: tenants: type: array items: type: object allOf: – #/definitions/tenantAccountListItem minimum: 1 description: listInformation: type: object allOf: – #/definitions/listInformation description: Informações sobre os resultados da listagem 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/listCountryIdentifiers: post: description: Lista as documentos existentes de uma conta tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – id properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador da conta responses: 200: description: Ok schema: type: object required: – countryIdentifiers properties: countryIdentifiers: type: array items: type: object allOf: – #/definitions/countryIdentifier minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/getAccount: post: description: Busca informações da conta tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – id properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador responses: 200: description: Ok schema: type: object required: – account properties: account: type: object allOf: – #/definitions/account description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/findAccountByCountryIdentifier: post: description: Busca informações da conta tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – countryIdentifier properties: countryIdentifier: type: string maxLength: 255 description: Identificador da conta responses: 200: description: Ok schema: type: object required: – account properties: account: type: array items: type: object allOf: – #/definitions/account minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Busca informações da conta tags: – Queries x-senior-visibility: PRIVATE parameters: – name: countryIdentifier description: Identificador da conta in: query required: true type: string maxLength: 255 responses: 200: description: Ok schema: type: object required: – account properties: account: type: array items: type: object allOf: – #/definitions/account minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/getMetadata: post: description: Default getMetadata query. Every service must handle this command and return metadata in the format requested. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object properties: metadataFormat: type: string description: responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Default getMetadata query. Every service must handle this command and return metadata in the format requested. tags: – Queries x-senior-visibility: PRIVATE parameters: – name: metadataFormat description: in: query type: string responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/queries/getDependencies: post: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PUBLIC responses: 200: description: Ok schema: type: object required: – dependencies properties: dependencies: type: array items: type: object allOf: – #/definitions/dependency minimum: 1 description: List with this service dependencies 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PUBLIC responses: 200: description: Ok schema: type: object required: – dependencies properties: dependencies: type: array items: type: object allOf: – #/definitions/dependency minimum: 1 description: List with this service dependencies 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/actions/linkAccount: post: description: Vincula um tenant à uma conta, se ele já estava vinculado a outra conta, então este é removido tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – link properties: link: type: array items: type: object allOf: – #/definitions/accountLink minimum: 1 description: responses: 200: description: Ok schema: type: object required: – accounts properties: accounts: type: array items: type: object allOf: – #/definitions/accountLinked minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/actions/unlinkAccount: post: description: Desvincula um tenant de uma conta, ao desvincular, uma nova conta é criada com as informações do tenant tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – unlink properties: unlink: type: array items: type: object allOf: – #/definitions/accountLink minimum: 1 description: responses: 200: description: Ok schema: type: object required: – accounts properties: accounts: type: array items: type: object allOf: – #/definitions/accountUnlinked minimum: 1 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /account/signals/triggerIntegration: post: description: tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – type properties: type: type: string allOf: – #/definitions/integrationTrigger description: Tipo da integração responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericErrordefinitions: healthCheckStatus: description: Status do healthcheck type: string enum: – UP – DOWN accountStatus: description: Estado atual da conta type: string enum: – LINKED_INTEGRATED – INTEGRATED – UNLINKED integrationTrigger: description: Tipo da integração type: string enum: – TENANT – CLIENT userNotificationKind: description: User notification kind. type: string enum: – Operational – Management – News userNotificationPriority: description: User notification priority. type: string enum: – Error – Alert – None eventEmailFormat: description: Format of the email type: string enum: – HTML – PLAIN_TEXT checkDTO: description: Componente avaliado no healthcheck type: object required: – name – status properties: name: type: string description: Nome do componente status: type: string allOf: – #/definitions/healthCheckStatus description: Status do componente tenantAccountListItem: description: O objeto de uma conta de listagem type: object required: – name – domain – status – account properties: name: type: string description: Nome do tenant domain: type: string description: Domínio do tenant status: type: string allOf: – #/definitions/accountStatus description: Estado atual da conta account: type: object allOf: – #/definitions/accountIdentifier description: O vínculo atual com o account accountListItem: description: O objeto de uma conta de listagem type: object required: – id – name – status properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador name: type: string description: Nome status: type: string allOf: – #/definitions/accountStatus description: Estado atual da conta account: description: O objeto de uma conta type: object required: – id – name – status properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador name: type: string description: Nome status: type: string allOf: – #/definitions/accountStatus description: Estado atual da conta countryIdentifiers: type: array items: type: object allOf: – #/definitions/countryIdentifier description: Identificador do cliente, CNPJ, CPF, etc linked: type: array items: type: object allOf: – #/definitions/tenant description: Tenants vinculados contacts: type: array items: type: object allOf: – #/definitions/contactInformation description: Contatos accountUnlinked: description: O objeto de uma conta type: object required: – id – newId – tenant properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador da conta desvinculada newId: type: object allOf: – #/definitions/accountIdentifier description: Identificador da nova conta tenant: type: object allOf: – #/definitions/tenant description: Tenant que foi desvinculado accountLinked: description: O objeto de uma conta type: object required: – id – tenant properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador da conta vinculada tenant: type: object allOf: – #/definitions/tenant description: Tenant vinculado countryIdentifier: description: O objeto idenficador(CNPJ, CPF, etc) de um cliente. type: object properties: identifier: type: string description: Identificador de um cliente, CNPJ, CPF, etc accountIdentifier: description: Uma conta deve conter ao menos um dos identificadores, uma conta criada sempre terá um id, mas não necessariamente um integrationCode type: object properties: id: type: string description: Identificador interno da conta integrationCode: type: string description: Código externo da conta tenant: description: Registro de um tenant da plataforma type: object required: – name – domain properties: name: type: string description: Nome do tenant domain: type: string description: Domínio do tenant contactInformation: description: Informação de contato type: object required: – name properties: name: type: string maxLength: 255 description: Nome do contato department: type: string maxLength: 255 description: Setor do contato jobTitle: type: string maxLength: 255 description: Cargo do contato phones: type: array items: type: object allOf: – #/definitions/contactPhone description: Telefones do contato email: type: string maxLength: 255 description: E-mail do contato contactPhone: description: Telefone de um contato type: object required: – number properties: number: type: string maxLength: 50 description: Número extension: type: string maxLength: 50 description: Ramal accountLink: description: Registro para vinculo/desvínculo de tenants type: object required: – id – tenants properties: id: type: object allOf: – #/definitions/accountIdentifier description: Identificador da conta tenants: type: array items: type: object allOf: – #/definitions/tenant minimum: 1 description: Tenants pagination: description: As configurações de paginação de uma listagem type: object properties: pageNumber: type: integer format: int64 description: O número da página retornado. A primeira página corresponde ao índice 0 default: 0 pageSize: type: integer format: int64 description: Quantidade de registros por página default: 10 listInformation: description: As informações sobre os resultados de listagem realizada type: object required: – totalElements – totalPages properties: totalElements: type: integer format: int64 description: Quantidade total de resultados encontrados totalPages: type: integer format: int64 description: Quantidade total de páginas encontradas notifyUserEventPayload: description: Represents a regular user event notification payload discriminator: _discriminator type: object required: – notificationKind – notificationPriority – notificationSubject – notificationContent – sourceDomain – sourceService – destinationUser – _discriminator properties: notificationClass: type: string description: Class of notification notificationOrigin: type: string description: Origin of notification. Free text. Optional. notificationKind: type: string allOf: – #/definitions/userNotificationKind description: Notification kind. notificationPriority: type: string allOf: – #/definitions/userNotificationPriority description: Notification priority. notificationSubject: type: string description: Notification subject. notificationContent: type: string description: Notification content. sourceDomain: type: string description: Domain that generates the notification. sourceService: type: string description: Service that generates the notification. destinationUser: type: string description: Username of the destination user. link: type: string description: Notification link _discriminator: type: string description: emailNotifyUserEventPayload: description: Represents an email notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – from properties: from: type: string description: Email sender address sendTo: type: array items: type: string description: Additional recipients to send the email to format: type: string allOf: – #/definitions/eventEmailFormat description: Email format pushNotifyUserEventPayload: description: Represents a push notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – applicationId properties: applicationId: type: string description: Apple/Google application id blobReference: description: Default blob reference type. Every service defines its own. type: object required: – targetObjectId properties: domainName: type: string description: The domain the blob belongs to. serviceName: type: string description: The service the blob belongs to. targetObjectId: type: string description: The basic id of the blob. targetCopyId: type: string description: The id of the blob copy. basicErrorPayload: description: Default error payload type. Every service defines its own. type: object properties: message: type: string description: The user-facing error message, if any. errorCode: type: string description: The program-accessible (and service-specific) error code. dependency: description: Represents a service dependency type: object required: – domain – service – version properties: domain: type: string description: Domain of the dependency service service: type: string description: Name of the dependency service type: string description: Version of the dependency service genericError: properties: message: type: string description: Messaging describing the error. reason: type: string description: A symbolic code identifying the category of the reason of the error. enum: – BAD_REQUEST – UNAUTHORIZED – PAYMENT_REQUIRED – FORBIDDEN – OBJECT_NOT_FOUND – REQUEST_TIMEOUT – GONE – UNPROCESSABLE – INTERNAL_ERROR – NOT_IMPLEMENTED – SERVICE_UNAVAILABLE – INSUFFICIENT_STORAGE