2.0info: 2.16.1 Gerenciamento de Integrações description: Serviço responsável pelo gerenciamento das integrações do CRM. x-senior-domain: CRM x-senior-domain-path: crm x-senior-service-path: integration_management 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/crmsecurityDefinitions: APIKeyHeader: type: apiKey in: header name: Authorizationsecurity: – APIKeyHeader: [] – application/json – application/jsonpaths: /integration_management/queries/healthcheck: post: description: Health check padrão tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status properties: status: type: string allOf: – #/definitions/statusHeathCheckEnum description: Status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Health check padrão tags: – Queries x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – status properties: status: type: string allOf: – #/definitions/statusHeathCheckEnum description: Status 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/queries/getIntegrationDataByTenant: post: description: Retorna o histórico das integrações dos últimos 30 dias do tenant informado tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – tenant properties: tenant: type: string maxLength: 255 description: Tenant a ser usado para buscar responses: 200: description: Ok schema: type: object required: – integrationData properties: integrationData: type: array items: type: object allOf: – #/definitions/controlQueueRecord minimum: 1 description: Dados das Integrações 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Retorna o histórico das integrações dos últimos 30 dias do tenant informado tags: – Queries x-senior-visibility: PRIVATE parameters: – name: tenant description: Tenant a ser usado para buscar in: query required: true type: string maxLength: 255 responses: 200: description: Ok schema: type: object required: – integrationData properties: integrationData: type: array items: type: object allOf: – #/definitions/controlQueueRecord minimum: 1 description: Dados das Integrações 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/queries/isProcessing: post: description: Informa se a integração informada está sendo processada tags: – Queries x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: Ok schema: type: object required: – processing properties: processing: type: boolean description: Indica se está processando 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError get: description: Informa se a integração informada está sendo processada tags: – Queries x-senior-visibility: PRIVATE parameters: – name: integrationName description: Nome da integração in: query required: true type: string allOf: – #/definitions/integrationNameEnum – name: way description: Referente ao sentido/caminho da integração in: query required: true type: string allOf: – #/definitions/pathIntegrationEnum – name: identifier description: Identificador do Registro in: query type: string maxLength: 255 responses: 200: description: Ok schema: type: object required: – processing properties: processing: type: boolean description: Indica se está processando 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/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 maxLength: 255 description: responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string maxLength: 255 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 maxLength: 255 responses: 200: description: Ok schema: type: object required: – metadata properties: metadata: type: string maxLength: 255 description: 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/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 /integration_management/actions/deleteIntegrationControl: post: description: Deleta o registro em aberto do controle de execução da integração informada tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object required: – tenant – integrationNames properties: tenant: type: string maxLength: 255 description: Tenant integrationNames: type: array items: type: string allOf: – #/definitions/integrationNameEnum minimum: 1 description: Nome da integração responses: 200: description: Ok schema: type: object required: – deleted properties: deleted: type: boolean description: Informa se foi deletado 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/actions/initializeIntegration: post: description: Inicia integração com os dados informados tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/actions/finalizeIntegration: post: description: Finalizar integração com os dados informados tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/finishedIntegrationDataRecord responses: 200: description: Ok schema: type: object 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/actions/start: post: description: Inicia a integração tags: – Actions x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – processed properties: processed: type: boolean description: Se a integração foi iniciada 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/actions/stop: post: description: Para a integração tags: – Actions x-senior-visibility: PRIVATE responses: 200: description: Ok schema: type: object required: – processed properties: processed: type: boolean description: Se a integração foi parada 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/actions/execute: post: description: Executa a integração informada de forma assíncrona. tags: – Actions x-senior-visibility: PRIVATE parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: Ok schema: type: object allOf: – #/definitions/integrationDataRecord 401: description: Invalid Credentials default: description: Error response schema: #/definitions/genericError /integration_management/events/executeSenior: post: description: Informa que uma integração do ERP Senior foi executada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/startSenior: post: description: Informa que uma integração do ERP Senior foi iniciada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/stopSenior: post: description: Informa que uma integração do ERP Senior foi parada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/executeSeniorX: post: description: Informa que uma integração do ERP SeniorX foi executada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/startSeniorX: post: description: Informa que uma integração do ERP SeniorX foi iniciada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/stopSeniorX: post: description: Informa que uma integração do ERP SeniorX foi parada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/executeSeniorXT: post: description: Informa que uma integração do ERP SeniorXT foi executada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/startSeniorXT: post: description: Informa que uma integração do ERP SeniorXT foi iniciada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/stopSeniorXT: post: description: Informa que uma integração do ERP SeniorXT foi parada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/executeNovasoft: post: description: Informa que uma integração do ERP Novasoft foi executada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/startNovasoft: post: description: Informa que uma integração do ERP Novasoft foi iniciada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/stopNovasoft: post: description: Informa que uma integração do ERP Novasoft foi parada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/executeMega: post: description: Informa que uma integração do Mega foi executada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object allOf: – #/definitions/integrationDataRecord responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/startMega: post: description: Informa que uma integração do Mega foi iniciada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericError /integration_management/events/stopMega: post: description: Informa que uma integração do Mega foi parada. x-senior-event: true tags: – Events parameters: – name: input in: body required: true schema: type: object responses: 200: description: OK default: description: Error response schema: #/definitions/genericErrordefinitions: statusHeathCheckEnum: description: Enum usado no health check desse serviço type: string enum: – UP – DOWN integrationNameEnum: description: Nome das integrações realizadas pelo CRM. type: string enum: – ACCOUNT – CONTACT – PRICE_TABLE – MEASUREMENT_UNIT – OPPORTUNITY_TYPE – PAYMENT_TERMS – OPPORTUNITY – PRODUCT – PENDING_TABLE – COMPANY – BRANCH – COMPANY_BRANCH – CARRIER – USER – USER_GROUP – COUNTRY – STATE – CITY – SERVICE_CATEGORY – PRODUCT_CATEGORY – INITIAL_CHARGE – ACTIVITY_BRANCH – PAYMENT_TYPE – SERVICE pathIntegrationEnum: description: Referente aos sentidos/caminhos possíveis da integração type: string enum: – CRM_TO_ERP – ERP_TO_CRM 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 integrationDataRecord: description: Objeto referente aos dados da integração. discriminator: _discriminator type: object required: – integrationName – way – _discriminator properties: integrationName: type: string allOf: – #/definitions/integrationNameEnum description: Nome da integração way: type: string allOf: – #/definitions/pathIntegrationEnum description: Referente ao sentido/caminho da integração identifier: type: string maxLength: 255 description: Identificador do Registro _discriminator: type: string maxLength: 255 description: finishedIntegrationDataRecord: description: Informações do status atual da integração allOf: – #/definitions/integrationDataRecord – type: object properties: log: type: string maxLength: 10485760 description: Log controlQueueRecord: description: Record referente a entidade ControlQueueEntity allOf: – #/definitions/finishedIntegrationDataRecord – type: object properties: initializedBy: type: string maxLength: 255 description: Inicializado por initializedAt: type: string format: date-time description: Inicializado em finishedAt: type: string format: date-time description: Finalizado em 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 maxLength: 255 description: Class of notification notificationOrigin: type: string maxLength: 255 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 maxLength: 255 description: Notification subject. notificationContent: type: string maxLength: 255 description: Notification content. sourceDomain: type: string maxLength: 255 description: Domain that generates the notification. sourceService: type: string maxLength: 255 description: Service that generates the notification. destinationUser: type: string maxLength: 255 description: Username of the destination user. link: type: string maxLength: 255 description: Notification link _discriminator: type: string maxLength: 255 description: emailNotifyUserEventPayload: description: Represents an email notification payload allOf: – #/definitions/notifyUserEventPayload – type: object required: – from properties: from: type: string maxLength: 255 description: Email sender address sendTo: type: array items: type: string maxLength: 255 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 maxLength: 255 description: Apple/Google application id blobReference: description: Default blob reference type. Every service defines its own. type: object required: – targetObjectId properties: domainName: type: string maxLength: 255 description: The domain the blob belongs to. serviceName: type: string maxLength: 255 description: The service the blob belongs to. targetObjectId: type: string maxLength: 255 description: The basic id of the blob. targetCopyId: type: string maxLength: 255 description: The id of the blob copy. basicErrorPayload: description: Default error payload type. Every service defines its own. type: object properties: message: type: string maxLength: 255 description: The user-facing error message, if any. errorCode: type: string maxLength: 255 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 maxLength: 255 description: Domain of the dependency service service: type: string maxLength: 255 description: Name of the dependency service type: string maxLength: 255 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