Skip to main content

Dixa Developer Kit for Python

Project description

Python Dixa SDK

A Python implementation of the Dixa API.

Installation

Install the package with pip

pip install dixa

Usage/Examples

Initialization

from dixa import DixaClient

client = DixaClient(api_key="<DIXA_API_KEY>")

Getting user data

# Get users by id, email or phone
user_by_id = client.get_end_users(user_id="abcd1234")
user_by_email = client.get_end_users(email="john.doe@example.com")
user_by_phone = client.get_end_users(phone_number="+447357000000")

# Get all users
all_users = client.get_all_end_users()

Upload bulk user data

from dixa import User, UserList

user1 = {
    "displayName": "John Doe",
    "email": "john.doe@example.com",
    "middleNames": ["Bob", "Patrick"]
}

user2 = {
    "givenName": "Juan",
    "familyName": "Perez",
    "displayName": "Juan Perez",
    "phoneNumber": "+447777000000"
}

users = UserList(
    data=[
        User(**user1),
        User(**user2)
    ]
)

client.post_end_users_bulk(user_list=users)

Create a Team

from dixa import Team

client.post_team(team=Team(name="New Team"))

Features

  • Get users and agents by id, email or phone.
  • Upload, patch and modify users and agents.
  • Bulk upload of users.
  • Get agents' presence.
  • Activate and deactivate tags.

Ported Endpoints

Agents

  • GET /v1/agents/presence
  • GET /v1/agents/{agent_id}/teams
  • GET /v1/agents/{agent_id}/presence
  • POST /v1/agents/bulk
  • GET /v1/agents
  • PUT /v1/agents
  • POST /v1/agents
  • PATCH /v1/agents
  • GET /v1/agents/{agent_id}
  • PUT /v1/agents/{agent_id}
  • POST /v1/agents/{agent_id}
  • PATCH /v1/agents/{agent_id}

End Users

  • POST /v1/endusers/bulk
  • GET /v1/endusers/{user_id}
  • PATCH /v1/endusers/{user_id}
  • GET /v1/endusers
  • PUT /v1/endusers
  • POST /v1/endusers
  • PATCH /v1/endusers
  • PUT /v1/endusers/{enduser_id}

Teams

  • GET /v1/teams
  • POST /v1/teams
  • GET /v1/teams/{teamId}/agents
  • GET /v1/teams/{teamId}/presence
  • GET /v1/teams/{team_id}
  • DELETE /v1/teams/{team_id}
  • DELETE /v1/teams/{team_id}/agents
  • PATCH /v1/teams/{team_id}/agents

Conversations

  • PUT /v1/conversations/{conversationId}/close
  • PUT /v1/conversations/{conversationId}/reopen
  • PUT /v1/conversations/{conversationId}/transfer/queue
  • POST /v1/conversations/{conversationId}/notes/bulk
  • POST /v1/conversations/{conversationId}/notes
  • GET /v1/conversations/{csid}/rating
  • PUT /v1/conversations/{conversationId}/tags/{tagId}
  • DELETE /v1/conversations/{conversationId}/tags/{tagId}
  • GET /v1/conversations/{csid}/tags
  • POST /v1/conversations/{conversationId}/messages
  • POST /v1/conversations
  • PUT /v1/conversations/{conversationId}/claim
  • GET /v1/conversations/{csid}
  • GET /v1/conversations/{csid}/activitylog
  • GET /v1/conversations/activitylog

Queues

  • GET /v1/queues/{queue_id}/members
  • DELETE /v1/queues/{queueId}/members
  • PATCH /v1/queues/{queueId}/members
  • GET /v1/queues
  • POST /v1/queues
  • GET /v1/queues/{queue_id}

Tags

  • GET /v1/tags/{tagId}
  • GET /v1/tags
  • POST /v1/tags
  • PATCH/v1/tags/{tagId}/deactivate
  • PATCH /v1/tags/{tagId}/activate

Reference

REST API Reference

History

v0.1.0

Added

  • Dixa Client.
  • Models: User, UserList, Tag, TagList, Team, TeamList, Presence, PresenceList.
  • Methods:
    • get_end_users
    • get_all_end_users
    • post_end_user
    • post_end_users_bulk
    • put_end_user
    • patch_end_user
    • get_agents
    • get_all_agents
    • get_agents_presence
    • get_agent_teams
    • get_tags
    • patch_tag
    • get_teams
    • get_team_agents
    • get_team_presence
    • post_team
    • delete_team

Project details


Download files

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

Source Distribution

dixa-0.1.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

dixa-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file dixa-0.1.0.tar.gz.

File metadata

  • Download URL: dixa-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.3

File hashes

Hashes for dixa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b3cdd18131769612df62446837dfdbe89abb142a7e401b90627c3c12c859a55
MD5 805b9c63f391cb2b889797cf76c8bef7
BLAKE2b-256 3fa085cbbf1db45c8f9d7dcb23f98c549ce0a92840a6c17574ec3a0e395ce586

See more details on using hashes here.

File details

Details for the file dixa-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dixa-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.3

File hashes

Hashes for dixa-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 755b73c40a8b485d39ccec1ee96f89d6f22959da7f514d9f9a09f3f46e83e87f
MD5 7a2d07fdbba9f839c0b2df6bd8f9c115
BLAKE2b-256 91f77712d5b32951df99052c890582c29154af3dceeff4e90754742ef11fff50

See more details on using hashes here.

Supported by

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