2.0info: 1.14.2 Finanças – Controle de saldos da tesouraria description: Serviço de controle de saldos da tesouraria x-senior-domain: ERPX x-senior-domain-path: erpx_fin x-senior-service-path: tes_saldos 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/erpx_finsecurityDefinitions: APIKeyHeader: type: apiKey in: header name: Authorizationsecurity: – APIKeyHeader: [] – application/json – application/jsonpaths: /tes_saldos/queries/healthcheck: post: description: Query para o SRE verificar a disponibilidade do serviço tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/upDown description: Status geral do serviço checks: type: array items: type: object allOf: – #/definitions/checkData minimum: 1 description: Verificações para assegurar o status 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 parameters: responses: 200: description: Ok schema: type: object required: – status – checks properties: status: type: string allOf: – #/definitions/upDown description: Status geral do serviço checks: type: array items: type: object allOf: – #/definitions/checkData minimum: 1 description: Verificações para assegurar o status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tes_saldos/queries/obterSaldosContasInternas: post: description: Primitiva que retorna o saldos das contas internas tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – periodoInicial – periodoFinal properties: empresaId: type: array items: type: string description: Filtro por empresa tipoContaId: type: array items: type: string description: Filtro por tipo de conta contaInternaId: type: array items: type: string description: Filtro por conta interna periodoInicial: type: string format: date description: Filtro por período inicial do movimento periodoFinal: type: string format: date description: Filtro por período final do movimento transacaoId: type: array items: type: string description: Filtro por transação do movimento modalidadeMovimentoTesouraria: type: string allOf: – #/definitions/enumModalidadeMovimentoTesouraria description: Indicativo da busca do movimento (por data de liberação ou por data de movimento) buscarSaldo: type: string allOf: – #/definitions/enumBuscarSaldo description: Tipo de saldo a ser retornado valorInicial: type: string description: Filtro por valor – Faixa inicial valorFinal: type: string description: Filtro por valor – Faixa final naturezaMovimento: type: string allOf: – #/definitions/enumNatureza description: Filtro por natureza de movimento documento: type: array items: type: string description: Filtro por documento numeroCheque: type: array items: type: integer format: int64 description: Filtro por número de cheque pageRequest: type: object allOf: – #/definitions/recPageRequest description: Controle de paginação responses: 200: description: Ok schema: type: object required: – total – saldos properties: total: type: integer format: int64 description: Quantidade de saldos a paginar saldos: type: array items: type: object allOf: – #/definitions/recSaldoContaInterna minimum: 1 description: Saldos retornados 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /tes_saldos/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 /tes_saldos/queries/getDependencies: post: description: Returns a list with all dependencies from this service, along with their respective versions tags: – Queries x-senior-visibility: PRIVATE 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: PRIVATE 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 /tes_saldos/signals/updateAccountBalance: post: description: Atualiza o saldo mensal da conta tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – movementData properties: movementData: type: array items: type: object allOf: – #/definitions/recAccountMovement minimum: 1 description: Dados do movimento da conta controlProcessId: type: string description: Ticket responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericError /tes_saldos/signals/updateAccountBalanceByTesouraria: post: description: Atualiza o saldo mensal da conta – processo origem tesouraria tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – movementData properties: movementData: type: array items: type: object allOf: – #/definitions/recAccountMovement minimum: 1 description: Dados do movimento da conta controlProcessId: type: string description: Ticket responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericError /tes_saldos/signals/updateAccountBalanceByContasPagar: post: description: Atualiza o saldo mensal da conta – processo origem contas pagar tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – movementData properties: movementData: type: array items: type: object allOf: – #/definitions/recAccountMovement minimum: 1 description: Dados do movimento da conta controlProcessId: type: string description: Ticket responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericError /tes_saldos/signals/updateAccountBalanceByContasReceber: post: description: Atualiza o saldo mensal da conta – processo origem contas receber tags: – Signals parameters: – name: input in: body required: true schema: type: object required: – movementData properties: movementData: type: array items: type: object allOf: – #/definitions/recAccountMovement minimum: 1 description: Dados do movimento da conta controlProcessId: type: string description: Ticket responses: 202: description: Accepted default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceFinished: post: description: Evento disparado quando a atualização o saldo mensal da conta é finalizado com sucesso x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId properties: controlProcessId: type: string description: Ticket responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceError: post: description: Evento disparado quando ocorre algum erro ao atualizar o saldo mensal da conta x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId – message properties: controlProcessId: type: string description: Ticket message: type: string description: Mensagem de erro ao atualizar o saldo da conta stackTrace: type: string description: Stack Trace responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceFinishedByTesouraria: post: description: Evento disparado quando a atualização o saldo mensal da conta é finalizado com sucesso – processo origem tesouraria x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId properties: controlProcessId: type: string description: Ticket responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceErrorByTesouraria: post: description: Evento disparado quando ocorre algum erro ao atualizar o saldo mensal da conta – processo origem tesouraria x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId – message properties: controlProcessId: type: string description: Ticket message: type: string description: Mensagem de erro ao atualizar o saldo da conta stackTrace: type: string description: Stack Trace responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceFinishedByContasPagar: post: description: Evento disparado quando a atualização o saldo mensal da conta é finalizado com sucesso – processo origem contas pagar x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId properties: controlProcessId: type: string description: Ticket responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceErrorByContasPagar: post: description: Evento disparado quando ocorre algum erro ao atualizar o saldo mensal da conta – processo origem contas pagar x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId – message properties: controlProcessId: type: string description: Ticket message: type: string description: Mensagem de erro ao atualizar o saldo da conta stackTrace: type: string description: Stack Trace responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceFinishedByContasReceber: post: description: Evento disparado quando a atualização o saldo mensal da conta é finalizado com sucesso – processo origem contas pagar x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId properties: controlProcessId: type: string description: Ticket responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /tes_saldos/events/updateAccountBalanceErrorByContasReceber: post: description: Evento disparado quando ocorre algum erro ao atualizar o saldo mensal da conta – processo origem contas pagar x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object required: – controlProcessId – message properties: controlProcessId: type: string description: Ticket message: type: string description: Mensagem de erro ao atualizar o saldo da conta stackTrace: type: string description: Stack Trace responses: 200: description: OK default: description: Error response schema: #/definitions/genericErrordefinitions: upDown: description: Up or down type: string enum: – UP – DOWN enumDebCre: description: Enumeração débito/crédito type: string enum: – VD – VC enumSitMov: description: Enumeração situação do movimento type: string enum: – VA – VI enumNatureza: description: Filtrar por natureza type: string enum: – CREDITO – DEBITO – TODOS enumTypeOrder: description: Enumeração para o tipo de ordenação type: string enum: – ASC – DESC enumBuscarSaldo: description: type: string enum: – CONCILIADOS – NAO_CONCILIADOS – SO_SALDOS – TODOS enumModalidadeMovimentoTesouraria: description: type: string enum: – LIBERACAO – MOVIMENTO enumSitReg: description: type: string enum: – VA – VI enumTipCnc: description: type: string enum: – VA – VM enumOriMcc: description: type: string enum: – VCR – VCP – VCM – VCH – VOU enumTipoSaldo: description: type: string enum: – SALDO_ANTERIOR – SALDO_ATUAL – MOVIMENTO 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 checkData: description: Dados do healthcheck type: object required: – name – status properties: name: type: string description: Nome do healthcheck status: type: string allOf: – #/definitions/upDown description: Status do healthcheck recAccountMovement: description: Record com os dados do movimento da conta type: object required: – e600ccoId – vlrMov – vlrMoe – debCre – datMov – sitMov properties: e600ccoId: type: string description: Id da conta interna vlrMov: type: string description: Valor Movimento minimum: 0.00 maximum: 9999999999999.99 vlrMoe: type: string description: Valor Movimento em moeda estrangeira minimum: 0.00 maximum: 9999999999999.99 debCre: type: string allOf: – #/definitions/enumDebCre description: Débito/Crédito datMov: type: string format: date description: Data Movimento datLib: type: string format: date description: Data Liberação sitMov: type: string allOf: – #/definitions/enumSitMov description: Situação do movimento recPageRequest: description: type: object required: – offset – size properties: offset: type: integer format: int64 description: size: type: integer format: int64 description: orderBy: type: array items: type: object allOf: – #/definitions/recFieldsOrderBy description: Campos da ordenação dos registros a serem pesquisados recFieldsOrderBy: description: Define o registro com os dados dos campos à serem ordenados type: object required: – field – order properties: field: type: string description: Nome do campo a ser ordenado order: type: string allOf: – #/definitions/enumTypeOrder description: Tipo de ordenação do campo (ASC / DESC) recSaldoContaInterna: description: Estrutura de saldo da conta interna type: object required: – data – movimento – saldoDisponivel – saldoAcumulado – saldoDisponivelMoeda – saldoAcumuladoMoeda properties: data: type: string format: date description: Data atual movimnetação movimento: type: object allOf: – #/definitions/recMovimentoTesourariaConsulta description: Movimento tipoSaldo: type: string allOf: – #/definitions/enumTipoSaldo description: Tipo de de saldo saldoDisponivel: type: string description: Saldo disponível dos movimentos saldoAcumulado: type: string description: Saldo acumulado dos movimentos saldoDisponivelMoeda: type: string description: Saldo disponível dos movimentos na moeda da conta saldoAcumuladoMoeda: type: string description: Saldo acumulado dos movimentos na moeda da conta recMovimentoTesourariaConsulta: description: Movimento gerado na tesouraria type: object required: – empresa – filial – contaInterna – transacao – dataMovimento – dataLiberacao – dataContabil – natureza – valorMovimento – informacoesAdicionaisTesouraria properties: id: type: string description: Identificador do movimento empresa: type: object allOf: – #/definitions/recGenerico description: Informação da empresa filial: type: object allOf: – #/definitions/recGenerico description: Filial contaInterna: type: object allOf: – #/definitions/recGenerico description: Conta interna utilizada transacao: type: object allOf: – #/definitions/recGenerico description: Transação utilizada dataMovimento: type: string format: date description: Data do movimento de transferência dataLiberacao: type: string format: date description: Data da liberação dataContabil: type: string format: date description: Data contábil natureza: type: string allOf: – #/definitions/enumDebCre description: Natureza do movimento (Débito/Crédito) valorMovimento: type: string description: Valor do movimento informacoesAdicionaisTesouraria: type: object allOf: – #/definitions/recInformacoesAdicionaisMovimentoTesourariaConsulta description: Informações adicionais do movimento da tesouraria conciliado: type: boolean description: Indicativo se o movimento está conciliado recInformacoesAdicionaisMovimentoTesourariaConsulta: description: Informações adicionais do movimento da tesouraria type: object required: – origemMovimento – tipoMovimento – lancadoPlanoFinanceiro – situacaoMovimento – usuarioGerador – dataGeracao properties: origemMovimento: type: string allOf: – #/definitions/enumOriMcc description: Origem do movimento tipoMovimento: type: string allOf: – #/definitions/enumTipCnc description: Tipo de movimento numeroCheque: type: integer format: int64 description: Número do cheque naturezaGasto: type: object allOf: – #/definitions/recGenerico description: Informação da natureza de gasto tipoDocumento: type: object allOf: – #/definitions/recGenerico description: Indicativo do tipo de documento numeroDocumento: type: string maxLength: 20 description: Número do documento do movimento historico: type: string maxLength: 100 description: Histórico do movimento complemento: type: string maxLength: 100 description: Complemento do histórico do movimento observacao: type: string maxLength: 250 description: Observação do movimento nomeRecebedor: type: string maxLength: 100 description: Nome do recebedor do cheque loteContabil: type: integer format: int64 description: Número do lote contábil lancadoPlanoFinanceiro: type: boolean description: Lançado no plano financeiro situacaoMovimento: type: string allOf: – #/definitions/enumSitReg description: Situacao valoresMovimentoTesourariaMoedaEstrangeira: type: object allOf: – #/definitions/recValoresMovimentoTesourariaMoedaEstrangeira description: Informações do movimento da tesouraria em moeda estrangeira rateio: type: object allOf: – #/definitions/recRateioGenerico description: Informações rateio conciliado: type: boolean description: Indicativo se o movimento está conciliado usuarioGerador: type: string description: Usuário que realizou o movimento dataGeracao: type: string format: date-time description: Data da geração do movimento recValoresMovimentoTesourariaMoedaEstrangeira: description: Informações do movimento da tesouraria em moeda estrangeira type: object required: – valorDataMovimento – cotacaoDataMovimento – valorDataLiberacao – cotacaoDataLiberacao properties: valorDataMovimento: type: string description: Valor do movimento na moeda estrangeria na data de movimento cotacaoDataMovimento: type: string description: Valor da cotação do movimento na moeda estrangeria na data de movimento valorDataLiberacao: type: string description: Valor do movimento na moeda estrangeria na data de liberação cotacaoDataLiberacao: type: string description: Valor da cotação do movimento na moeda estrangeria na data de liberação recRateioGenerico: description: Indicativo das informações para geração de rateio type: object properties: projeto: type: object allOf: – #/definitions/recGenerico description: Indicativo do projeto faseProjeto: type: object allOf: – #/definitions/recGenerico description: Indicativo da fase do projeto contaFinanceira: type: object allOf: – #/definitions/recGenerico description: Indicativo da conta financeira contaContabil: type: object allOf: – #/definitions/recGenerico description: Indicativo da conta contábil centroCustos: type: object allOf: – #/definitions/recGenerico description: Indicativo do centro de custos recGenerico: description: Record para retorno das informações principais de uma entidade type: object required: – id – label – codigo – descricao properties: id: type: string description: Identificador da entidade label: type: string description: Descrição do label codigo: type: string description: Código de negócio descricao: type: string description: Descrição de negócio 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