Import Company Contacts

Import company contacts into a tenant from an uploaded CSV file.

Note: To import company contacts into a tenant, perform the following operations:
  1. Prepare a CSV file containing the company contacts to import.
  2. Call Get Contact Upload Credentials interface (with bizType set to company_contact_import and contentType set to text/csv) to obtain the resourceId and uploadUrl.
    Note: The credentials expire after 10 minutes.
  3. Upload the CSV file by sending a PUT request to the returned uploadUrl (with the content-type header set to text/csv).

  4. Call this interface with the returned resourceId to import the company contacts.

Request URL

POST {base_url}/uc-ccontact/api/v1/company-contacts/import

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Body parameters
Parameter Required Type Description
resourceId Yes String The resource ID.
Note: You can obtain the ID using the Get Contact Upload Credentials interface.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Task_Result> The task information.
Task_Result
Parameter Type Description
taskId String The ID of the task.
Note: You can query the task progress using the Query Task List interface.

Example

Request example

POST /uc-ccontact/api/v1/company-contacts/import HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTU1NjIyNywiaWF0IjoxNzkxNTM0NjI3LCJqdGkiOiI1OGIyYTM3YS1kM2Q2LTRhYTUtODEwOS1kZTg5ZGE3YTQ5NWMiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.z9-FUkQL_rpNNUHl9ddimwioABpVsvQIF403CoYsR8OATIkbpWbxQXDpRD2ydJpkj_6FCqWxee7XjAswlUcn3YMWLo1HeuXFF3TnyS5diTmrAmd4_AL1S3S38pmY4sbgjVFLbZphx85V-HZ35ngZoHkNiyEoondYhF4eyE3SuXgnDRd3PQB-pD5QNzqortzvMAVXlzcTQvTG2OFKvQDVySyFigu0kK35EiL-A1PaBzQCrR768WG-Myk3R6T_Ae1p5IsB3zM0pBs0b_VI6qloo596Hq-yB3GFeCMMGpujTjIa7pk51mzgoOGwcYih8Q5klojv_t0SyoNbxJxXDMVNVw
Content-Type: application/json
x-tenant-code: jint
{
  "resourceId": "2108824598486036481"
}

Response example

HTTP/1.1
{
    "requestId": "c74061b7b4154ccf6db51552dbf4430c",
    "code": "200",
    "message": "SUCCESS",
    "detailMessage": "",
    "result": {
        "taskId": "367217373919727616"
    }
}