Skip to main content

Portal Facil CRM API SDK

Project description

Portal Fácil SDK

SDK Python para integração com o Portal Fácil CRM, permitindo gerenciar beneficiários e tickets de atendimento de forma simples e eficiente.

Recursos

  • Consulta de beneficiários por documento
  • Abertura de tickets de atendimento
  • Adição de anotações em tickets
  • Gerenciamento automático de autenticação e tokens
  • Cache de token para otimização de requisições

Instalação

pip install portal-facil-sdk

Como Usar

Configuração Inicial

from portal_facil_sdk import AtendimentoController, CrmProvider, CacheService

# Configurar o cache para tokens
cache = CacheService('token_cache.pkl')

# Configurar o provider
provider = CrmProvider(
    app_key='sua_app_key',
    base_url='url_base_do_crm',
    username='seu_usuario',
    password='sua_senha',
    tipo_entidade_padrao=1,  # configure conforme necessário
    origem_padrao=1,         # configure conforme necessário
    subcategoria_padrao=1,   # configure conforme necessário
    cache=cache
)

# Criar o controller
controller = AtendimentoController(provider)

Consultando um Beneficiário

beneficiario = controller.consultar_beneficiario('000002-7')
print(beneficiario.nome)
print(beneficiario.cpf)
print(beneficiario.codigo)

Abrindo um Ticket

ticket = controller.abrir_chamado(beneficiario, '1137092380')
print(ticket.id)
print(ticket.protocolo)

Licença

Este projeto está licenciado sob a licença MIT - consulte o arquivo LICENSE para mais detalhes.

Autor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portal_facil_sdk-0.2.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file portal_facil_sdk-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for portal_facil_sdk-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4e8b94dde2346f23dc020fa0ebd24b0a9dbcf3c08ca496c54951b0fd946dae78
MD5 5a99c33528c2cf19ba9d27bc5c2f50ab
BLAKE2b-256 04c0cd0c7afba8c55229f8f33c676235c6af5e56cc127814b652cae6d3c87f39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page