Import contacts from file
Imports contacts from csv file
- Maximum available contacts to add is 10000
- multipart/form-data
Request Body
- file binary
Binary file data
Responses
- 200
- 400
- 401
- 422
Returns importing process status
There is two response types:
- OK
- WARNING
WARNING
may arise when duplicates found
- application/json
- Schema
- Example (from schema)
- O K
- W A R N I N G
Schema
- status string
Possible values: [
OK
,WARNING
]Import contacts operation status
warning object
Provides information about duplicates in contacts. This field is required when operation status is 'WARNING'
info stringWarning information
lines string[]Detailed information about warnings
{
"status": "OK",
"warning": {
"info": "Duplicates has been found. First contact with the same number and type from all duplicates will be added to contacts",
"lines": [
"found duplicates with type 'multi panel' and number 'sip:[email protected]'",
"found duplicates with type 'regular' and number '1222-22-22-22'"
]
}
}
{
"status": "OK"
}
{
"status": "WARNING",
"warning": {
"info": "Duplicates has been found. First contact with the same number and type from all duplicates will be added to contacts",
"lines": [
"found duplicates with type 'multi panel' and number 'sip:[email protected]'",
"found duplicates with type 'regular' and number '1222-22-22-22'"
]
}
}
File error - Wrong file - Max amount of contacts reached - Importing troubles
- application/json
- Schema
- Example (from schema)
- Wrong File
- Max
Schema
- error string
Error information
{
"error": "Wrong JSON body"
}
{
"error": "Wrong file"
}
{
"error": "Max amount of contacts reached"
}
Unauthorized request. Log In
- application/json
- Schema
- Example (from schema)
- Log In
Schema
- error string
Error information
{
"error": "Log In"
}
{
"error": "Log In"
}
Validation errors
- application/json
- Schema
- Example (from schema)
- Wrong version
- Validation error
- Default panel duplicates
Schema
- lines string[]
Detailed error information
{
"lines": [
"error on line 1, each row must contain at least 7 cells, current size is 4",
"error on line 2, invalid type='regular2'",
"multiple contacts with default panel type on positions:[3, 4, 5]. There can be only one default panel",
"not supported contacts version",
"Maximum available contacts to add is 10000, your contacts list size is 10001"
]
}
{
"lines": [
"not supported contacts version"
]
}
{
"lines": [
"error on line 1, each row must contain at least 7 cells, current size is 4",
"error on line 2, invalid type='regular2'",
"error on line 3, invalid name=''",
"error on line 4, invalid number='asdf'",
"error on line 5, invalid 'is default panel param'='1'",
"error on line 6, invalid number='1-2-3-4' for type='individual panel'",
"Maximum available contacts to add is 10000, your contacts list size is 10001"
]
}
{
"lines": [
"multiple contacts with default panel type on positions:[3, 4, 5]. There can be only one default panel"
]
}
Loading...