Hipcall SDK API Reference
hipcall_sdk.client
- class hipcall_sdk.client.AsyncClient(api_key, base_url=None)
Bases:
HipcallBaseClient
- async call_and_bridge(user_id, callee_number, ring_user_first=True)
Call and bridge user and given number.
- Parameters:
user_id (
int
) – Database ID of the caller user.callee_number (
str
) – Callee number.ring_user_first (
bool
) – Rings user first if set to True. Defaults to True.
- Return type:
- Returns:
Pydantic model containing call & bridge response.
- async create_task(task)
Create new task on Hipcall.
- Parameters:
task (
TaskCreate
) – Pydantic model containing data for Task creation.- Return type:
- Returns:
Pydantic model containing created task information.
- async get_call(call_id, date)
Get call details for given call ID and date.
- Parameters:
call_id (
str
) – UUID of the call.date (
str
) – Date of the call.
- Return type:
- Returns:
Pydantic model containing call details.
- async get_calls(limit=10, offset=0, q=None, sort='started_at.asc')
Get list of calls with query.
- Parameters:
limit (
int
) – Limit of query. Min 1, Max 100. Defaults to 10.offset (
int
) – Offset of the query. Defaults to 0.q (
Optional
[str
]) – Search query which is searched at caller_number and callee_number. Don’t add + or 00 as prefix just write number with country code.sort (
str
) – Sort parameter. Defaults to “started_at.asc”.
- Return type:
- Returns:
Pydantic model containing call list and metadata.
- async get_task(task_id)
Get task information by ID.
- Parameters:
task_id (
int
) – Database ID of the task.- Return type:
- Returns:
Pydantic model containing task information.
- async get_tasks(limit=10, offset=0, q=None, sort='id.asc')
Get list of tasks with query.
- Parameters:
limit (
int
) – Limit of query. Min 1, Max 100. Defaults to 10.offset (
int
) – Offset of the query. Defaults to 0.q (
Optional
[str
]) – Search query which is searched name of the task.sort (
str
) – Sort parameter. Defaults to “id.asc”. Supported fields: id and name Ordering options: asc, asc_nulls_last, asc_nulls_first, desc, desc_nulls_last, desc_nulls_first
- Return type:
- Returns:
Pydantic model containing task list and metadata.
- class hipcall_sdk.client.Client(api_key, base_url=None)
Bases:
HipcallBaseClient
- call_and_bridge(user_id, callee_number, ring_user_first=True)
Call and bridge user and given number.
- Parameters:
user_id (
int
) – Database ID of the caller user.callee_number (
str
) – Callee number.ring_user_first (
bool
) – Rings user first if set to True. Defaults to True.
- Return type:
- Returns:
Pydantic model containing call & bridge response.
- create_task(task)
Create new task on Hipcall.
- Parameters:
task (
TaskCreate
) – Pydantic model containing data for Task creation.- Return type:
- Returns:
Pydantic model containing created task information.
- get_call(call_id, date)
Get call details for given call ID and date.
- Parameters:
call_id (
str
) – UUID of the call.date (
str
) – Date of the call.
- Return type:
- Returns:
Pydantic model containing call details.
- get_calls(limit=10, offset=0, q=None, sort='started_at.desc')
Get list of calls with query.
- Parameters:
limit (
int
) – Limit of query. Min 1, Max 100. Defaults to 10.offset (
int
) – Offset of the query. Defaults to 0.q (
Optional
[str
]) – Search query which is searched at caller_number and callee_number. Don’t add + or 00 as prefix just write number with country code.sort (
str
) – Sort parameter. Defaults to “started_at.asc”.
- Return type:
- Returns:
Pydantic model containing call list and metadata.
- get_task(task_id)
Get task information by ID.
- Parameters:
task_id (
int
) – Database ID of the task.- Return type:
- Returns:
Pydantic model containing task information.
- get_tasks(limit=10, offset=0, q=None, sort='id.asc')
Get list of tasks with query.
- Parameters:
limit (
int
) – Limit of query. Min 1, Max 100. Defaults to 10.offset (
int
) – Offset of the query. Defaults to 0.q (
Optional
[str
]) – Search query which is searched name of the task.sort (
str
) – Sort parameter. Defaults to “id.asc”. Supported fields: id and name Ordering options: asc, asc_nulls_last, asc_nulls_first, desc, desc_nulls_last, desc_nulls_first
- Return type:
- Returns:
Pydantic model containing task list and metadata.
hipcall_sdk.models
- pydantic model hipcall_sdk.models.Call
Bases:
BaseModel
- Fields:
-
field answered_at:
Optional
[str
] = None
-
field bridged_at:
Optional
[str
] = None
-
field call_duration:
Optional
[int
] = None
-
field direction:
str
[Required]
-
field ended_at:
str
[Required]
-
field first_touch_duration:
Optional
[int
] = None
-
field missing_call:
Optional
[bool
] = None
-
field started_at:
str
[Required]
-
field uuid:
str
[Required]
- pydantic model hipcall_sdk.models.CallAndBridgeResponse
Bases:
BaseModel
-
field data:
CallAndBridge
[Required]
-
field data:
- pydantic model hipcall_sdk.models.CallDetail
Bases:
BaseModel
- Fields:
-
field answered_at:
Optional
[datetime
] = None
-
field bridged_at:
Optional
[datetime
] = None
-
field call_duration:
Optional
[int
] = None
-
field call_flow:
Optional
[str
] = None
-
field callback_cdr_uuid:
Optional
[str
] = None
-
field callback_time:
Optional
[datetime
] = None
-
field callback_user_id:
Optional
[int
] = None
-
field callee_id:
Optional
[int
] = None
-
field callee_number:
Optional
[str
] = None
-
field callee_type:
Optional
[str
] = None
-
field caller_id:
Optional
[int
] = None
-
field caller_number:
Optional
[str
] = None
-
field caller_type:
Optional
[str
] = None
-
field channel_id:
Optional
[int
] = None
-
field channel_type:
Optional
[str
] = None
-
field contact_id:
Optional
[int
] = None
-
field credited:
Optional
[bool
] = None
-
field direction:
str
[Required]
-
field ended_at:
datetime
[Required]
-
field first_touch_duration:
Optional
[int
] = None
-
field hangup_by:
Optional
[str
] = None
-
field missing_call:
Optional
[bool
] = None
-
field missing_call_reason:
Optional
[str
] = None
-
field number_id:
Optional
[int
] = None
-
field record_url:
Optional
[str
] = None
-
field started_at:
datetime
[Required]
-
field user_id:
Optional
[int
] = None
-
field uuid:
str
[Required]
-
field voicemail_id:
Optional
[int
] = None
-
field voicemail_type:
Optional
[str
] = None
-
field voicemail_url:
Optional
[str
] = None
- pydantic model hipcall_sdk.models.CallDetailResponse
Bases:
BaseModel
-
field data:
CallDetail
[Required]
-
field data:
- pydantic model hipcall_sdk.models.CallListResponse
Bases:
BaseModel
- pydantic model hipcall_sdk.models.Meta
Bases:
BaseModel
- Fields:
-
field count:
int
[Required]
-
field limit:
int
[Required]
-
field offset:
int
[Required]
- pydantic model hipcall_sdk.models.Task
Bases:
BaseModel
-
field description:
Optional
[str
] = None
-
field done:
bool
[Required]
-
field done_at:
Optional
[datetime
] = None
-
field id:
int
[Required]
-
field name:
str
[Required]
-
field description:
- pydantic model hipcall_sdk.models.TaskCreate
Bases:
BaseModel
- Fields:
-
field assign_to_user_id:
Optional
[int
] = None
-
field auto_assign_to_user:
Optional
[bool
] = None
-
field company_ids:
Optional
[List
[int
]] = None
-
field contact_ids:
Optional
[List
[int
]] = None
-
field deal_ids:
Optional
[List
[int
]] = None
-
field description:
Optional
[str
] = None
-
field due_date:
Optional
[datetime
] = None
-
field name:
str
[Required]
-
field priority:
Optional
[str
] = None
-
field task_list_id:
Optional
[int
] = None
- pydantic model hipcall_sdk.models.TaskDetail
Bases:
BaseModel
- Fields:
-
field assign_to_user_id:
Optional
[int
] = None
-
field auto_assign_to_user:
Optional
[bool
] = None
-
field company_ids:
Optional
[List
[int
]] = None
-
field contact_ids:
Optional
[List
[int
]] = None
-
field deal_ids:
Optional
[List
[int
]] = None
-
field description:
Optional
[str
] = None
-
field done:
bool
[Required]
-
field done_at:
Optional
[datetime
] = None
-
field due_date:
Optional
[datetime
] = None
-
field id:
int
[Required]
-
field name:
str
[Required]
-
field priority:
Optional
[str
] = None
-
field task_list_id:
Optional
[int
] = None
- pydantic model hipcall_sdk.models.TaskDetailResponse
Bases:
BaseModel
-
field data:
TaskDetail
[Required]
-
field data:
- pydantic model hipcall_sdk.models.TaskListResponse
Bases:
BaseModel
- pydantic model hipcall_sdk.models.TaskResponse
Bases:
BaseModel
- Fields:
hipcall_sdk.exceptions
- exception hipcall_sdk.exceptions.BadRequestException(status_code, content)
Bases:
HipcallAPIException
- exception hipcall_sdk.exceptions.HipcallAPIException(status_code, content)
Bases:
Exception
- exception hipcall_sdk.exceptions.NotFoundException(status_code, content)
Bases:
HipcallAPIException
- exception hipcall_sdk.exceptions.UnauthorizedException(status_code, content)
Bases:
HipcallAPIException
- exception hipcall_sdk.exceptions.UnprocessableEntityException(status_code, content)
Bases:
HipcallAPIException