2.0info: 1.7.0 Ocorrência description: Serviço responsável pelo módulo de ocorrências do CRM. x-senior-domain: CRM x-senior-domain-path: crm x-senior-service-path: occurrence contact: name: Senior X Platform url: https://dev.senior.com.br email: seniorx-dev@senior.com.brhost: api.senior.com.br /crm/occurrencesecurityDefinitions: bearerAuth: type: apiKey in: header name: Authorization – application/json – application/jsonparameters: clientId: name: client_id type: string in: header required: true description: Identificação da aplicação cadastrada no portal do desenvolvedor (api.xplatform.com.br)paths: /apis/occurrence: post: description: The create request primitive for the occurrence facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: #/definitions/occurrenceFacade responses: 200: description: Ok schema: #/definitions/occurrenceFacade default: description: Error response schema: #/definitions/genericError get: description: The list request primitive for the occurrence facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: offset in: query type: number – name: size in: query type: number responses: 200: description: Ok schema: type: object required: – contents properties: contents: #/definitions/occurrenceFacade default: description: Error response schema: #/definitions/genericError /apis/occurrence/{id}: put: description: The update request primitive for the occurrence facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: id in: path required: true type: string – name: input in: body required: true schema: #/definitions/occurrenceFacade responses: 200: description: Ok schema: #/definitions/occurrenceFacade default: description: Error response schema: #/definitions/genericError get: description: The retrieve request primitive for the occurrence facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: id in: path required: true type: string responses: 200: description: Ok schema: #/definitions/occurrenceFacade default: description: Error response schema: #/definitions/genericError delete: description: The delete request primitive for the occurrence facade. deprecated: false tags: – Apis security: – bearerAuth: [] parameters: – #/parameters/clientId – name: id in: path required: true type: string responses: 200: description: Ok default: description: Error response schema: #/definitions/genericErrordefinitions: occurrenceFacade: type: object properties: id: type: integer description: ID date: type: string description: Data format: date-time hour: type: string description: Hora format: date-time userId: type: integer description: ID do usuário groupId: type: integer description: ID do grupo campaignId: type: integer description: ID da campanha subaccountId: type: integer description: ID da subconta relationshipId: type: integer description: ID do relacionamento companyId: type: integer description: ID da empresa name: type: string description: Nome occurrenceSubtypeId: type: integer description: ID do subtipo da ocorrência departmentId: type: integer description: ID do departamento priority: type: string description: Prioridade description: type: string description: Descrição status: type: integer description: Status expectedStartDate: type: string description: Data de início esperada format: date-time expectedStartHour: type: string description: Hora de início esperada format: date-time effectiveStartDate: type: string description: Data de início efetiva format: date-time effectiveStartHour: type: string description: Hora de início efetiva format: date-time deadlineDate: type: string description: Data do prazo format: date-time deadlineHour: type: string description: Hora do prazo format: date-time deadlineTimestamp: type: string description: Timestamp do prazo format: date-time resolved: type: boolean description: Se está resolvida resolutionDate: type: string description: Data de resolução format: date-time resolutionHour: type: string description: Hora de resolução resolution: type: string description: Resolução dispositionOccurrenceId: type: integer description: ID da disposição da ocorrência occurrenceCost: type: number description: Custo da ocorrência format: double checkFaq: type: boolean description: Se verifica a FAQ faqTags: type: string description: Tags da FAQ apInvoice: type: integer description: Nota fiscal de entrada arInvoice: type: integer description: Nota fiscal de saída carrierId: type: integer description: ID da transportadora operatorRegistration: type: integer description: Operador do cadastro timestampRegistration: type: string description: Timestamp do cadastro format: date-time operatorChange: type: integer description: Operador da alteração timestampChange: type: string description: Timestamp da alteração format: date-time emailOrigin: type: string description: Origem do e-mail emailAddress: type: string description: Endereço de e-mail emailName: type: string description: Nome do e-mail representativeId: type: integer description: ID do represetante account: #/definitions/accountRecord occurrenceOrigin: #/definitions/occurrenceOriginRecord occurrenceType: #/definitions/occurrenceTypeRecord companyBranch: #/definitions/companyBranchRecord notifyClosing: type: integer description: Se notifica o fechamento notifyEmail: type: integer description: Se notifica o e-mail opportunity: #/definitions/opportunityRecord customFields: type: string description: Campos customizados format: byte createdBy: #/definitions/userRecord changedBy: #/definitions/userRecord accountRecord: type: object properties: id: type: integer description: ID no CRM idErp: type: string description: ID no CRM name: type: string description: Nome fantasyName: type: string description: Nome fantasia active: type: boolean description: Se está ativo economicGroup: type: string description: Grupo Econômico stateRegistration: type: string description: Inscrição estadual municipalRegistration: type: string description: Inscrição municipal cnpj: type: string description: CNPJ cpf: type: string description: CPF rg: type: string description: RG einNumber: type: string description: EIN ssnNumber: type: string description: SSN url: type: string description: URL do site generalEmail: type: string description: E-mail geral financialEmail: type: string description: E-mail financeiro employees: type: integer description: Funcionários annualIncome: type: number description: Receita anual format: double registerDate: type: string description: Data do cadastro format: date-time customerSince: type: string description: Cliente desde format: date-time birthDate: type: string description: Data de nascimento/abertura format: date-time receiveEmail: type: boolean description: Recebe email receiveSurvey: type: boolean description: Recebe pesquisa receiveTrackEmail: type: boolean description: Recebe monitora e-mail personType: #/definitions/personTypeRecord companySize: #/definitions/companySizeRecord activityBranch: #/definitions/activityBranchRecord companyGroup: #/definitions/companyGroupRecord origin: #/definitions/accountOriginRecord nit: type: string description: NIT citizenshipCard: type: string description: Cédula Cidadania passport: type: string description: Passaporte customFields: type: string description: Campos customizados format: byte personTypeRecord: type: object properties: id: type: integer description: ID name: type: string description: Nome icon: type: string description: Ícone active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte companySizeRecord: type: object properties: id: type: integer description: ID name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte activityBranchRecord: type: object properties: id: type: integer description: ID no CRM idErp: type: string description: ID no sistema terceiro company: #/definitions/companyRecord name: type: string description: Nome active: type: boolean description: Se está ativo companyRecord: type: object properties: id: type: integer description: ID no CRM companyErp: type: string description: ID no sistema terceiro name: type: string description: Nome fantasyName: type: string description: Nome fantasia cnpj: type: string description: CNPJ nit: type: string description: NIT companyGroupRecord: type: object properties: id: type: integer description: ID no CRM idErp: type: string description: ID no sistema terceiro company: #/definitions/companyRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte accountOriginRecord: type: object properties: id: type: integer description: ID company: #/definitions/companyRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte occurrenceOriginRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte companyBranchRecord: type: object properties: id: type: integer description: ID company: #/definitions/companyRecord branch: #/definitions/branchRecord branchRecord: type: object properties: id: type: integer description: ID no CRM branchErp: type: string description: ID sistema terceiro headquarters: type: integer description: Matriz name: type: string description: Nome fantasyName: type: string description: Nome fantasia cnpj: type: string description: CNPJ nit: type: string description: NIT occurrenceTypeRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo sla: type: integer description: SLA customFields: type: string description: Campos customizados format: byte opportunityRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome description: type: string description: Descrição account: #/definitions/accountRecord date: type: string description: Data format: date-time hour: type: string description: Hora format: date-time contact: #/definitions/contactRecord companyId: type: integer description: ID da empresa subType: type: integer description: Subtipo origin: #/definitions/opportunityOriginRecord script: #/definitions/scriptRecord user: #/definitions/userRecord phase: type: integer description: Estágio standByPhase: type: integer description: Estágio standby lossReason: #/definitions/lossReasonRecord saleReason: #/definitions/saleReasonRecord probability: type: integer description: Probabilidade standByProbability: type: integer description: Probabilidade standby proposalNumber: type: string description: Número da proposta orderNumber: type: string description: Número do pedido autoNumbered: type: boolean description: Se é autonumerada predictedInitialClosingDate: type: string description: Data prevista de fechamento inicial format: date-time predictedClosingDate: type: string description: Data prevista de fechamento format: date-time effectiveDateClosing: type: string description: Data efetiva de fechamento format: date-time predictedDeliveryDate: type: string description: Data prevista de entrega format: date-time effectiveDelivertDate: type: string description: Data efetiva de entreda format: date-time initialPredictedValue: type: number description: Valor previsto inicial format: double predictedValue: type: number description: Valor previsto format: double closedValue: type: number description: Valor fechado format: double predictedValueCurrency: type: number description: Moeda do valor previsto format: double closedValueCurrency: type: number description: Moeda do valor esperado format: double predictedQuantitative: type: number description: Quantidade prevista format: double quantitativeAccomplished: type: number description: Quantidade realizada format: double history: type: string description: Histórico timestampRegistration: type: string description: Cadastro timestamp format: date-time operatorRegistration: #/definitions/userRecord timestampChange: type: string description: Alteração do timestamp format: date-time operatorChange: #/definitions/userRecord businessType: #/definitions/businessTypeRecord type: #/definitions/opportunityTypeRecord notifyEmail: type: boolean description: Se notifica por e-mail infoErp: type: string description: Informações do ERP format: byte customFields: type: string description: Campos customizados format: byte contactRecord: type: object properties: id: type: integer description: ID no CRM idErp: type: integer description: ID no sistema terceiro companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo search: type: integer description: Pesquisa privateUser: type: integer description: Usuário privado visibility: type: integer description: Visibilidade treatment: type: string description: Tratamento functionDescription: type: string description: Descrição da função gender: type: integer description: Gênero cep: type: string description: CEP zipCode: type: string description: ZIP Code address: type: string description: Endereço number: type: string description: Número complement: type: string description: Complemento district: type: string description: Bairro cpf: type: string description: CPF rg: type: string description: RG citizenshipCard: type: string description: Cédula cidadania telephone: type: string description: Telefone corporatePhone: type: boolean description: Telefone corporativo phoneBranch: type: string description: Ramal fax: type: string description: FAX cellPhone: type: string description: Celular corporateCellPhone: type: boolean description: Celular comparativo mobileWhatsapp: type: boolean description: Celular WhatsApp operator: type: integer description: Operadora email: type: string description: E-mail corporateEmail: type: boolean description: Se é um e-mail corporativo receiveCampaign: type: boolean description: Se recebe Campanha receiveSearch: type: boolean description: Se recebe pesquisa skype: type: string description: Skype twitter: type: string description: Twitter facebook: type: string description: Facebook birthday: type: string description: Aniversário birthDate: type: string description: Data de nascimento format: date-time decisionLevel: type: integer description: Nível de decisão opinionCompany: type: integer description: Parecer empresa reasonOpinionCompany: type: string description: Motivo parecer empresa notes: type: string description: Observação city: #/definitions/cityRecord department: #/definitions/departmentRecord function: #/definitions/functionRecord origin: #/definitions/contactOriginRecord account: #/definitions/accountRecord superiorContact: #/definitions/contactRecord customFields: type: string description: Campos customizados format: byte cityRecord: type: object properties: id: type: integer description: ID idErp: type: string description: ID no sistema terceiro idIbge: type: string description: Código IBGE da cidade name: type: string description: Nome active: type: boolean description: Se está ativo dddCode: type: string description: Código DDD population: type: integer description: População estimatedPopulation: type: integer description: População estimada consumptionPotential: type: number description: Potencial de consumo format: double pib: type: number description: PIB format: double state: #/definitions/stateRecord country: #/definitions/countryRecord customFields: type: string description: Campos customizados format: byte stateRecord: type: object properties: id: type: integer description: ID idErp: type: string description: ID no sistema terceiro name: type: string description: Nome initials: type: string description: Sigla active: type: boolean description: Ativo country: #/definitions/countryRecord customFields: type: string description: Campos customizados format: byte countryRecord: type: object properties: id: type: integer description: ID idErp: type: string description: ID no sistema terceiro name: type: string description: Nome countryCode: type: integer description: Código do país active: type: boolean description: Ativo customFields: type: string description: Campos customizados format: byte departmentRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo usesOccurrence: type: boolean description: Se usa ocorrência customFields: type: string description: Campos customizados format: byte functionRecord: type: object properties: id: type: integer description: ID idErp: type: string description: ID no sistema terceiro company: #/definitions/companyRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte contactOriginRecord: type: object properties: id: type: integer description: ID company: #/definitions/companyRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte opportunityOriginRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte scriptRecord: type: object properties: id: type: integer description: ID name: type: string description: Nome description: type: string description: Descrição userRecord: type: object properties: id: type: integer description: ID no CRM idErp: type: string description: ID no sistema terceiro name: type: string description: Nome lastName: type: string description: Sobrenome functionDescripiton: type: string description: Descrição da função photo: type: string description: Foto email: type: string description: E-mail active: type: boolean description: Se está ativo userCompanyBranches: type: array items: #/definitions/userCompanyBranchRecord description: Empresa filial userCompanyBranchRecord: type: object properties: id: type: integer description: ID standardCompanyBranch: type: boolean description: Empresa filial padrão user: #/definitions/userRecord companyBranch: #/definitions/companyBranchRecord lossReasonRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte saleReasonRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo customFields: type: string description: Campos customizados format: byte businessTypeRecord: type: object properties: id: type: integer description: ID companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo notes: type: string description: Observação opportunityTypeRecord: type: object properties: id: type: integer description: ID no CRM idErp: type: string description: ID no sistema terceiro companyBranch: #/definitions/companyBranchRecord name: type: string description: Nome active: type: boolean description: Se está ativo note: type: string description: Observação 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